Compare commits

..

29 Commits

Author SHA1 Message Date
Karl Tauber
b3c40bf448 release 1.0-rc2 2021-02-01 01:39:52 +01:00
Karl Tauber
02f7cd77f4 FlatBorder: fixed wrong round edge of focused components in themes without outer focus border (Flat Light/Dark) 2021-02-01 01:30:52 +01:00
Karl Tauber
7f8f3aa99b Button: undone most style changes done in previous commit related to focused and default buttons:
- default button: white background and wide border
- focused button: light blue background and thin border

(the light blue default button did not look beautiful IMHO)
2021-02-01 01:08:20 +01:00
Karl Tauber
0bcdc14909 - Button:
- In "Flat Light" theme, changed styles of focused and default buttons to
    avoid confusion with all other themes. Focused buttons now have a white
    background (was light blue) and a slightly wider border. The default button
    now has a light blue background (was white) and a thin border. In all other
    themes the default button also has colored background.
  - In "Flat Dark" theme, use slightly wider border for focused buttons.
- CheckBox and RadioButton: In "Flat Dark" theme, use blueish background for
  focused components.
2021-01-31 20:02:24 +01:00
Karl Tauber
526c25a02b FlatComponentStateTest: fixed insets 2021-01-31 18:51:28 +01:00
Karl Tauber
f48da9dab1 FlatComponentStateTest: added text field and combobox (for comparison) 2021-01-31 16:17:47 +01:00
Karl Tauber
2e8dfda12e FlatComponentStateTest: added help buttons 2021-01-31 00:55:29 +01:00
Karl Tauber
63da576d85 FlatComponentStateTest: added selected checkboxes and radiobuttons 2021-01-30 20:53:07 +01:00
Karl Tauber
0ab4206540 FlatComponentStateTest added 2021-01-30 18:43:11 +01:00
Karl Tauber
212ae90401 client property "JComponent.focusOwner" added to allow customizing detection of focused state (issue #185) 2021-01-30 17:54:47 +01:00
Karl Tauber
d4e5d0be45 javadoc fixes 2021-01-30 17:46:53 +01:00
Karl Tauber
3520a0f1fb TextComponents: border of focused non-editable text components had wrong color 2021-01-30 01:06:03 +01:00
Karl Tauber
036090a947 Button: fixed behavior of Enter key on focused button on Windows and Linux, which now clicks the focused button (instead of the default button) 2021-01-30 00:37:36 +01:00
Karl Tauber
dc570c683a UI defaults: added Java 8 and 9+ InputMap dumps of NimbusLookAndFeel, which are different on Linux (and macOS) than on Windows because they use GTK key bindings (see GTKKeybindings.installKeybindings(), invoked from NimbusLookAndFeel.getDefaults()) 2021-01-29 23:00:06 +01:00
Karl Tauber
9f85d34c91 JIDE: updated UI defaults dumps for commit 7d0f7e1c8e (support JidePopupMenu) 2021-01-29 22:06:01 +01:00
Karl Tauber
16bf1fb6c3 README.md: screenshots updated 2021-01-28 23:26:30 +01:00
Karl Tauber
47c4d508e0 Demo: updated screenshot mode 2021-01-28 23:26:16 +01:00
Karl Tauber
e5d9060623 UI defaults: added links to docs and note to properties files 2021-01-23 18:49:35 +01:00
Karl Tauber
fdf28fc385 javadoc and comment updates/fixes 2021-01-23 18:05:46 +01:00
Karl Tauber
9015a4d56b Window decorations: fixed top window border in dark themes when running in JetBrains Runtime (issue #244)
fixed/improved calculation of active border color
2021-01-23 16:59:53 +01:00
Karl Tauber
38301454a6 CHANGELOG.md: added recently merged PRs #245 2021-01-22 11:10:04 +01:00
Karl Tauber
9b3a22c4ca FlatComponents2Test: simplified layout and reduced frame size 2021-01-21 23:58:22 +01:00
Karl Tauber
548dbc3649 Merge pull request #245 from ingokegel/tree_wide_selection
Added a per-tree wide selection setting
2021-01-21 23:19:33 +01:00
Karl Tauber
3474129812 Tree:
- paint non-wide selection in FlatTreeUI.paintRow() instead of using reflection to change private field in DefaultTreeCellRenderer
- use DefaultTreeCellRenderer.getBackgroundSelectionColor() as selection color (if possible)
- added boolean client property JTree.paintSelection to disable selection painting in FlatTreeUI.paintRow()
- FlatComponents2Test:
  - added checkboxes for wideSelection and paintSelection client properties
  - added possibility to test various kinds of tree cell renderers
  - added JXTree, JIDE CheckBoxTree

(PR #245)
2021-01-21 17:38:20 +01:00
Karl Tauber
63193feebe JIDE: JidePopupMenu:
- added test to FlatJideOssTest
- updated README.md and CHANGELOG.md

(PR #246)
2021-01-21 00:14:42 +01:00
Karl Tauber
51f22bfe75 Merge pull request #246 from ingokegel/jide_popup_menu_ui
Added UI for JidePopupMenu
2021-01-21 00:05:32 +01:00
Ingo Kegel
7d0f7e1c8e Added UI for JidePopupMenu 2021-01-20 16:18:48 +01:00
Karl Tauber
dd8ab242fb CheckBox and RadioButton: fill component background as soon as background color is different to default background color, even if component is not opaque (which is the default). This paints selection if using the component as cell renderer a Table, Tree or List (better fix for #77) 2021-01-19 19:13:20 +01:00
Ingo Kegel
60f3428da7 Added a per-tree wide selection setting 2021-01-19 17:46:41 +01:00
56 changed files with 4977 additions and 435 deletions

View File

@@ -1,6 +1,43 @@
FlatLaf Change Log
==================
## 1.0-rc2
#### New features and improvements
- Button:
- In "Flat Light" theme, use a slightly thinner border for focused buttons
(because they already have light blue background).
- In "Flat Dark" theme, use slightly wider border for focused buttons.
- CheckBox and RadioButton: In "Flat Dark" theme, use blueish background for
focused components.
- Tree: Support disabling wide selection per component. (set client property
`JTree.wideSelection` to `false`). (PR #245)
- Tree: Support disabling selection painting per component. Then the tree cell
renderer is responsible for selection painting. (set client property
`JTree.paintSelection` to `false`).
- JIDE Common Layer: Support `JidePopupMenu`.
#### Fixed bugs
- Button: Fixed behavior of <kbd>Enter</kbd> key on focused button on Windows
and Linux, which now clicks the focused button (instead of the default
button).
- On Windows, this is a regression in 1.0-rc1.
- On macOS, the <kbd>Enter</kbd> key always clicks the default button, which
is the platform behavior.
- On all platforms, the default button can be always clicked with
<kbd>Ctrl+Enter</kbd> keys, even if another button is focused.
- CheckBox and RadioButton: Fill component background as soon as background
color is different to default background color, even if component is not
opaque (which is the default). This paints selection if using the component as
cell renderer a Table, Tree or List.
- TextComponents: Border of focused non-editable text components had wrong
color.
- Custom window decorations: Fixed top window border in dark themes when running
in JetBrains Runtime.
## 1.0-rc1
#### New features and improvements

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
val releaseVersion = "1.0-rc1"
val developmentVersion = "1.0-rc2-SNAPSHOT"
val releaseVersion = "1.0-rc2"
val developmentVersion = "1.0-rc3-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion

View File

@@ -22,6 +22,8 @@ import javax.swing.JComponent;
import javax.swing.SwingConstants;
/**
* Defines/documents own client properties used in FlatLaf.
*
* @author Karl Tauber
*/
public interface FlatClientProperties
@@ -170,6 +172,25 @@ public interface FlatClientProperties
*/
String OUTLINE_WARNING = "warning";
/**
* Specifies a callback that is invoked to check whether a component is permanent focus owner.
* Used to paint focus indicators.
* <p>
* May be useful in special cases for custom components.
* <p>
* Use a {@link java.util.function.Predicate} that receives the component as parameter:
* <pre>{@code
* myComponent.putClientProperty( "JComponent.focusOwner",
* (Predicate<JComponent>) c -> {
* return ...; // check here
* } );
* }</pre>
* <p>
* <strong>Component</strong> {@link javax.swing.JComponent}<br>
* <strong>Value type</strong> {@link java.util.function.Predicate&lt;javax.swing.JComponent&gt;
*/
String COMPONENT_FOCUS_OWNER = "JComponent.focusOwner";
//---- Popup --------------------------------------------------------------
/**
@@ -232,7 +253,7 @@ public interface FlatClientProperties
/**
* Specifies whether the scroll pane uses smooth scrolling.
* <p>
* <strong>Component</strong> {{@link javax.swing.JScrollPane}<br>
* <strong>Component</strong> {@link javax.swing.JScrollPane}<br>
* <strong>Value type</strong> {@link java.lang.Boolean}
*/
String SCROLL_PANE_SMOOTH_SCROLLING = "JScrollPane.smoothScrolling";
@@ -293,10 +314,12 @@ public interface FlatClientProperties
String TABBED_PANE_MAXIMUM_TAB_WIDTH = "JTabbedPane.maximumTabWidth";
/**
* Specifies the height of a tab.
* Specifies the minimum height of a tab.
* <p>
* <strong>Component</strong> {@link javax.swing.JTabbedPane}<br>
* <strong>Value type</strong> {@link java.lang.Integer}
*
* @see #TABBED_PANE_TAB_INSETS
*/
String TABBED_PANE_TAB_HEIGHT = "JTabbedPane.tabHeight";
@@ -306,6 +329,8 @@ public interface FlatClientProperties
* <strong>Component</strong> {@link javax.swing.JTabbedPane}
* or tab content components (see {@link javax.swing.JTabbedPane#setComponentAt(int, java.awt.Component)})<br>
* <strong>Value type</strong> {@link java.awt.Insets}
*
* @see #TABBED_PANE_TAB_HEIGHT
*/
String TABBED_PANE_TAB_INSETS = "JTabbedPane.tabInsets";
@@ -670,6 +695,25 @@ public interface FlatClientProperties
*/
String TAB_BUTTON_SELECTED_BACKGROUND = "JToggleButton.tab.selectedBackground";
//---- JTree --------------------------------------------------------------
/**
* Override if a tree shows a wide selection. Default is {@code true}.
* <p>
* <strong>Component</strong> {@link javax.swing.JTree}<br>
* <strong>Value type</strong> {@link java.lang.Boolean}
*/
String TREE_WIDE_SELECTION = "JTree.wideSelection";
/**
* Specifies whether tree item selection is painted. Default is {@code true}.
* If set to {@code false}, then the tree cell renderer is responsible for painting selection.
* <p>
* <strong>Component</strong> {@link javax.swing.JTree}<br>
* <strong>Value type</strong> {@link java.lang.Boolean}
*/
String TREE_PAINT_SELECTION = "JTree.paintSelection";
//---- helper methods -----------------------------------------------------
/**

View File

@@ -42,10 +42,12 @@ class FlatInputMaps
}
private static void initBasicInputMaps( UIDefaults defaults ) {
defaults.put( "Button.focusInputMap", new UIDefaults.LazyInputMap( new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
} ) );
if( SystemInfo.isMacOS ) {
defaults.put( "Button.focusInputMap", new UIDefaults.LazyInputMap( new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
} ) );
}
modifyInputMap( defaults, "ComboBox.ancestorInputMap",
"SPACE", "spacePopup",

View File

@@ -64,6 +64,8 @@ public interface FlatSystemProperties
* If this system property is set, FlatLaf invokes {@link JFrame#setDefaultLookAndFeelDecorated(boolean)}
* and {@link JDialog#setDefaultLookAndFeelDecorated(boolean)} on LaF initialization.
* <p>
* (requires Window 10)
* <p>
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
* <strong>Default</strong> none
*/
@@ -79,6 +81,8 @@ public interface FlatSystemProperties
* Setting this to {@code true} forces using JetBrains Runtime custom window decorations
* even if they are not enabled by the application.
* <p>
* (requires Window 10)
* <p>
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
* <strong>Default</strong> {@code true}
*/
@@ -87,6 +91,8 @@ public interface FlatSystemProperties
/**
* Specifies whether menubar is embedded into custom window decorations.
* <p>
* (requires Window 10)
* <p>
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
* <strong>Default</strong> {@code true}
*/

View File

@@ -119,7 +119,7 @@ class UIDefaultsLoader
addonClassLoaders.add( addonClassLoader );
}
// load custom properties files (usually provides by applications)
// load custom properties files (usually provided by applications)
List<Object> customDefaultsSources = FlatLaf.getCustomDefaultsSources();
int size = (customDefaultsSources != null) ? customDefaultsSources.size() : 0;
for( int i = 0; i < size; i++ ) {

View File

@@ -146,8 +146,14 @@ public class FlatCheckBoxIcon
paintBorder( c, g );
// paint background
g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ),
selected ? selectedBackground : background ) );
Color bg = FlatUIUtils.deriveColor( getBackground( c, selected ),
selected ? selectedBackground : background );
if( bg.getAlpha() < 255 ) {
// fill background with default color before filling with non-opaque background
g.setColor( selected ? selectedBackground : background );
paintBackground( c, g );
}
g.setColor( bg );
paintBackground( c, g );
// paint checkmark

View File

@@ -31,6 +31,8 @@ import com.formdev.flatlaf.ui.FlatUIUtils;
*
* @uiDefault Component.focusWidth int
* @uiDefault Component.focusColor Color
* @uiDefault HelpButton.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth
* @uiDefault HelpButton.borderWidth int optional; default is 1
* @uiDefault HelpButton.borderColor Color
* @uiDefault HelpButton.disabledBorderColor Color
* @uiDefault HelpButton.focusedBorderColor Color
@@ -50,6 +52,8 @@ public class FlatHelpButtonIcon
{
protected final int focusWidth = UIManager.getInt( "Component.focusWidth" );
protected final Color focusColor = UIManager.getColor( "Component.focusColor" );
protected final float innerFocusWidth = FlatUIUtils.getUIFloat( "HelpButton.innerFocusWidth", FlatUIUtils.getUIFloat( "Component.innerFocusWidth", 0 ) );
protected final int borderWidth = FlatUIUtils.getUIInt( "HelpButton.borderWidth", 1 );
protected final Color borderColor = UIManager.getColor( "HelpButton.borderColor" );
protected final Color disabledBorderColor = UIManager.getColor( "HelpButton.disabledBorderColor" );
@@ -84,12 +88,18 @@ public class FlatHelpButtonIcon
boolean enabled = c.isEnabled();
boolean focused = FlatUIUtils.isPermanentFocusOwner( c );
// paint focused border
float xy = 0.5f;
float wh = iconSize - 1;
// paint outer focus border
if( focused && FlatButtonUI.isFocusPainted( c ) ) {
g2.setColor( focusColor );
g2.fill( new Ellipse2D.Float( 0.5f, 0.5f, iconSize - 1, iconSize - 1 ) );
g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) );
}
xy += focusWidth;
wh -= (focusWidth * 2);
// paint border
g2.setColor( FlatButtonUI.buttonStateColor( c,
borderColor,
@@ -97,7 +107,19 @@ public class FlatHelpButtonIcon
focusedBorderColor,
hoverBorderColor,
null ) );
g2.fill( new Ellipse2D.Float( focusWidth + 0.5f, focusWidth + 0.5f, 21, 21 ) );
g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) );
xy += borderWidth;
wh -= (borderWidth * 2);
// paint inner focus border
if( innerFocusWidth > 0 && focused && FlatButtonUI.isFocusPainted( c ) ) {
g2.setColor( focusColor );
g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) );
xy += innerFocusWidth;
wh -= (innerFocusWidth * 2);
}
// paint background
g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c,
@@ -106,7 +128,7 @@ public class FlatHelpButtonIcon
focusedBackground,
hoverBackground,
pressedBackground ), background ) );
g2.fill( new Ellipse2D.Float( focusWidth + 1.5f, focusWidth + 1.5f, 19, 19 ) );
g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) );
// paint question mark
Path2D q = new Path2D.Float();

View File

@@ -35,7 +35,6 @@ import javax.swing.JViewport;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicBorders;
import javax.swing.text.JTextComponent;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.DerivedColor;
@@ -95,12 +94,14 @@ public class FlatBorder
// paint outer border
if( outlineColor != null || isFocused( c ) ) {
float innerWidth = !isCellEditor( c ) && !(c instanceof JScrollPane)
? (outlineColor != null ? innerOutlineWidth : innerFocusWidth)
? (outlineColor != null ? innerOutlineWidth : getInnerFocusWidth( c ))
: 0;
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
focusWidth, borderWidth + scale( innerWidth ), arc );
if( focusWidth > 0 || innerWidth > 0 ) {
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
focusWidth, borderWidth + scale( innerWidth ), arc );
}
}
// paint border
@@ -159,7 +160,7 @@ public class FlatBorder
return false;
}
return c.isEnabled() && (!(c instanceof JTextComponent) || ((JTextComponent)c).isEditable());
return c.isEnabled();
}
protected boolean isFocused( Component c ) {
@@ -236,6 +237,13 @@ public class FlatBorder
return focusWidth;
}
/**
* Returns the (unscaled) thickness of the inner focus border.
*/
protected float getInnerFocusWidth( Component c ) {
return innerFocusWidth;
}
/**
* Returns the (unscaled) line thickness used to compute the border insets.
* This may be different to {@link #getBorderWidth}.

View File

@@ -44,6 +44,7 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Button.default.focusColor Color
* @uiDefault Button.borderWidth int
* @uiDefault Button.default.borderWidth int
* @uiDefault Button.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth
* @uiDefault Button.toolbar.margin Insets
* @uiDefault Button.toolbar.spacingInsets Insets
* @uiDefault Button.arc int
@@ -65,6 +66,7 @@ public class FlatButtonBorder
protected final Color defaultFocusColor = UIManager.getColor( "Button.default.focusColor" );
protected final int borderWidth = UIManager.getInt( "Button.borderWidth" );
protected final int defaultBorderWidth = UIManager.getInt( "Button.default.borderWidth" );
protected final float buttonInnerFocusWidth = FlatUIUtils.getUIFloat( "Button.innerFocusWidth", innerFocusWidth );
protected final Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" );
protected final Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
protected final int arc = UIManager.getInt( "Button.arc" );
@@ -134,6 +136,11 @@ public class FlatButtonBorder
return FlatToggleButtonUI.isTabButton( c ) ? 0 : super.getFocusWidth( c );
}
@Override
protected float getInnerFocusWidth( Component c ) {
return buttonInnerFocusWidth;
}
@Override
protected int getBorderWidth( Component c ) {
return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : borderWidth;

View File

@@ -27,7 +27,6 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicRadioButtonUI;
import com.formdev.flatlaf.icons.FlatCheckBoxIcon;
import com.formdev.flatlaf.util.UIScale;
@@ -58,6 +57,8 @@ public class FlatRadioButtonUI
protected int iconTextGap;
protected Color disabledText;
private Color defaultBackground;
private boolean defaults_initialized = false;
public static ComponentUI createUI( JComponent c ) {
@@ -74,6 +75,8 @@ public class FlatRadioButtonUI
iconTextGap = FlatUIUtils.getUIInt( prefix + "iconTextGap", 4 );
disabledText = UIManager.getColor( prefix + "disabledText" );
defaultBackground = UIManager.getColor( prefix + "background" );
defaults_initialized = true;
}
@@ -120,7 +123,7 @@ public class FlatRadioButtonUI
// - if background was explicitly set to a non-UIResource color
if( !c.isOpaque() &&
((AbstractButton)c).isContentAreaFilled() &&
!(c.getBackground() instanceof UIResource) )
(c.getBackground() != defaultBackground) )
{
g.setColor( c.getBackground() );
g.fillRect( 0, 0, c.getWidth(), c.getHeight() );

View File

@@ -25,7 +25,6 @@ import java.awt.Graphics2D;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.geom.Rectangle2D;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JScrollPane;
import javax.swing.JViewport;
@@ -34,7 +33,6 @@ import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableUI;
import javax.swing.table.TableCellRenderer;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.UIScale;
@@ -137,12 +135,6 @@ public class FlatTableUI
oldIntercellSpacing = table.getIntercellSpacing();
table.setIntercellSpacing( intercellSpacing );
}
// checkbox is non-opaque in FlatLaf and therefore would not paint selection
// --> make checkbox renderer opaque (but opaque in Metal or Windows LaF)
TableCellRenderer booleanRenderer = table.getDefaultRenderer( Boolean.class );
if( booleanRenderer instanceof JCheckBox )
((JCheckBox)booleanRenderer).setOpaque( true );
}
@Override

View File

@@ -16,6 +16,8 @@
package com.formdev.flatlaf.ui;
import static com.formdev.flatlaf.FlatClientProperties.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
@@ -26,7 +28,9 @@ import java.awt.event.MouseListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.CellRendererPane;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTree;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
@@ -145,9 +149,6 @@ public class FlatTreeUI
@Override
protected MouseListener createMouseListener() {
if( !wideSelection )
return super.createMouseListener();
return new BasicTreeUI.MouseHandler() {
@Override
public void mousePressed( MouseEvent e ) {
@@ -165,7 +166,7 @@ public class FlatTreeUI
}
private MouseEvent handleWideMouseEvent( MouseEvent e ) {
if( !tree.isEnabled() || !SwingUtilities.isLeftMouseButton( e ) || e.isConsumed() )
if( !isWideSelection() || !tree.isEnabled() || !SwingUtilities.isLeftMouseButton( e ) || e.isConsumed() )
return e;
int x = e.getX();
@@ -192,18 +193,26 @@ public class FlatTreeUI
@Override
protected PropertyChangeListener createPropertyChangeListener() {
if( !wideSelection )
return super.createPropertyChangeListener();
return new BasicTreeUI.PropertyChangeHandler() {
@Override
public void propertyChange( PropertyChangeEvent e ) {
super.propertyChange( e );
if( e.getSource() == tree && e.getPropertyName() == "dropLocation" ) {
JTree.DropLocation oldValue = (JTree.DropLocation) e.getOldValue();
repaintWideDropLocation( oldValue );
repaintWideDropLocation( tree.getDropLocation() );
if( e.getSource() == tree ) {
switch( e.getPropertyName() ) {
case TREE_WIDE_SELECTION:
case TREE_PAINT_SELECTION:
tree.repaint();
break;
case "dropLocation":
if( isWideSelection() ) {
JTree.DropLocation oldValue = (JTree.DropLocation) e.getOldValue();
repaintWideDropLocation( oldValue );
repaintWideDropLocation( tree.getDropLocation() );
}
break;
}
}
}
@@ -227,34 +236,22 @@ public class FlatTreeUI
TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf )
{
boolean isEditing = (editingComponent != null && editingRow == row);
boolean hasFocus = FlatUIUtils.isPermanentFocusOwner( tree );
boolean cellHasFocus = hasFocus && (row == getLeadSelectionRow());
boolean isSelected = tree.isRowSelected( row );
boolean isDropRow = isDropRow( row );
boolean needsSelectionPainting = (isSelected || isDropRow) && isPaintSelection();
// do not paint row if editing, except if selection needs painted
if( isEditing && !needsSelectionPainting )
return;
boolean hasFocus = FlatUIUtils.isPermanentFocusOwner( tree );
boolean cellHasFocus = hasFocus && (row == getLeadSelectionRow());
// if tree is used as cell renderer in another component (e.g. in Rhino JavaScript debugger),
// check whether that component is focused to get correct selection colors
if( !hasFocus && isSelected && tree.getParent() instanceof CellRendererPane )
hasFocus = FlatUIUtils.isPermanentFocusOwner( tree.getParent().getParent() );
// wide selection background
if( wideSelection && (isSelected || isDropRow) ) {
// fill background
g.setColor( isDropRow
? UIManager.getColor( "Tree.dropCellBackground" )
: (hasFocus ? selectionBackground : selectionInactiveBackground) );
g.fillRect( 0, bounds.y, tree.getWidth(), bounds.height );
// paint expand/collapse icon
if( shouldPaintExpandControl( path, row, isExpanded, hasBeenExpanded, isLeaf ) ) {
paintExpandControl( g, clipBounds, insets, bounds,
path, row, isExpanded, hasBeenExpanded, isLeaf );
}
}
if( isEditing )
return;
// get renderer component
Component rendererComponent = currentCellRenderer.getTreeCellRendererComponent( tree,
path.getLastPathComponent(), isSelected, isExpanded, isLeaf, row, cellHasFocus );
@@ -290,8 +287,51 @@ public class FlatTreeUI
}
}
// paint selection background
if( needsSelectionPainting ) {
// set selection color
Color oldColor = g.getColor();
g.setColor( isDropRow
? UIManager.getColor( "Tree.dropCellBackground" )
: (rendererComponent instanceof DefaultTreeCellRenderer
? ((DefaultTreeCellRenderer)rendererComponent).getBackgroundSelectionColor()
: (hasFocus ? selectionBackground : selectionInactiveBackground)) );
if( isWideSelection() ) {
// wide selection
g.fillRect( 0, bounds.y, tree.getWidth(), bounds.height );
// paint expand/collapse icon
// (was already painted before, but painted over with wide selection)
if( shouldPaintExpandControl( path, row, isExpanded, hasBeenExpanded, isLeaf ) ) {
paintExpandControl( g, clipBounds, insets, bounds,
path, row, isExpanded, hasBeenExpanded, isLeaf );
}
} else {
// non-wide selection
int xOffset = 0;
int imageOffset = 0;
if( rendererComponent instanceof JLabel ) {
JLabel label = (JLabel) rendererComponent;
Icon icon = label.getIcon();
imageOffset = (icon != null && label.getText() != null)
? icon.getIconWidth() + Math.max( label.getIconTextGap() - 1, 0 )
: 0;
xOffset = label.getComponentOrientation().isLeftToRight() ? imageOffset : 0;
}
g.fillRect( bounds.x + xOffset, bounds.y, bounds.width - imageOffset, bounds.height );
}
// this is actually not necessary because renderer should always set color
// before painting, but doing anyway to avoid any side effect (in bad renderers)
g.setColor( oldColor );
}
// paint renderer
rendererPane.paintComponent( g, rendererComponent, tree, bounds.x, bounds.y, bounds.width, bounds.height, true );
if( !isEditing )
rendererPane.paintComponent( g, rendererComponent, tree, bounds.x, bounds.y, bounds.width, bounds.height, true );
// restore background selection color and border selection color
if( oldBackgroundSelectionColor != null )
@@ -314,6 +354,14 @@ public class FlatTreeUI
@Override
protected Rectangle getDropLineRect( DropLocation loc ) {
Rectangle r = super.getDropLineRect( loc );
return wideSelection ? new Rectangle( 0, r.y, tree.getWidth(), r.height ) : r;
return isWideSelection() ? new Rectangle( 0, r.y, tree.getWidth(), r.height ) : r;
}
protected boolean isWideSelection() {
return clientPropertyBoolean( tree, TREE_WIDE_SELECTION, wideSelection );
}
protected boolean isPaintSelection() {
return clientPropertyBoolean( tree, TREE_PAINT_SELECTION, true );
}
}

View File

@@ -39,6 +39,7 @@ import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import java.util.IdentityHashMap;
import java.util.WeakHashMap;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.swing.JComponent;
import javax.swing.JTable;
@@ -175,8 +176,18 @@ public class FlatUIUtils
* Returns whether the given component is the permanent focus owner and
* is in the active window. Used to paint focus indicators.
*/
@SuppressWarnings( "unchecked" )
public static boolean isPermanentFocusOwner( Component c ) {
KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
if( c instanceof JComponent ) {
Object value = ((JComponent)c).getClientProperty( FlatClientProperties.COMPONENT_FOCUS_OWNER );
if( value instanceof Predicate ) {
return ((Predicate<JComponent>)value).test( (JComponent) c ) &&
keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c );
}
}
return keyboardFocusManager.getPermanentFocusOwner() == c &&
keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c );
}
@@ -334,7 +345,7 @@ public class FlatUIUtils
float innerArc = arc - (lineWidth * 2);
// reduce outer arc slightly for small arcs to make the curve slightly wider
if( arc > 0 && arc < UIScale.scale( 10 ) )
if( focusWidth > 0 && arc > 0 && arc < UIScale.scale( 10 ) )
outerArc -= UIScale.scale( 2f );
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD );

View File

@@ -227,7 +227,6 @@ public class JBRCustomDecorations
private final Color defaultActiveBorder = new Color( 0x707070 );
private final Color inactiveLightColor = new Color( 0xaaaaaa );
private final Color inactiveDarkColor = new Color( 0x3f3f3f );
private boolean colorizationAffectsBorders;
private Color activeColor = defaultActiveBorder;
@@ -273,7 +272,7 @@ public class JBRCustomDecorations
Object colorizationColorBalanceObj = toolkit.getDesktopProperty( "win.dwm.colorizationColorBalance" );
if( colorizationColorBalanceObj instanceof Integer ) {
int colorizationColorBalance = (Integer) colorizationColorBalanceObj;
if( colorizationColorBalance < 0 )
if( colorizationColorBalance < 0 || colorizationColorBalance > 100 )
colorizationColorBalance = 100;
if( colorizationColorBalance == 0 )
@@ -283,9 +282,15 @@ public class JBRCustomDecorations
float alpha = colorizationColorBalance / 100.0f;
float remainder = 1 - alpha;
int r = Math.round( (colorizationColor.getRed() * alpha + 0xD9 * remainder) );
int g = Math.round( (colorizationColor.getGreen() * alpha + 0xD9 * remainder) );
int b = Math.round( (colorizationColor.getBlue() * alpha + 0xD9 * remainder) );
int r = Math.round( colorizationColor.getRed() * alpha + 0xD9 * remainder );
int g = Math.round( colorizationColor.getGreen() * alpha + 0xD9 * remainder );
int b = Math.round( colorizationColor.getBlue() * alpha + 0xD9 * remainder );
// avoid potential IllegalArgumentException in Color constructor
r = Math.min( Math.max( r, 0 ), 255 );
g = Math.min( Math.max( g, 0 ), 255 );
b = Math.min( Math.max( b, 0 ), 255 );
return new Color( r, g, b );
}
return colorizationColor;
@@ -300,7 +305,14 @@ public class JBRCustomDecorations
Window window = SwingUtilities.windowForComponent( c );
boolean active = (window != null) ? window.isActive() : false;
g.setColor( active ? activeColor : (FlatLaf.isLafDark() ? inactiveDarkColor : inactiveLightColor) );
// paint top border
// - in light themes
// - in dark themes only for active windows if colorization affects borders
boolean paintTopBorder = !FlatLaf.isLafDark() || (active && colorizationAffectsBorders);
if( !paintTopBorder )
return;
g.setColor( active ? activeColor : inactiveLightColor );
HiDPIUtils.paintAtScale1x( (Graphics2D) g, x, y, width, height, this::paintImpl );
}

View File

@@ -134,7 +134,7 @@ public class HiDPIUtils
// - fractional scale factors result in fractional component Y device coordinates
// - fractional text Y device coordinates are rounded for horizontal lines of characters
// - maybe different rounding methods for drawing primitives (e.g. rectangle) and text
// - Java adds 0.5 to X/Y positions in before drawing string in BufferedTextPipe.enqueueGlyphList()
// - Java adds 0.5 to X/Y positions before drawing string in BufferedTextPipe.enqueueGlyphList()
// this is not the optimal solution, but works very good in most cases
// (tested with class FlatPaintingStringTest on Windows 10 with font "Segoe UI")

View File

@@ -36,9 +36,14 @@ import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.FlatSystemProperties;
/**
* Two scaling modes are supported for HiDPI displays:
* This class handles scaling in Swing UIs.
* It computes user scaling factor based on font size and
* provides methods to scale integer, float, {@link Dimension} and {@link Insets}.
* This class is look and feel independent.
* <p>
* Two scaling modes are supported by FlatLaf for HiDPI displays:
*
* 1) system scaling mode
* <h3>1) system scaling mode</h3>
*
* This mode is supported since Java 9 on all platforms and in some Java 8 VMs
* (e.g. Apple and JetBrains). The JRE determines the scale factor per-display and
@@ -49,7 +54,7 @@ import com.formdev.flatlaf.FlatSystemProperties;
* The scale factor may be different for each connected display.
* The scale factor may change for a window when moving the window from one display to another one.
*
* 2) user scaling mode
* <h3>2) user scaling mode</h3>
*
* This mode is mainly for Java 8 compatibility, but is also used on Linux
* or if the default font is changed.
@@ -85,6 +90,9 @@ public class UIScale
private static Boolean jreHiDPI;
/**
* Returns whether system scaling is enabled.
*/
public static boolean isSystemScalingEnabled() {
if( jreHiDPI != null )
return jreHiDPI;
@@ -112,10 +120,16 @@ public class UIScale
return jreHiDPI;
}
/**
* Returns the system scale factor for the given graphics context.
*/
public static double getSystemScaleFactor( Graphics2D g ) {
return isSystemScalingEnabled() ? getSystemScaleFactor( g.getDeviceConfiguration() ) : 1;
}
/**
* Returns the system scale factor for the given graphics configuration.
*/
public static double getSystemScaleFactor( GraphicsConfiguration gc ) {
return (isSystemScalingEnabled() && gc != null) ? gc.getDefaultTransform().getScaleX() : 1;
}
@@ -297,11 +311,17 @@ public class UIScale
}
}
/**
* Returns the user scale factor.
*/
public static float getUserScaleFactor() {
initialize();
return scaleFactor;
}
/**
* Sets the user scale factor.
*/
private static void setUserScaleFactor( float scaleFactor ) {
if( scaleFactor <= 1f )
scaleFactor = 1f;
@@ -318,40 +338,65 @@ public class UIScale
changeSupport.firePropertyChange( "userScaleFactor", oldScaleFactor, scaleFactor );
}
/**
* Multiplies the given value by the user scale factor.
*/
public static float scale( float value ) {
initialize();
return (scaleFactor == 1) ? value : (value * scaleFactor);
}
/**
* Multiplies the given value by the user scale factor and rounds the result.
*/
public static int scale( int value ) {
initialize();
return (scaleFactor == 1) ? value : Math.round( value * scaleFactor );
}
/**
* Similar as scale(int) but always "rounds down".
* Similar as {@link #scale(int)} but always "rounds down".
* <p>
* For use in special cases. {@link #scale(int)} is the preferred method.
*/
public static int scale2( int value ) {
initialize();
return (scaleFactor == 1) ? value : (int) (value * scaleFactor);
}
/**
* Divides the given value by the user scale factor.
*/
public static float unscale( float value ) {
initialize();
return (scaleFactor == 1f) ? value : (value / scaleFactor);
}
/**
* Divides the given value by the user scale factor and rounds the result.
*/
public static int unscale( int value ) {
initialize();
return (scaleFactor == 1f) ? value : Math.round( value / scaleFactor );
}
/**
* If user scale factor is not 1, scale the given graphics context by invoking
* {@link Graphics2D#scale(double, double)} with user scale factor.
*/
public static void scaleGraphics( Graphics2D g ) {
initialize();
if( scaleFactor != 1f )
g.scale( scaleFactor, scaleFactor );
}
/**
* Scales the given dimension with the user scale factor.
* <p>
* If user scale factor is 1, then the given dimension is simply returned.
* Otherwise a new instance of {@link Dimension} or {@link DimensionUIResource}
* is returned, depending on whether the passed dimension implements {@link UIResource}.
*/
public static Dimension scale( Dimension dimension ) {
initialize();
return (dimension == null || scaleFactor == 1f)
@@ -361,6 +406,13 @@ public class UIScale
: new Dimension ( scale( dimension.width ), scale( dimension.height ) ));
}
/**
* Scales the given insets with the user scale factor.
* <p>
* If user scale factor is 1, then the given insets is simply returned.
* Otherwise a new instance of {@link Insets} or {@link InsetsUIResource}
* is returned, depending on whether the passed dimension implements {@link UIResource}.
*/
public static Insets scale( Insets insets ) {
initialize();
return (insets == null || scaleFactor == 1f)

View File

@@ -14,15 +14,35 @@
# limitations under the License.
#
#
# This file is loaded for "FlatLaf Darcula" theme (that extend class FlatDarculaLaf)
# and for all dark IntelliJ Platform themes.
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
# This will make upgrading to newer FlatLaf versions complex and error-prone.
# Instead copy and modify only those properties that you need to alter.
#
# Colors and style mostly based on Darcula theme from IntelliJ IDEA Community Edition,
# which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
# See: https://github.com/JetBrains/intellij-community/
#---- Button ----
Button.innerFocusWidth = 0
Button.default.boldText = true
#---- CheckBox ----
CheckBox.icon.focusedBackground = null
#---- Component ----
Component.focusWidth = 2

View File

@@ -14,6 +14,18 @@
# limitations under the License.
#
#
# This file is loaded for all dark themes (that extend class FlatDarkLaf).
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
# This will make upgrading to newer FlatLaf versions complex and error-prone.
# Instead copy and modify only those properties that you need to alter.
#
# Colors and style mostly based on Darcula theme from IntelliJ IDEA Community Edition,
# which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
# See: https://github.com/JetBrains/intellij-community/
@@ -72,6 +84,8 @@ Button.disabledBorderColor = $Button.borderColor
Button.focusedBorderColor = $Component.focusedBorderColor
Button.hoverBorderColor = $Button.focusedBorderColor
Button.innerFocusWidth = 1
Button.default.background = #365880
Button.default.foreground = #bbb
Button.default.hoverBackground = lighten($Button.default.background,3%,derived)
@@ -103,6 +117,7 @@ CheckBox.icon.disabledCheckmarkColor = #606060
# focused
CheckBox.icon.focusedBorderColor = #466D94
CheckBox.icon.focusedBackground = fade($CheckBox.icon.focusedBorderColor,30%)
# hover
CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor

View File

@@ -14,6 +14,19 @@
# limitations under the License.
#
#
# This file is loaded for "FlatLaf IntelliJ" theme (that extend class FlatIntelliJLaf)
# and for all light IntelliJ Platform themes.
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
# This will make upgrading to newer FlatLaf versions complex and error-prone.
# Instead copy and modify only those properties that you need to alter.
#
# Colors and style mostly based on IntelliJ theme from IntelliJ IDEA Community Edition,
# which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
# See: https://github.com/JetBrains/intellij-community/

View File

@@ -14,6 +14,18 @@
# limitations under the License.
#
#
# This file is loaded for all themes.
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
# This will make upgrading to newer FlatLaf versions complex and error-prone.
# Instead copy and modify only those properties that you need to alter.
#
#---- UI delegates ----
ButtonUI = com.formdev.flatlaf.ui.FlatButtonUI
@@ -272,12 +284,15 @@ HelpButton.focusedBorderColor = $CheckBox.icon.focusedBorderColor
HelpButton.hoverBorderColor = $?CheckBox.icon.hoverBorderColor
HelpButton.background = $CheckBox.icon.background
HelpButton.disabledBackground = $CheckBox.icon.disabledBackground
HelpButton.focusedBackground = $?CheckBox.icon.focusedBackground
HelpButton.focusedBackground = $?Button.focusedBackground
HelpButton.hoverBackground = $?CheckBox.icon.hoverBackground
HelpButton.pressedBackground = $?CheckBox.icon.pressedBackground
HelpButton.questionMarkColor = $CheckBox.icon.checkmarkColor
HelpButton.disabledQuestionMarkColor = $CheckBox.icon.disabledCheckmarkColor
HelpButton.borderWidth = $?Button.borderWidth
HelpButton.innerFocusWidth = $?Button.innerFocusWidth
#---- InternalFrame ----

View File

@@ -14,6 +14,18 @@
# limitations under the License.
#
#
# This file is loaded for all light themes (that extend class FlatLightLaf).
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
# This will make upgrading to newer FlatLaf versions complex and error-prone.
# Instead copy and modify only those properties that you need to alter.
#
# Colors and style mostly based on IntelliJ theme from IntelliJ IDEA Community Edition,
# which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
# See: https://github.com/JetBrains/intellij-community/
@@ -73,6 +85,8 @@ Button.disabledBorderColor = $Component.disabledBorderColor
Button.focusedBorderColor = $Component.focusedBorderColor
Button.hoverBorderColor = $Button.focusedBorderColor
Button.innerFocusWidth = 0
Button.default.background = $Button.background
Button.default.foreground = @foreground
Button.default.focusedBackground = $Button.focusedBackground

View File

@@ -14,6 +14,14 @@
# limitations under the License.
#
#
# This file is loaded for all IntelliJ Platform themes.
#
# Documentation:
# - https://www.formdev.com/flatlaf/properties-files/
# - https://www.formdev.com/flatlaf/how-to-customize/
#
#---- Button ----
Button.startBackground = $Button.background

View File

@@ -40,6 +40,9 @@ public class FlatLafDemo
if( SystemInfo.isMacOS && System.getProperty( "apple.laf.useScreenMenuBar" ) == null )
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
if( FlatLafDemo.screenshotsMode && !SystemInfo.isJava_9_orLater && System.getProperty( "flatlaf.uiScale" ) == null )
System.setProperty( "flatlaf.uiScale", "2x" );
SwingUtilities.invokeLater( () -> {
DemoPrefs.init( PREFS_ROOT_PATH );
@@ -61,7 +64,7 @@ public class FlatLafDemo
DemoFrame frame = new DemoFrame();
if( FlatLafDemo.screenshotsMode )
frame.setPreferredSize( new Dimension( 1280, 620 ) );
frame.setPreferredSize( new Dimension( 1660, 840 ) );
// show frame
frame.pack();

View File

@@ -481,6 +481,7 @@ class MoreComponentsPanel
indeterminateCheckBox,
toolTipLabel, toolTip1, toolTip2,
toolBarLabel, toolBar1, toolBar2,
splitPaneLabel, splitPane3,
};
for( Component c : components )

View File

@@ -44,10 +44,12 @@ class NewDialog
}
private void okActionPerformed() {
System.out.println( "ok" );
dispose();
}
private void cancelActionPerformed() {
System.out.println( "cancel" );
dispose();
}

View File

@@ -25,6 +25,8 @@ import javax.swing.*;
import javax.swing.border.*;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.formdev.flatlaf.icons.FlatTabbedPaneCloseIcon;
import net.miginfocom.layout.AC;
import net.miginfocom.layout.ConstraintParser;
import net.miginfocom.swing.*;
/**
@@ -1009,6 +1011,29 @@ class TabsPanel
tabsPopupPolicyButtonGroup.add(popupAsNeededButton);
tabsPopupPolicyButtonGroup.add(popupNeverButton);
// JFormDesigner - End of component initialization //GEN-END:initComponents
if( FlatLafDemo.screenshotsMode ) {
Component[] components = new Component[] {
tabPlacementLabel, tabPlacementToolBar, tabPlacementTabbedPane,
iconBottomTabbedPane, iconTrailingTabbedPane,
alignLeadingTabbedPane, alignTrailingTabbedPane, alignFillTabbedPane,
panel3, separator2, panel4,
};
for( Component c : components )
c.setVisible( false );
// remove gaps
MigLayout layout1 = (MigLayout) panel1.getLayout();
AC rowSpecs1 = ConstraintParser.parseRowConstraints( (String) layout1.getRowConstraints() );
rowSpecs1.gap( "0!", 0, 1 );
layout1.setRowConstraints( rowSpecs1 );
MigLayout layout2 = (MigLayout) panel2.getLayout();
AC rowSpecs2 = ConstraintParser.parseRowConstraints( (String) layout2.getRowConstraints() );
rowSpecs2.gap( "0!", 2, 4, 8 );
layout2.setRowConstraints( rowSpecs2 );
}
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables

View File

@@ -164,14 +164,16 @@ public class FlatTabbedPane
/**
* Returns the height of a tab.
* Returns the minimum height of a tab.
*/
public int getTabHeight() {
return getClientPropertyInt( TABBED_PANE_TAB_HEIGHT, "TabbedPane.tabHeight" );
}
/**
* Specifies the height of a tab.
* Specifies the minimum height of a tab.
*
* @see #setTabInsets(Insets)
*/
public void setTabHeight( int tabHeight ) {
putClientProperty( TABBED_PANE_TAB_HEIGHT, (tabHeight >= 0) ? tabHeight : null );
@@ -187,6 +189,8 @@ public class FlatTabbedPane
/**
* Specifies the insets of a tab.
*
* @see #setTabHeight(int)
*/
public void setTabInsets( Insets tabInsets ) {
putClientProperty( TABBED_PANE_TAB_INSETS, tabInsets );
@@ -203,6 +207,8 @@ public class FlatTabbedPane
/**
* Specifies the insets of the tab at the given tab index.
*
* @see #setTabHeight(int)
*/
public void setTabInsets( int tabIndex, Insets tabInsets ) {
JComponent c = (JComponent) getComponentAt( tabIndex );

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2021 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.extras.components;
import static com.formdev.flatlaf.FlatClientProperties.*;
import javax.swing.JTree;
/**
* Subclass of {@link JTree} that provides easy access to FlatLaf specific client properties.
*
*/
public class FlatTree
extends JTree
implements FlatComponentExtension
{
/**
* Returns if the tree shows a wide selection
*/
public boolean isWideSelection() {
return getClientPropertyBoolean( TREE_WIDE_SELECTION, "Tree.wideSelection" );
}
/**
* Sets if the tree shows a wide selection
*/
public void setWideSelection( boolean wideSelection ) {
putClientProperty( TREE_WIDE_SELECTION, wideSelection );
}
/**
* Returns whether tree item selection is painted. Default is {@code true}.
* If set to {@code false}, then the tree cell renderer is responsible for painting selection.
*/
public boolean isPaintSelection() {
return getClientPropertyBoolean( TREE_PAINT_SELECTION, true );
}
/**
* Specifies whether tree item selection is painted. Default is {@code true}.
* If set to {@code false}, then the tree cell renderer is responsible for painting selection.
*/
public void setPaintSelection( boolean paintSelection ) {
putClientProperty( TREE_PAINT_SELECTION, paintSelection );
}
}

View File

@@ -6,6 +6,7 @@ This addon for FlatLaf adds support for **some**
Following JIDE Common Layer components are currently supported by this addon:
- `JidePopupMenu`
- `JideTabbedPane`
- `RangeSlider`
- `TristateCheckBox`

View File

@@ -0,0 +1,39 @@
/*
* Copyright 2021 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.jideoss.ui;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import com.formdev.flatlaf.ui.FlatPopupMenuUI;
import com.jidesoft.plaf.basic.BasicJidePopupMenuUI;
/**
* Provides the Flat LaF UI delegate for {@link com.jidesoft.swing.JidePopupMenu}.
*/
public class FlatJidePopupMenuUI
extends FlatPopupMenuUI
{
public static ComponentUI createUI( JComponent c ) {
return new FlatJidePopupMenuUI();
}
@Override
public Popup getPopup( JPopupMenu popupMenu, int x, int y ) {
Popup popup = BasicJidePopupMenuUI.addScrollPaneIfNecessary( popupMenu, x, y );
return popup == null ? super.getPopup( popupMenu, x, y ) : popup;
}
}

View File

@@ -16,6 +16,7 @@
#---- UI delegates ----
JidePopupMenuUI = com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
JideTabbedPaneUI = com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPaneUI
RangeSliderUI = com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI

View File

@@ -10,6 +10,11 @@
- Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatButtonBorder [UI]
+ Button.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatButtonBorder [UI]
- Button.innerFocusWidth 1
+ Button.innerFocusWidth 0
- CheckBox.icon.focusedBackground #4d466d94 javax.swing.plaf.ColorUIResource [UI]
- ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
+ ComboBox.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
@@ -31,6 +36,9 @@
- HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI]
+ HelpButton.icon [lazy] 26,26 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI]
- HelpButton.innerFocusWidth 1
+ HelpButton.innerFocusWidth 0
- JXDatePicker.border [lazy] 1,1,1,1 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI]
+ JXDatePicker.border [lazy] 3,3,3,3 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI]

View File

@@ -89,6 +89,7 @@ Button.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #53585a com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse)
Button.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
Button.iconTextGap 4
Button.innerFocusWidth 1
Button.light #313131 javax.swing.plaf.ColorUIResource [UI]
Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI]
Button.minimumWidth 72
@@ -126,6 +127,7 @@ CheckBox.icon.checkmarkColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.disabledBorderColor #545556 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.disabledCheckmarkColor #606060 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.focusedBackground #4d466d94 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
CheckBox.icon.hoverBackground #4a5152 com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse)
CheckBox.icon.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
@@ -326,6 +328,7 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI
HelpButton.background #43494a javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderColor #6b6b6b javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderWidth 1
HelpButton.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledBorderColor #545556 javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledQuestionMarkColor #606060 javax.swing.plaf.ColorUIResource [UI]
@@ -333,6 +336,7 @@ HelpButton.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
HelpButton.hoverBackground #4a5152 com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse)
HelpButton.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI]
HelpButton.innerFocusWidth 1
HelpButton.pressedBackground #52595a com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
HelpButton.questionMarkColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI]
@@ -437,6 +441,11 @@ JXTitledPanel.titleBackground #4c5052 javax.swing.plaf.ColorUIResource [UI]
JXTitledPanel.titleForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
#---- JidePopupMenu ----
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
#---- JideTabbedPane ----
JideTabbedPane.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -90,6 +90,7 @@ Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
Button.hoverBorderColor #87afda javax.swing.plaf.ColorUIResource [UI]
Button.iconTextGap 4
Button.innerFocusWidth 0
Button.light #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI]
Button.minimumWidth 72
@@ -331,6 +332,7 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI
HelpButton.background #ffffff javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderColor #b0b0b0 javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderWidth 1
HelpButton.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledBorderColor #bdbdbd javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledQuestionMarkColor #ababab javax.swing.plaf.ColorUIResource [UI]
@@ -339,6 +341,7 @@ HelpButton.focusedBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI]
HelpButton.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
HelpButton.hoverBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI]
HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI]
HelpButton.innerFocusWidth 0
HelpButton.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
HelpButton.questionMarkColor #4f9ee3 javax.swing.plaf.ColorUIResource [UI]
@@ -443,6 +446,11 @@ JXTitledPanel.titleBackground #dfdfdf javax.swing.plaf.ColorUIResource [UI]
JXTitledPanel.titleForeground #222222 javax.swing.plaf.ColorUIResource [UI]
#---- JidePopupMenu ----
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
#---- JideTabbedPane ----
JideTabbedPane.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -7,8 +7,10 @@ OS Windows 10
#---- Button ----
Button.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
Button.focusInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
ENTER pressed
SPACE pressed
released ENTER released
released SPACE released

View File

@@ -92,6 +92,7 @@ Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
Button.hoverBackground #ffff00 javax.swing.plaf.ColorUIResource [UI]
Button.hoverBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI]
Button.iconTextGap 4
Button.innerFocusWidth 1
Button.light #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI]
Button.minimumWidth 72
@@ -319,6 +320,7 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI
HelpButton.background #ffffff javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderColor #878787 javax.swing.plaf.ColorUIResource [UI]
HelpButton.borderWidth 1
HelpButton.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledBorderColor #bdbdbd javax.swing.plaf.ColorUIResource [UI]
HelpButton.disabledQuestionMarkColor #ababab javax.swing.plaf.ColorUIResource [UI]
@@ -327,6 +329,7 @@ HelpButton.focusedBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI]
HelpButton.hoverBackground #ffff00 javax.swing.plaf.ColorUIResource [UI]
HelpButton.hoverBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI]
HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI]
HelpButton.innerFocusWidth 1
HelpButton.pressedBackground #ffc800 javax.swing.plaf.ColorUIResource [UI]
HelpButton.questionMarkColor #0000ff javax.swing.plaf.ColorUIResource [UI]
@@ -431,6 +434,11 @@ JXTitledPanel.titleBackground #ffff00 javax.swing.plaf.ColorUIResource [UI]
JXTitledPanel.titleForeground #ff00ff javax.swing.plaf.ColorUIResource [UI]
#---- JidePopupMenu ----
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
#---- JideTabbedPane ----
JideTabbedPane.background #ccffcc javax.swing.plaf.ColorUIResource [UI]

View File

@@ -0,0 +1,844 @@
Class javax.swing.plaf.nimbus.NimbusLookAndFeel
ID Nimbus
Name Nimbus
Java 1.8.0_202
OS Linux
#---- Button ----
Button.focusInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
ENTER pressed
SPACE pressed
released ENTER released
released SPACE released
#---- CheckBox ----
CheckBox.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ComboBox ----
ComboBox.ancestorInputMap [lazy] 15 javax.swing.plaf.InputMapUIResource [UI]
alt DOWN togglePopup
alt KP_DOWN togglePopup
alt KP_UP togglePopup
alt UP togglePopup
DOWN selectNext
END endPassThrough
ENTER enterPressed
ESCAPE hidePopup
HOME homePassThrough
KP_DOWN selectNext
KP_UP selectPrevious
PAGE_DOWN pageDownPassThrough
PAGE_UP pageUpPassThrough
SPACE spacePopup
UP selectPrevious
#---- EditorPane ----
EditorPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- FileChooser ----
FileChooser.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
ctrl ENTER approveSelection
BACK_SPACE Go Up
ENTER approveSelection
ESCAPE cancelSelection
F2 editFileName
F5 refresh
#---- FormattedTextField ----
FormattedTextField.focusInputMap [lazy] 44 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN decrement
END caret-end-line
ENTER notify-field-accept
ESCAPE reset-field-edit
HOME caret-begin-line
KP_DOWN decrement
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP increment
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
UP increment
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- List ----
List.focusInputMap.RightToLeft [lazy] 16 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_LEFT selectNextColumnChangeLead
ctrl KP_RIGHT selectPreviousColumnChangeLead
ctrl LEFT selectNextColumnChangeLead
ctrl RIGHT selectPreviousColumnChangeLead
KP_LEFT selectNextColumn
KP_RIGHT selectPreviousColumn
LEFT selectNextColumn
RIGHT selectPreviousColumn
shift ctrl KP_LEFT selectNextColumnExtendSelection
shift ctrl KP_RIGHT selectPreviousColumnExtendSelection
shift ctrl LEFT selectNextColumnExtendSelection
shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnExtendSelection
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnExtendSelection
List.focusInputMap [lazy] 64 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRowChangeLead
ctrl HOME selectFirstRowChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastRow
HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDown
PAGE_UP scrollUp
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastRowExtendSelection
shift HOME selectFirstRowExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift UP selectPreviousRowExtendSelection
#---- PasswordField ----
PasswordField.focusInputMap [lazy] 37 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl C copy-to-clipboard
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-begin-line
ctrl KP_RIGHT caret-end-line
ctrl LEFT caret-begin-line
ctrl RIGHT caret-end-line
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-begin-line
shift ctrl KP_RIGHT selection-end-line
shift ctrl LEFT selection-begin-line
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-end-line
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- PopupMenu ----
PopupMenu.selectedWindowInputMapBindings.RightToLeft length=8 [Ljava.lang.Object;
[0] LEFT
[1] selectChild
[2] KP_LEFT
[3] selectChild
[4] RIGHT
[5] selectParent
[6] KP_RIGHT
[7] selectParent
PopupMenu.selectedWindowInputMapBindings length=22 [Ljava.lang.Object;
[0] ESCAPE
[1] cancel
[2] DOWN
[3] selectNext
[4] KP_DOWN
[5] selectNext
[6] UP
[7] selectPrevious
[8] KP_UP
[9] selectPrevious
[10] LEFT
[11] selectParent
[12] KP_LEFT
[13] selectParent
[14] RIGHT
[15] selectChild
[16] KP_RIGHT
[17] selectChild
[18] ENTER
[19] return
[20] SPACE
[21] return
#---- RadioButton ----
RadioButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- RootPane ----
RootPane.ancestorInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
CONTEXT_MENU postPopup
shift F10 postPopup
#---- ScrollBar ----
ScrollBar.ancestorInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
ScrollBar.ancestorInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
DOWN positiveUnitIncrement
END maxScroll
HOME minScroll
KP_DOWN positiveUnitIncrement
KP_LEFT negativeUnitIncrement
KP_RIGHT positiveUnitIncrement
KP_UP negativeUnitIncrement
LEFT negativeUnitIncrement
PAGE_DOWN positiveBlockIncrement
PAGE_UP negativeBlockIncrement
RIGHT positiveUnitIncrement
UP negativeUnitIncrement
#---- ScrollPane ----
ScrollPane.ancestorInputMap.RightToLeft [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
ctrl PAGE_DOWN scrollLeft
ctrl PAGE_UP scrollRight
ScrollPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl END scrollEnd
ctrl HOME scrollHome
ctrl PAGE_DOWN scrollRight
ctrl PAGE_UP scrollLeft
DOWN unitScrollDown
KP_DOWN unitScrollDown
KP_LEFT unitScrollLeft
KP_RIGHT unitScrollRight
KP_UP unitScrollUp
LEFT unitScrollLeft
PAGE_DOWN scrollDown
PAGE_UP scrollUp
RIGHT unitScrollRight
UP unitScrollUp
#---- Slider ----
Slider.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
Slider.focusInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
DOWN negativeUnitIncrement
END maxScroll
HOME minScroll
KP_DOWN negativeUnitIncrement
KP_LEFT negativeUnitIncrement
KP_RIGHT positiveUnitIncrement
KP_UP positiveUnitIncrement
LEFT negativeUnitIncrement
PAGE_DOWN negativeBlockIncrement
PAGE_UP positiveBlockIncrement
RIGHT positiveUnitIncrement
UP positiveUnitIncrement
#---- Spinner ----
Spinner.ancestorInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
DOWN decrement
KP_DOWN decrement
KP_UP increment
UP increment
#---- SplitPane ----
SplitPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl TAB focusOutForward
DOWN positiveIncrement
END selectMax
F6 toggleFocus
F8 startResize
HOME selectMin
KP_DOWN positiveIncrement
KP_LEFT negativeIncrement
KP_RIGHT positiveIncrement
KP_UP negativeIncrement
LEFT negativeIncrement
RIGHT positiveIncrement
UP negativeIncrement
shift ctrl TAB focusOutBackward
#---- TabbedPane ----
TabbedPane.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_UP requestFocus
ctrl PAGE_DOWN navigatePageDown
ctrl PAGE_UP navigatePageUp
ctrl TAB navigateNext
ctrl UP requestFocus
shift ctrl TAB navigatePrevious
TabbedPane.focusInputMap [lazy] 11 javax.swing.plaf.InputMapUIResource [UI]
ctrl DOWN requestFocusForVisibleComponent
ctrl KP_DOWN requestFocusForVisibleComponent
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
SPACE selectTabWithFocus
UP navigateUp
#---- Table ----
Table.ancestorInputMap.RightToLeft [lazy] 18 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_LEFT selectNextColumnChangeLead
ctrl LEFT selectNextColumnChangeLead
ctrl PAGE_DOWN scrollLeftChangeSelection
ctrl PAGE_UP scrollRightChangeSelection
KP_LEFT selectNextColumn
KP_RIGHT selectPreviousColumn
LEFT selectNextColumn
RIGHT selectPreviousColumn
shift ctrl KP_LEFT selectNextColumnExtendSelection
shift ctrl KP_RIGHT selectPreviousColumnExtendSelection
shift ctrl LEFT selectNextColumnExtendSelection
shift ctrl PAGE_DOWN scrollLeftExtendSelection
shift ctrl PAGE_UP scrollRightExtendSelection
shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnChangeLead
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnChangeLead
Table.ancestorInputMap [lazy] 71 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRow
ctrl HOME selectFirstRow
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollRightChangeSelection
ctrl PAGE_UP scrollLeftChangeSelection
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastColumn
ENTER selectNextRowCell
ESCAPE cancel
F2 startEditing
F8 focusHeader
HOME selectFirstColumn
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
TAB selectNextColumnCell
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollRightExtendSelection
shift ctrl PAGE_UP scrollLeftExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastColumnExtendSelection
shift ENTER selectPreviousRowCell
shift HOME selectFirstColumnExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift TAB selectPreviousColumnCell
shift UP selectPreviousRowExtendSelection
#---- TableHeader ----
TableHeader.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
alt KP_LEFT moveColumnLeft
alt KP_RIGHT moveColumnRight
alt LEFT moveColumnLeft
alt RIGHT moveColumnRight
ESCAPE focusTable
KP_LEFT selectColumnToLeft
KP_RIGHT selectColumnToRight
LEFT selectColumnToLeft
RIGHT selectColumnToRight
SPACE toggleSortOrder
shift alt KP_LEFT resizeLeft
shift alt KP_RIGHT resizeRight
shift alt LEFT resizeLeft
shift alt RIGHT resizeRight
#---- TextArea ----
TextArea.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- TextField ----
TextField.focusInputMap [lazy] 39 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- TextPane ----
TextPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- ToggleButton ----
ToggleButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ToolBar ----
ToolBar.ancestorInputMap [lazy] 8 javax.swing.plaf.InputMapUIResource [UI]
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
UP navigateUp
#---- Tree ----
Tree.ancestorInputMap [lazy] 1 javax.swing.plaf.InputMapUIResource [UI]
ESCAPE cancel
Tree.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT selectChild
KP_RIGHT selectParent
LEFT selectChild
RIGHT selectParent
Tree.focusInputMap [lazy] 60 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextChangeLead
ctrl END selectLastChangeLead
ctrl HOME selectFirstChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextChangeLead
ctrl KP_LEFT scrollLeft
ctrl KP_RIGHT scrollRight
ctrl KP_UP selectPreviousChangeLead
ctrl LEFT scrollLeft
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT scrollRight
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousChangeLead
ctrl V paste
ctrl X cut
BACK_SPACE moveSelectionToParent
COPY copy
CUT cut
DOWN selectNext
END selectLast
F2 startEditing
HOME selectFirst
KP_DOWN selectNext
KP_LEFT selectParent
KP_RIGHT selectChild
KP_UP selectPrevious
LEFT selectParent
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectChild
SPACE addToSelection
UP selectPrevious
shift ctrl DOWN selectNextExtendSelection
shift ctrl END selectLastExtendSelection
shift ctrl HOME selectFirstExtendSelection
shift ctrl KP_DOWN selectNextExtendSelection
shift ctrl KP_UP selectPreviousExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousExtendSelection
shift DELETE cut
shift DOWN selectNextExtendSelection
shift END selectLastExtendSelection
shift HOME selectFirstExtendSelection
shift INSERT paste
shift KP_DOWN selectNextExtendSelection
shift KP_UP selectPreviousExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift SPACE extendTo
shift UP selectPreviousExtendSelection
typed + expand
typed - collapse

View File

@@ -0,0 +1,878 @@
Class javax.swing.plaf.nimbus.NimbusLookAndFeel
ID Nimbus
Name Nimbus
Java 9.0.4
OS Linux
#---- Button ----
Button.focusInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
ENTER pressed
SPACE pressed
released ENTER released
released SPACE released
#---- CheckBox ----
CheckBox.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ComboBox ----
ComboBox.ancestorInputMap [lazy] 15 javax.swing.plaf.InputMapUIResource [UI]
alt DOWN togglePopup
alt KP_DOWN togglePopup
alt KP_UP togglePopup
alt UP togglePopup
DOWN selectNext
END endPassThrough
ENTER enterPressed
ESCAPE hidePopup
HOME homePassThrough
KP_DOWN selectNext
KP_UP selectPrevious
PAGE_DOWN pageDownPassThrough
PAGE_UP pageUpPassThrough
SPACE spacePopup
UP selectPrevious
#---- Desktop ----
Desktop.ancestorInputMap [lazy] 29 javax.swing.plaf.InputMapUIResource [UI]
ctrl alt F6 selectNextFrame
ctrl F10 maximize
ctrl F12 navigateNext
ctrl F4 close
ctrl F5 restore
ctrl F6 selectNextFrame
ctrl F7 move
ctrl F8 resize
ctrl F9 minimize
ctrl TAB selectNextFrame
DOWN down
ESCAPE escape
KP_DOWN down
KP_LEFT left
KP_RIGHT right
KP_UP up
LEFT left
RIGHT right
UP up
shift ctrl alt F6 selectPreviousFrame
shift ctrl F12 navigatePrevious
shift DOWN shrinkDown
shift KP_DOWN shrinkDown
shift KP_LEFT shrinkLeft
shift KP_RIGHT shrinkRight
shift KP_UP shrinkUp
shift LEFT shrinkLeft
shift RIGHT shrinkRight
shift UP shrinkUp
#---- EditorPane ----
EditorPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- FileChooser ----
FileChooser.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
ctrl ENTER approveSelection
BACK_SPACE Go Up
ENTER approveSelection
ESCAPE cancelSelection
F2 editFileName
F5 refresh
#---- FormattedTextField ----
FormattedTextField.focusInputMap [lazy] 44 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN decrement
END caret-end-line
ENTER notify-field-accept
ESCAPE reset-field-edit
HOME caret-begin-line
KP_DOWN decrement
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP increment
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
UP increment
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- List ----
List.focusInputMap.RightToLeft [lazy] 16 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_LEFT selectNextColumnChangeLead
ctrl KP_RIGHT selectPreviousColumnChangeLead
ctrl LEFT selectNextColumnChangeLead
ctrl RIGHT selectPreviousColumnChangeLead
KP_LEFT selectNextColumn
KP_RIGHT selectPreviousColumn
LEFT selectNextColumn
RIGHT selectPreviousColumn
shift ctrl KP_LEFT selectNextColumnExtendSelection
shift ctrl KP_RIGHT selectPreviousColumnExtendSelection
shift ctrl LEFT selectNextColumnExtendSelection
shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnExtendSelection
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnExtendSelection
List.focusInputMap [lazy] 64 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRowChangeLead
ctrl HOME selectFirstRowChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastRow
HOME selectFirstRow
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDown
PAGE_UP scrollUp
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastRowExtendSelection
shift HOME selectFirstRowExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift UP selectPreviousRowExtendSelection
#---- PasswordField ----
PasswordField.focusInputMap [lazy] 37 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl C copy-to-clipboard
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-begin-line
ctrl KP_RIGHT caret-end-line
ctrl LEFT caret-begin-line
ctrl RIGHT caret-end-line
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-begin-line
shift ctrl KP_RIGHT selection-end-line
shift ctrl LEFT selection-begin-line
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-end-line
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- PopupMenu ----
PopupMenu.selectedWindowInputMapBindings.RightToLeft length=8 [Ljava.lang.Object;
[0] LEFT
[1] selectChild
[2] KP_LEFT
[3] selectChild
[4] RIGHT
[5] selectParent
[6] KP_RIGHT
[7] selectParent
PopupMenu.selectedWindowInputMapBindings length=22 [Ljava.lang.Object;
[0] ESCAPE
[1] cancel
[2] DOWN
[3] selectNext
[4] KP_DOWN
[5] selectNext
[6] UP
[7] selectPrevious
[8] KP_UP
[9] selectPrevious
[10] LEFT
[11] selectParent
[12] KP_LEFT
[13] selectParent
[14] RIGHT
[15] selectChild
[16] KP_RIGHT
[17] selectChild
[18] ENTER
[19] return
[20] SPACE
[21] return
#---- RadioButton ----
RadioButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- RootPane ----
RootPane.ancestorInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
CONTEXT_MENU postPopup
shift F10 postPopup
#---- ScrollBar ----
ScrollBar.ancestorInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
ScrollBar.ancestorInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
DOWN positiveUnitIncrement
END maxScroll
HOME minScroll
KP_DOWN positiveUnitIncrement
KP_LEFT negativeUnitIncrement
KP_RIGHT positiveUnitIncrement
KP_UP negativeUnitIncrement
LEFT negativeUnitIncrement
PAGE_DOWN positiveBlockIncrement
PAGE_UP negativeBlockIncrement
RIGHT positiveUnitIncrement
UP negativeUnitIncrement
#---- ScrollPane ----
ScrollPane.ancestorInputMap.RightToLeft [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
ctrl PAGE_DOWN scrollLeft
ctrl PAGE_UP scrollRight
ScrollPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl END scrollEnd
ctrl HOME scrollHome
ctrl PAGE_DOWN scrollRight
ctrl PAGE_UP scrollLeft
DOWN unitScrollDown
KP_DOWN unitScrollDown
KP_LEFT unitScrollLeft
KP_RIGHT unitScrollRight
KP_UP unitScrollUp
LEFT unitScrollLeft
PAGE_DOWN scrollDown
PAGE_UP scrollUp
RIGHT unitScrollRight
UP unitScrollUp
#---- Slider ----
Slider.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT positiveUnitIncrement
KP_RIGHT negativeUnitIncrement
LEFT positiveUnitIncrement
RIGHT negativeUnitIncrement
Slider.focusInputMap [lazy] 12 javax.swing.plaf.InputMapUIResource [UI]
DOWN negativeUnitIncrement
END maxScroll
HOME minScroll
KP_DOWN negativeUnitIncrement
KP_LEFT negativeUnitIncrement
KP_RIGHT positiveUnitIncrement
KP_UP positiveUnitIncrement
LEFT negativeUnitIncrement
PAGE_DOWN negativeBlockIncrement
PAGE_UP positiveBlockIncrement
RIGHT positiveUnitIncrement
UP positiveUnitIncrement
#---- Spinner ----
Spinner.ancestorInputMap [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
DOWN decrement
KP_DOWN decrement
KP_UP increment
UP increment
#---- SplitPane ----
SplitPane.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
ctrl TAB focusOutForward
DOWN positiveIncrement
END selectMax
F6 toggleFocus
F8 startResize
HOME selectMin
KP_DOWN positiveIncrement
KP_LEFT negativeIncrement
KP_RIGHT positiveIncrement
KP_UP negativeIncrement
LEFT negativeIncrement
RIGHT positiveIncrement
UP negativeIncrement
shift ctrl TAB focusOutBackward
#---- TabbedPane ----
TabbedPane.ancestorInputMap [lazy] 6 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_UP requestFocus
ctrl PAGE_DOWN navigatePageDown
ctrl PAGE_UP navigatePageUp
ctrl TAB navigateNext
ctrl UP requestFocus
shift ctrl TAB navigatePrevious
TabbedPane.focusInputMap [lazy] 11 javax.swing.plaf.InputMapUIResource [UI]
ctrl DOWN requestFocusForVisibleComponent
ctrl KP_DOWN requestFocusForVisibleComponent
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
SPACE selectTabWithFocus
UP navigateUp
#---- Table ----
Table.ancestorInputMap.RightToLeft [lazy] 18 javax.swing.plaf.InputMapUIResource [UI]
ctrl KP_LEFT selectNextColumnChangeLead
ctrl LEFT selectNextColumnChangeLead
ctrl PAGE_DOWN scrollLeftChangeSelection
ctrl PAGE_UP scrollRightChangeSelection
KP_LEFT selectNextColumn
KP_RIGHT selectPreviousColumn
LEFT selectNextColumn
RIGHT selectPreviousColumn
shift ctrl KP_LEFT selectNextColumnExtendSelection
shift ctrl KP_RIGHT selectPreviousColumnExtendSelection
shift ctrl LEFT selectNextColumnExtendSelection
shift ctrl PAGE_DOWN scrollLeftExtendSelection
shift ctrl PAGE_UP scrollRightExtendSelection
shift ctrl RIGHT selectPreviousColumnExtendSelection
shift KP_LEFT selectNextColumnExtendSelection
shift KP_RIGHT selectPreviousColumnChangeLead
shift LEFT selectNextColumnExtendSelection
shift RIGHT selectPreviousColumnChangeLead
Table.ancestorInputMap [lazy] 71 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextRowChangeLead
ctrl END selectLastRow
ctrl HOME selectFirstRow
ctrl INSERT copy
ctrl KP_DOWN selectNextRowChangeLead
ctrl KP_LEFT selectPreviousColumnChangeLead
ctrl KP_RIGHT selectNextColumnChangeLead
ctrl KP_UP selectPreviousRowChangeLead
ctrl LEFT selectPreviousColumnChangeLead
ctrl PAGE_DOWN scrollRightChangeSelection
ctrl PAGE_UP scrollLeftChangeSelection
ctrl RIGHT selectNextColumnChangeLead
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousRowChangeLead
ctrl V paste
ctrl X cut
COPY copy
CUT cut
DOWN selectNextRow
END selectLastColumn
ENTER selectNextRowCell
ESCAPE cancel
F2 startEditing
F8 focusHeader
HOME selectFirstColumn
KP_DOWN selectNextRow
KP_LEFT selectPreviousColumn
KP_RIGHT selectNextColumn
KP_UP selectPreviousRow
LEFT selectPreviousColumn
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectNextColumn
SPACE addToSelection
TAB selectNextColumnCell
UP selectPreviousRow
shift ctrl DOWN selectNextRowExtendSelection
shift ctrl END selectLastRowExtendSelection
shift ctrl HOME selectFirstRowExtendSelection
shift ctrl KP_DOWN selectNextRowExtendSelection
shift ctrl KP_LEFT selectPreviousColumnExtendSelection
shift ctrl KP_RIGHT selectNextColumnExtendSelection
shift ctrl KP_UP selectPreviousRowExtendSelection
shift ctrl LEFT selectPreviousColumnExtendSelection
shift ctrl PAGE_DOWN scrollRightExtendSelection
shift ctrl PAGE_UP scrollLeftExtendSelection
shift ctrl RIGHT selectNextColumnExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousRowExtendSelection
shift DELETE cut
shift DOWN selectNextRowExtendSelection
shift END selectLastColumnExtendSelection
shift ENTER selectPreviousRowCell
shift HOME selectFirstColumnExtendSelection
shift INSERT paste
shift KP_DOWN selectNextRowExtendSelection
shift KP_LEFT selectPreviousColumnExtendSelection
shift KP_RIGHT selectNextColumnExtendSelection
shift KP_UP selectPreviousRowExtendSelection
shift LEFT selectPreviousColumnExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift RIGHT selectNextColumnExtendSelection
shift SPACE extendTo
shift TAB selectPreviousColumnCell
shift UP selectPreviousRowExtendSelection
#---- TableHeader ----
TableHeader.ancestorInputMap [lazy] 14 javax.swing.plaf.InputMapUIResource [UI]
alt KP_LEFT moveColumnLeft
alt KP_RIGHT moveColumnRight
alt LEFT moveColumnLeft
alt RIGHT moveColumnRight
ESCAPE focusTable
KP_LEFT selectColumnToLeft
KP_RIGHT selectColumnToRight
LEFT selectColumnToLeft
RIGHT selectColumnToRight
SPACE toggleSortOrder
shift alt KP_LEFT resizeLeft
shift alt KP_RIGHT resizeRight
shift alt LEFT resizeLeft
shift alt RIGHT resizeRight
#---- TextArea ----
TextArea.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- TextField ----
TextField.focusInputMap [lazy] 39 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl H delete-previous
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
END caret-end-line
ENTER notify-field-accept
HOME caret-begin-line
KP_LEFT caret-backward
KP_RIGHT caret-forward
LEFT caret-backward
PASTE paste-from-clipboard
RIGHT caret-forward
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl RIGHT selection-next-word
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift LEFT selection-backward
shift RIGHT selection-forward
#---- TextPane ----
TextPane.focusInputMap [lazy] 61 javax.swing.plaf.InputMapUIResource [UI]
ctrl A select-all
ctrl BACK_SLASH unselect
ctrl BACK_SPACE delete-previous-word
ctrl C copy-to-clipboard
ctrl DELETE delete-next-word
ctrl END caret-end
ctrl H delete-previous
ctrl HOME caret-begin
ctrl INSERT copy-to-clipboard
ctrl KP_LEFT caret-previous-word
ctrl KP_RIGHT caret-next-word
ctrl LEFT caret-previous-word
ctrl RIGHT caret-next-word
ctrl SPACE activate-link-action
ctrl T next-link-action
ctrl V paste-from-clipboard
ctrl X cut-to-clipboard
BACK_SPACE delete-previous
COPY copy-to-clipboard
CUT cut-to-clipboard
DELETE delete-next
DOWN caret-down
END caret-end-line
ENTER insert-break
HOME caret-begin-line
KP_DOWN caret-down
KP_LEFT caret-backward
KP_RIGHT caret-forward
KP_UP caret-up
LEFT caret-backward
PAGE_DOWN page-down
PAGE_UP page-up
PASTE paste-from-clipboard
RIGHT caret-forward
TAB insert-tab
UP caret-up
shift ctrl END selection-end
shift ctrl HOME selection-begin
shift ctrl KP_LEFT selection-previous-word
shift ctrl KP_RIGHT selection-next-word
shift ctrl LEFT selection-previous-word
shift ctrl O toggle-componentOrientation
shift ctrl PAGE_DOWN selection-page-right
shift ctrl PAGE_UP selection-page-left
shift ctrl RIGHT selection-next-word
shift ctrl T previous-link-action
shift BACK_SPACE delete-previous
shift DELETE cut-to-clipboard
shift DOWN selection-down
shift END selection-end-line
shift HOME selection-begin-line
shift INSERT paste-from-clipboard
shift KP_DOWN selection-down
shift KP_LEFT selection-backward
shift KP_RIGHT selection-forward
shift KP_UP selection-up
shift LEFT selection-backward
shift PAGE_DOWN selection-page-down
shift PAGE_UP selection-page-up
shift RIGHT selection-forward
shift UP selection-up
#---- ToggleButton ----
ToggleButton.focusInputMap [lazy] 2 javax.swing.plaf.InputMapUIResource [UI]
SPACE pressed
released SPACE released
#---- ToolBar ----
ToolBar.ancestorInputMap [lazy] 8 javax.swing.plaf.InputMapUIResource [UI]
DOWN navigateDown
KP_DOWN navigateDown
KP_LEFT navigateLeft
KP_RIGHT navigateRight
KP_UP navigateUp
LEFT navigateLeft
RIGHT navigateRight
UP navigateUp
#---- Tree ----
Tree.ancestorInputMap [lazy] 1 javax.swing.plaf.InputMapUIResource [UI]
ESCAPE cancel
Tree.focusInputMap.RightToLeft [lazy] 4 javax.swing.plaf.InputMapUIResource [UI]
KP_LEFT selectChild
KP_RIGHT selectParent
LEFT selectChild
RIGHT selectParent
Tree.focusInputMap [lazy] 60 javax.swing.plaf.InputMapUIResource [UI]
ctrl A selectAll
ctrl BACK_SLASH clearSelection
ctrl C copy
ctrl DOWN selectNextChangeLead
ctrl END selectLastChangeLead
ctrl HOME selectFirstChangeLead
ctrl INSERT copy
ctrl KP_DOWN selectNextChangeLead
ctrl KP_LEFT scrollLeft
ctrl KP_RIGHT scrollRight
ctrl KP_UP selectPreviousChangeLead
ctrl LEFT scrollLeft
ctrl PAGE_DOWN scrollDownChangeLead
ctrl PAGE_UP scrollUpChangeLead
ctrl RIGHT scrollRight
ctrl SLASH selectAll
ctrl SPACE toggleAndAnchor
ctrl UP selectPreviousChangeLead
ctrl V paste
ctrl X cut
BACK_SPACE moveSelectionToParent
COPY copy
CUT cut
DOWN selectNext
END selectLast
F2 startEditing
HOME selectFirst
KP_DOWN selectNext
KP_LEFT selectParent
KP_RIGHT selectChild
KP_UP selectPrevious
LEFT selectParent
PAGE_DOWN scrollDownChangeSelection
PAGE_UP scrollUpChangeSelection
PASTE paste
RIGHT selectChild
SPACE addToSelection
UP selectPrevious
shift ctrl DOWN selectNextExtendSelection
shift ctrl END selectLastExtendSelection
shift ctrl HOME selectFirstExtendSelection
shift ctrl KP_DOWN selectNextExtendSelection
shift ctrl KP_UP selectPreviousExtendSelection
shift ctrl PAGE_DOWN scrollDownExtendSelection
shift ctrl PAGE_UP scrollUpExtendSelection
shift ctrl SPACE moveSelectionTo
shift ctrl UP selectPreviousExtendSelection
shift DELETE cut
shift DOWN selectNextExtendSelection
shift END selectLastExtendSelection
shift HOME selectFirstExtendSelection
shift INSERT paste
shift KP_DOWN selectNextExtendSelection
shift KP_UP selectPreviousExtendSelection
shift PAGE_DOWN scrollDownExtendSelection
shift PAGE_UP scrollUpExtendSelection
shift SPACE extendTo
shift UP selectPreviousExtendSelection
typed + expand
typed - collapse

View File

@@ -0,0 +1,827 @@
JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets dialog,hidemode 3"
"$columnConstraints": "[fill][fill][fill]para[fill][fill]para[fill][fill]para[fill][fill]para[fill][fill]"
"$rowConstraints": "[][][][][][]para[][][][][][][][]para[][][][]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "JButton"
"font": &SwingDerivedFont0 new com.jformdesigner.model.SwingDerivedFont( null, 0, 4, false )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label12"
"text": "JToggleButton"
"font": #SwingDerivedFont0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label32"
"text": "Help Button"
"font": #SwingDerivedFont0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 0 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "regular"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "default"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "default"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label13"
"text": "unsel."
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label14"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label15"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label16"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "regular"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label33"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 10 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton1"
"text": "text"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton7"
"text": "text"
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton4"
"text": "text"
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton10"
"text": "text"
"stateFocused": true
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton5"
"text": "text"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton9"
"text": "text"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton12"
"text": "text"
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton15"
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 2"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton19"
"stateFocused": true
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 10 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton2"
"text": "text"
"stateHover": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton8"
"text": "text"
"stateHover": true
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton5"
"text": "text"
"stateHover": true
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton11"
"text": "text"
"stateHover": true
"stateFocused": true
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton2"
"text": "text"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton6"
"text": "text"
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton10"
"text": "text"
"stateHover": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton13"
"text": "text"
"stateHover": true
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton16"
"stateHover": true
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 3"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton20"
"stateHover": true
"stateFocused": true
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 10 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton3"
"text": "text"
"statePressed": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton9"
"text": "text"
"statePressed": true
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton6"
"text": "text"
"statePressed": true
"stateFocused": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton12"
"text": "text"
"statePressed": true
"stateFocused": true
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton3"
"text": "text"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton7"
"text": "text"
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton11"
"text": "text"
"statePressed": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton14"
"text": "text"
"statePressed": true
"stateSelected": true
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton17"
"statePressed": true
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 4"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton21"
"statePressed": true
"stateFocused": true
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 10 4"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton13"
"text": "text"
"enabled": false
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 5"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton14"
"text": "text"
"enabled": false
"stateDefault": true
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 5"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton4"
"text": "text"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 5"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateToggleButton" ) {
name: "testStateToggleButton8"
"text": "text"
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 5"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateButton" ) {
name: "testStateButton18"
"enabled": false
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 5"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label10"
"text": "raw"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"text": "text"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 6"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestDefaultButton" ) {
name: "testDefaultButton1"
"text": "text"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 6"
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 6"
} )
add( new FormComponent( "javax.swing.JToggleButton" ) {
name: "toggleButton2"
"text": "text"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 6"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button2"
"$client.JComponent.minimumWidth": 0
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 9 6"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7 11 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label22"
"text": "JCheckBox"
"font": #SwingDerivedFont0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 8 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label27"
"text": "JRadioButton"
"font": #SwingDerivedFont0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 8 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label23"
"text": "unsel."
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label28"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label24"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label29"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label25"
"text": "unsel."
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label30"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label26"
"text": "focused"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label31"
"text": "selected"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 9"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label17"
"text": "none"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox8"
"text": "text"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox5"
"text": "text"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox12"
"text": "text"
"stateFocused": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton8"
"text": "text"
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton5"
"text": "text"
"stateFocused": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 10"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton9"
"text": "text"
"stateFocused": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 10"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label18"
"text": "hover"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox2"
"text": "text"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox9"
"text": "text"
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox6"
"text": "text"
"stateFocused": true
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox13"
"text": "text"
"stateFocused": true
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton2"
"text": "text"
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton10"
"text": "text"
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton6"
"text": "text"
"stateFocused": true
"stateHover": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 11"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton11"
"text": "text"
"stateFocused": true
"stateHover": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 11"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label19"
"text": "pressed"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox3"
"text": "text"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox10"
"text": "text"
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox7"
"text": "text"
"stateFocused": true
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox14"
"text": "text"
"stateFocused": true
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton3"
"text": "text"
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton12"
"text": "text"
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton7"
"text": "text"
"stateFocused": true
"statePressed": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 12"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton13"
"text": "text"
"stateFocused": true
"statePressed": true
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 8 12"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label20"
"text": "disabled"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox4"
"text": "text"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateCheckBox" ) {
name: "testStateCheckBox11"
"text": "text"
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton4"
"text": "text"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 13"
} )
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentStateTest$TestStateRadioButton" ) {
name: "testStateRadioButton14"
"text": "text"
"enabled": false
"stateSelected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 13"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label21"
"text": "raw"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 14"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "checkBox1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 14"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "checkBox2"
"text": "text"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 14"
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "radioButton1"
"text": "text"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 14"
} )
add( new FormComponent( "javax.swing.JRadioButton" ) {
name: "radioButton2"
"text": "text"
"selected": true
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 6 14"
} )
add( new FormComponent( "javax.swing.JSeparator" ) {
name: "separator2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 15 11 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label35"
"text": "JTextField"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 16"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 16 2 1"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 16 2 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label38"
"text": "JComboBox"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 17"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox1"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 17 2 1"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox2"
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 17 2 1"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 785, 685 )
} )
}
}

View File

@@ -31,14 +31,22 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeCellRenderer;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.icons.FlatMenuArrowIcon;
import com.formdev.flatlaf.util.UIScale;
import com.jidesoft.swing.*;
import com.jidesoft.swing.CheckBoxTreeCellRenderer;
import com.jidesoft.tree.StyledTreeCellRenderer;
import net.miginfocom.swing.*;
import org.jdesktop.swingx.*;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.JXTreeTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -47,6 +55,7 @@ import org.jdesktop.swingx.decorator.Highlighter;
import org.jdesktop.swingx.decorator.HighlighterFactory;
import org.jdesktop.swingx.decorator.PatternPredicate;
import org.jdesktop.swingx.decorator.ShadingColorHighlighter;
import org.jdesktop.swingx.renderer.DefaultTreeRenderer;
import org.jdesktop.swingx.treetable.FileSystemModel;
/**
@@ -66,6 +75,7 @@ public class FlatComponents2Test
private final TestListModel listModel;
private final TestTreeModel treeModel;
private final TestTableModel tableModel;
private final JTree[] allTrees;
private final List<JTable> allTables = new ArrayList<>();
private final List<JTable> allTablesInclRowHeader = new ArrayList<>();
private JTable rowHeaderTable1;
@@ -73,6 +83,10 @@ public class FlatComponents2Test
FlatComponents2Test() {
initComponents();
treeWideSelectionCheckBox.setSelected( UIManager.getBoolean( "Tree.wideSelection" ) );
allTrees = new JTree[] { tree1, tree2, xTree1, checkBoxTree1 };
// list model
listModel = new TestListModel( (Integer) listRowCountSpinner.getValue() );
list1.setModel( listModel );
@@ -80,8 +94,8 @@ public class FlatComponents2Test
// tree model
treeModel = new TestTreeModel( (Integer) treeRowCountSpinner.getValue() );
tree1.setModel( treeModel );
tree2.setModel( treeModel );
for( JTree tree : allTrees )
tree.setModel( treeModel );
// table model
tableModel = new TestTableModel( (Integer) tableRowCountSpinner.getValue() );
@@ -109,8 +123,8 @@ public class FlatComponents2Test
allTables.add( xTreeTable1 );
allTablesInclRowHeader.addAll( allTables );
expandTree( tree1 );
expandTree( tree2 );
for( JTree tree : allTrees )
expandTree( tree );
}
private void initTableEditors( JTable table ) {
@@ -302,6 +316,57 @@ public class FlatComponents2Test
}
}
private void treeRendererChanged() {
Object sel = treeRendererComboBox.getSelectedItem();
if( !(sel instanceof String) )
return;
JTree[] trees = new JTree[] { tree1, tree2, xTree1 };
switch( (String) sel ) {
case "default":
for( JTree tree : trees )
tree.setCellRenderer( new DefaultTreeCellRenderer() );
break;
case "defaultSubclass":
for( JTree tree : trees )
tree.setCellRenderer( new TestDefaultTreeCellRenderer() );
break;
case "label":
for( JTree tree : trees )
tree.setCellRenderer( new TestLabelTreeCellRenderer() );
break;
case "swingxDefault":
for( JTree tree : trees )
tree.setCellRenderer( new DefaultTreeRenderer() );
break;
case "jideCheckBox":
for( JTree tree : trees )
tree.setCellRenderer( new CheckBoxTreeCellRenderer( new DefaultTreeCellRenderer() ) );
break;
case "jideStyled":
for( JTree tree : trees )
tree.setCellRenderer( new StyledTreeCellRenderer() );
break;
}
}
private void treeWideSelectionChanged() {
boolean wideSelection = treeWideSelectionCheckBox.isSelected();
for( JTree tree : allTrees )
tree.putClientProperty( FlatClientProperties.TREE_WIDE_SELECTION, wideSelection );
}
private void treePaintSelectionChanged() {
boolean paintSelection = treePaintSelectionCheckBox.isSelected();
for( JTree tree : allTrees )
tree.putClientProperty( FlatClientProperties.TREE_PAINT_SELECTION, paintSelection );
}
@Override
public void applyComponentOrientation( ComponentOrientation o ) {
super.applyComponentOrientation( o );
@@ -328,11 +393,9 @@ public class FlatComponents2Test
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JLabel textFieldLabel = new JLabel();
JTextField textField1 = new JTextField();
JTextField textField2 = new JTextField();
JTextField textField3 = new JTextField();
JTextField textField4 = new JTextField();
JPanel panel1 = new JPanel();
JLabel listLabel = new JLabel();
JLabel listRowCountLabel = new JLabel();
@@ -341,6 +404,12 @@ public class FlatComponents2Test
list1 = new JList<>();
JScrollPane scrollPane2 = new JScrollPane();
list2 = new JList<>();
JPanel panel3 = new JPanel();
JLabel tableLabel = new JLabel();
JLabel tableRowCountLabel = new JLabel();
tableRowCountSpinner = new JSpinner();
table1ScrollPane = new JScrollPane();
table1 = new JTable();
JPanel panel2 = new JPanel();
JLabel treeLabel = new JLabel();
JLabel treeRowCountLabel = new JLabel();
@@ -349,30 +418,38 @@ public class FlatComponents2Test
tree1 = new JTree();
JScrollPane scrollPane4 = new JScrollPane();
tree2 = new JTree();
JPanel panel3 = new JPanel();
JLabel tableLabel = new JLabel();
JLabel tableRowCountLabel = new JLabel();
tableRowCountSpinner = new JSpinner();
table1ScrollPane = new JScrollPane();
table1 = new JTable();
JLabel label1 = new JLabel();
xTable1ScrollPane = new JScrollPane();
xTable1 = new JXTable();
JPanel panel4 = new JPanel();
JLabel label3 = new JLabel();
JLabel label4 = new JLabel();
JLabel label5 = new JLabel();
JScrollPane scrollPane5 = new JScrollPane();
xTree1 = new JXTree();
JScrollPane scrollPane6 = new JScrollPane();
checkBoxTree1 = new CheckBoxTree();
JLabel label2 = new JLabel();
xTreeTable1ScrollPane = new JScrollPane();
xTreeTable1 = new JXTreeTable();
JPanel panel5 = new JPanel();
dndCheckBox = new JCheckBox();
JPanel treeOptionsPanel = new JPanel();
JLabel treeRendererLabel = new JLabel();
treeRendererComboBox = new JComboBox<>();
treeWideSelectionCheckBox = new JCheckBox();
treePaintSelectionCheckBox = new JCheckBox();
JPanel tableOptionsPanel = new JPanel();
JLabel autoResizeModeLabel = new JLabel();
autoResizeModeField = new JComboBox<>();
showHorizontalLinesCheckBox = new JCheckBox();
rowHeaderCheckBox = new JCheckBox();
showVerticalLinesCheckBox = new JCheckBox();
intercellSpacingCheckBox = new JCheckBox();
redGridColorCheckBox = new JCheckBox();
rowSelectionCheckBox = new JCheckBox();
showVerticalLinesCheckBox = new JCheckBox();
columnSelectionCheckBox = new JCheckBox();
dndCheckBox = new JCheckBox();
intercellSpacingCheckBox = new JCheckBox();
rowHeaderCheckBox = new JCheckBox();
redGridColorCheckBox = new JCheckBox();
tableHeaderButtonCheckBox = new JCheckBox();
JLabel label1 = new JLabel();
xTable1ScrollPane = new JScrollPane();
xTable1 = new JXTable();
JLabel label2 = new JLabel();
xTreeTable1ScrollPane = new JScrollPane();
xTreeTable1 = new JXTreeTable();
//======== this ========
setLayout(new MigLayout(
@@ -388,29 +465,21 @@ public class FlatComponents2Test
"[]" +
"[150,grow,sizegroup 1,fill]" +
"[150,grow,sizegroup 1,fill]" +
"[150,grow,sizegroup 1,fill]"));
//---- textFieldLabel ----
textFieldLabel.setText("JTextField:");
add(textFieldLabel, "cell 0 0");
"[150,grow,sizegroup 1,fill]" +
"[fill]"));
//---- textField1 ----
textField1.setText("editable");
textField1.setText("item");
add(textField1, "cell 1 0,growx");
//---- textField2 ----
textField2.setText("disabled");
textField2.setText("item (check vertical text alignment)");
textField2.setEnabled(false);
add(textField2, "cell 2 0,growx");
//---- textField3 ----
textField3.setText("editable");
add(textField3, "cell 4 0,growx");
//---- textField4 ----
textField4.setText("disabled");
textField4.setEnabled(false);
add(textField4, "cell 5 0,growx");
textField3.setText("item");
add(textField3, "cell 4 0 2 1,growx");
//======== panel1 ========
{
@@ -454,52 +523,6 @@ public class FlatComponents2Test
}
add(scrollPane2, "cell 2 1");
//======== panel2 ========
{
panel2.setLayout(new MigLayout(
"insets 0,hidemode 3",
// columns
"[fill]",
// rows
"[]" +
"[grow]" +
"[]" +
"[]"));
//---- treeLabel ----
treeLabel.setText("JTree:");
panel2.add(treeLabel, "cell 0 0,aligny top,growy 0");
//---- treeRowCountLabel ----
treeRowCountLabel.setText("Row count:");
panel2.add(treeRowCountLabel, "cell 0 2");
//---- treeRowCountSpinner ----
treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20));
treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged());
panel2.add(treeRowCountSpinner, "cell 0 3");
}
add(panel2, "cell 3 1");
//======== scrollPane3 ========
{
//---- tree1 ----
tree1.setShowsRootHandles(true);
tree1.setEditable(true);
scrollPane3.setViewportView(tree1);
}
add(scrollPane3, "cell 4 1");
//======== scrollPane4 ========
{
//---- tree2 ----
tree2.setEnabled(false);
scrollPane4.setViewportView(tree2);
}
add(scrollPane4, "cell 5 1");
//======== panel3 ========
{
panel3.setLayout(new MigLayout(
@@ -525,7 +548,7 @@ public class FlatComponents2Test
tableRowCountSpinner.addChangeListener(e -> tableRowCountChanged());
panel3.add(tableRowCountSpinner, "cell 0 3");
}
add(panel3, "cell 0 2");
add(panel3, "cell 3 1");
//======== table1ScrollPane ========
{
@@ -534,29 +557,189 @@ public class FlatComponents2Test
table1.setAutoCreateRowSorter(true);
table1ScrollPane.setViewportView(table1);
}
add(table1ScrollPane, "cell 1 2 2 1,width 300");
add(table1ScrollPane, "cell 4 1 2 1,width 300");
//======== panel2 ========
{
panel2.setLayout(new MigLayout(
"insets 0,hidemode 3",
// columns
"[fill]",
// rows
"[]" +
"[grow]" +
"[]" +
"[]"));
//---- treeLabel ----
treeLabel.setText("JTree:");
panel2.add(treeLabel, "cell 0 0,aligny top,growy 0");
//---- treeRowCountLabel ----
treeRowCountLabel.setText("Row count:");
panel2.add(treeRowCountLabel, "cell 0 2");
//---- treeRowCountSpinner ----
treeRowCountSpinner.setModel(new SpinnerNumberModel(20, 20, null, 20));
treeRowCountSpinner.addChangeListener(e -> treeRowCountChanged());
panel2.add(treeRowCountSpinner, "cell 0 3");
}
add(panel2, "cell 0 2");
//======== scrollPane3 ========
{
//---- tree1 ----
tree1.setShowsRootHandles(true);
tree1.setEditable(true);
scrollPane3.setViewportView(tree1);
}
add(scrollPane3, "cell 1 2");
//======== scrollPane4 ========
{
//---- tree2 ----
tree2.setEnabled(false);
scrollPane4.setViewportView(tree2);
}
add(scrollPane4, "cell 2 2");
//---- label1 ----
label1.setText("JXTable:");
add(label1, "cell 3 2,aligny top,growy 0");
//======== xTable1ScrollPane ========
{
xTable1ScrollPane.setViewportView(xTable1);
}
add(xTable1ScrollPane, "cell 4 2 2 1");
//======== panel4 ========
{
panel4.setLayout(new MigLayout(
"insets 0,hidemode 3",
// columns
"[fill]",
// rows
"[]" +
"[]0" +
"[]"));
//---- label3 ----
label3.setText("JXTree:");
panel4.add(label3, "cell 0 0");
//---- label4 ----
label4.setText("CheckBoxTree:");
panel4.add(label4, "cell 0 1");
//---- label5 ----
label5.setText("(JIDE)");
panel4.add(label5, "cell 0 2");
}
add(panel4, "cell 0 3");
//======== scrollPane5 ========
{
scrollPane5.setViewportView(xTree1);
}
add(scrollPane5, "cell 1 3");
//======== scrollPane6 ========
{
scrollPane6.setViewportView(checkBoxTree1);
}
add(scrollPane6, "cell 2 3");
//---- label2 ----
label2.setText("JXTreeTable:");
add(label2, "cell 3 3,aligny top,growy 0");
//======== xTreeTable1ScrollPane ========
{
xTreeTable1ScrollPane.setViewportView(xTreeTable1);
}
add(xTreeTable1ScrollPane, "cell 4 3 2 1");
//======== panel5 ========
{
panel5.setBorder(new TitledBorder("General Control"));
panel5.setLayout(new MigLayout(
"hidemode 3",
// columns
"[fill]" +
"[fill]",
// rows
"[]"));
//---- dndCheckBox ----
dndCheckBox.setText("enable drag and drop");
dndCheckBox.setMnemonic('D');
dndCheckBox.addActionListener(e -> dndChanged());
panel5.add(dndCheckBox, "cell 0 0");
}
add(panel5, "cell 1 4");
//======== treeOptionsPanel ========
{
treeOptionsPanel.setBorder(new TitledBorder("JTree Control"));
treeOptionsPanel.setLayout(new MigLayout(
"hidemode 3",
// columns
"[fill]",
// rows
"[]" +
"[]0" +
"[]"));
//---- treeRendererLabel ----
treeRendererLabel.setText("Renderer:");
treeOptionsPanel.add(treeRendererLabel, "cell 0 0");
//---- treeRendererComboBox ----
treeRendererComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
"default",
"defaultSubclass",
"label",
"swingxDefault",
"jideCheckBox",
"jideStyled"
}));
treeRendererComboBox.addActionListener(e -> treeRendererChanged());
treeOptionsPanel.add(treeRendererComboBox, "cell 0 0");
//---- treeWideSelectionCheckBox ----
treeWideSelectionCheckBox.setText("wide selection");
treeWideSelectionCheckBox.addActionListener(e -> treeWideSelectionChanged());
treeOptionsPanel.add(treeWideSelectionCheckBox, "cell 0 1");
//---- treePaintSelectionCheckBox ----
treePaintSelectionCheckBox.setText("paint selection");
treePaintSelectionCheckBox.setSelected(true);
treePaintSelectionCheckBox.addActionListener(e -> treePaintSelectionChanged());
treeOptionsPanel.add(treePaintSelectionCheckBox, "cell 0 2");
}
add(treeOptionsPanel, "cell 2 4");
//======== tableOptionsPanel ========
{
tableOptionsPanel.setBorder(new TitledBorder("JTable Control"));
tableOptionsPanel.setLayout(new MigLayout(
"hidemode 3",
// columns
"[]" +
"[]",
"[fill]",
// rows
"[]" +
"[]0" +
"[]0" +
"[]0" +
"[]0" +
"[]0" +
"[]0" +
"[]0" +
"[]"));
"[]0"));
//---- autoResizeModeLabel ----
autoResizeModeLabel.setText("Auto resize mode:");
tableOptionsPanel.add(autoResizeModeLabel, "cell 0 0");
tableOptionsPanel.add(autoResizeModeLabel, "cell 0 0 2 1");
//---- autoResizeModeField ----
autoResizeModeField.setModel(new DefaultComboBoxModel<>(new String[] {
@@ -568,76 +751,50 @@ public class FlatComponents2Test
}));
autoResizeModeField.setSelectedIndex(2);
autoResizeModeField.addActionListener(e -> autoResizeModeChanged());
tableOptionsPanel.add(autoResizeModeField, "cell 1 0");
tableOptionsPanel.add(autoResizeModeField, "cell 0 0 2 1");
//---- showHorizontalLinesCheckBox ----
showHorizontalLinesCheckBox.setText("show horizontal lines");
showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged());
tableOptionsPanel.add(showHorizontalLinesCheckBox, "cell 0 1");
//---- rowHeaderCheckBox ----
rowHeaderCheckBox.setText("row header");
rowHeaderCheckBox.addActionListener(e -> rowHeaderChanged());
tableOptionsPanel.add(rowHeaderCheckBox, "cell 1 1");
//---- rowSelectionCheckBox ----
rowSelectionCheckBox.setText("row selection");
rowSelectionCheckBox.setSelected(true);
rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged());
tableOptionsPanel.add(rowSelectionCheckBox, "cell 1 1");
//---- showVerticalLinesCheckBox ----
showVerticalLinesCheckBox.setText("show vertical lines");
showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged());
tableOptionsPanel.add(showVerticalLinesCheckBox, "cell 0 2");
//---- columnSelectionCheckBox ----
columnSelectionCheckBox.setText("column selection");
columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged());
tableOptionsPanel.add(columnSelectionCheckBox, "cell 1 2");
//---- intercellSpacingCheckBox ----
intercellSpacingCheckBox.setText("intercell spacing");
intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged());
tableOptionsPanel.add(intercellSpacingCheckBox, "cell 0 3");
//---- rowHeaderCheckBox ----
rowHeaderCheckBox.setText("row header");
rowHeaderCheckBox.addActionListener(e -> rowHeaderChanged());
tableOptionsPanel.add(rowHeaderCheckBox, "cell 1 3");
//---- redGridColorCheckBox ----
redGridColorCheckBox.setText("red grid color");
redGridColorCheckBox.addActionListener(e -> redGridColorChanged());
tableOptionsPanel.add(redGridColorCheckBox, "cell 0 4");
//---- rowSelectionCheckBox ----
rowSelectionCheckBox.setText("row selection");
rowSelectionCheckBox.setSelected(true);
rowSelectionCheckBox.addActionListener(e -> rowSelectionChanged());
tableOptionsPanel.add(rowSelectionCheckBox, "cell 0 5");
//---- columnSelectionCheckBox ----
columnSelectionCheckBox.setText("column selection");
columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged());
tableOptionsPanel.add(columnSelectionCheckBox, "cell 0 6");
//---- dndCheckBox ----
dndCheckBox.setText("enable drag and drop");
dndCheckBox.setMnemonic('D');
dndCheckBox.addActionListener(e -> dndChanged());
tableOptionsPanel.add(dndCheckBox, "cell 0 7");
//---- tableHeaderButtonCheckBox ----
tableHeaderButtonCheckBox.setText("show button in table header");
tableHeaderButtonCheckBox.addActionListener(e -> tableHeaderButtonChanged());
tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 0 8 2 1");
tableOptionsPanel.add(tableHeaderButtonCheckBox, "cell 1 4");
}
add(tableOptionsPanel, "cell 4 2 2 1");
//---- label1 ----
label1.setText("JXTable:");
add(label1, "cell 0 3,aligny top,growy 0");
//======== xTable1ScrollPane ========
{
xTable1ScrollPane.setViewportView(xTable1);
}
add(xTable1ScrollPane, "cell 1 3 2 1");
//---- label2 ----
label2.setText("JXTreeTable:");
add(label2, "cell 3 3,aligny top,growy 0");
//======== xTreeTable1ScrollPane ========
{
xTreeTable1ScrollPane.setViewportView(xTreeTable1);
}
add(xTreeTable1ScrollPane, "cell 4 3 2 1");
add(tableOptionsPanel, "cell 4 4 2 1");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}
@@ -645,26 +802,31 @@ public class FlatComponents2Test
private JSpinner listRowCountSpinner;
private JList<String> list1;
private JList<String> list2;
private JSpinner treeRowCountSpinner;
private JTree tree1;
private JTree tree2;
private JSpinner tableRowCountSpinner;
private JScrollPane table1ScrollPane;
private JTable table1;
private JComboBox<String> autoResizeModeField;
private JCheckBox showHorizontalLinesCheckBox;
private JCheckBox rowHeaderCheckBox;
private JCheckBox showVerticalLinesCheckBox;
private JCheckBox intercellSpacingCheckBox;
private JCheckBox redGridColorCheckBox;
private JCheckBox rowSelectionCheckBox;
private JCheckBox columnSelectionCheckBox;
private JCheckBox dndCheckBox;
private JCheckBox tableHeaderButtonCheckBox;
private JSpinner treeRowCountSpinner;
private JTree tree1;
private JTree tree2;
private JScrollPane xTable1ScrollPane;
private JXTable xTable1;
private JXTree xTree1;
private CheckBoxTree checkBoxTree1;
private JScrollPane xTreeTable1ScrollPane;
private JXTreeTable xTreeTable1;
private JCheckBox dndCheckBox;
private JComboBox<String> treeRendererComboBox;
private JCheckBox treeWideSelectionCheckBox;
private JCheckBox treePaintSelectionCheckBox;
private JComboBox<String> autoResizeModeField;
private JCheckBox showHorizontalLinesCheckBox;
private JCheckBox rowSelectionCheckBox;
private JCheckBox showVerticalLinesCheckBox;
private JCheckBox columnSelectionCheckBox;
private JCheckBox intercellSpacingCheckBox;
private JCheckBox rowHeaderCheckBox;
private JCheckBox redGridColorCheckBox;
private JCheckBox tableHeaderButtonCheckBox;
// JFormDesigner - End of variables declaration //GEN-END:variables
private final String[] randomRowStrings = new String[1000];
@@ -1003,4 +1165,31 @@ public class FlatComponents2Test
}
}
}
//---- class TestDefaultTreeCellRenderer ----------------------------------
private static class TestDefaultTreeCellRenderer
extends DefaultTreeCellRenderer
{
public TestDefaultTreeCellRenderer() {
setBackgroundNonSelectionColor( Color.red );
setBackgroundSelectionColor( Color.green );
setTextSelectionColor( Color.blue );
}
}
//---- class TestLabelTreeCellRenderer ------------------------------------
private static class TestLabelTreeCellRenderer
extends JLabel
implements TreeCellRenderer
{
@Override
public Component getTreeCellRendererComponent( JTree tree, Object value, boolean selected, boolean expanded,
boolean leaf, int row, boolean hasFocus )
{
setText( String.valueOf( value ) );
return this;
}
}
}

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.3.0.337" Java: "15" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -9,40 +9,27 @@ new FormModel {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill][fill][200,grow,sizegroup 1,fill][200,grow,sizegroup 1,fill]"
"$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill]"
"$rowConstraints": "[][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][150,grow,sizegroup 1,fill][fill]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "textFieldLabel"
"text": "JTextField:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1"
"text": "editable"
"text": "item"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2"
"text": "disabled"
"text": "item (check vertical text alignment)"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField3"
"text": "editable"
"text": "item"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 0,growx"
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField4"
"text": "disabled"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 0,growx"
"value": "cell 4 0 2 1,growx"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$columnConstraints": "[fill]"
@@ -104,66 +91,6 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[][grow][][]"
} ) {
name: "panel2"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "treeLabel"
"text": "JTree:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0,aligny top,growy 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "treeRowCountLabel"
"text": "Row count:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "treeRowCountSpinner"
"model": new javax.swing.SpinnerNumberModel {
minimum: 20
stepSize: 20
value: 20
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "treeRowCountChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane3"
add( new FormComponent( "javax.swing.JTree" ) {
name: "tree1"
"showsRootHandles": true
"editable": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane4"
add( new FormComponent( "javax.swing.JTree" ) {
name: "tree2"
"enabled": false
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 1"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[fill]"
@@ -197,7 +124,7 @@ new FormModel {
"value": "cell 0 3"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
"value": "cell 3 1"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "table1ScrollPane"
@@ -212,139 +139,73 @@ new FormModel {
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2 2 1,width 300"
"value": "cell 4 1 2 1,width 300"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "hidemode 3"
"$columnConstraints": "[][]"
"$rowConstraints": "[][]0[]0[]0[]0[]0[]0[]0[]"
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[][grow][][]"
} ) {
name: "tableOptionsPanel"
name: "panel2"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "autoResizeModeLabel"
"text": "Auto resize mode:"
name: "treeLabel"
"text": "JTree:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
"value": "cell 0 0,aligny top,growy 0"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "autoResizeModeField"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "off"
addElement( "off" )
addElement( "nextColumn" )
addElement( "subsequentColumns" )
addElement( "lastColumn" )
addElement( "allColumns" )
}
"selectedIndex": 2
auxiliary() {
"JavaCodeGenerator.variableLocal": false
"JavaCodeGenerator.typeParameters": "String"
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "showHorizontalLinesCheckBox"
"text": "show horizontal lines"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "rowHeaderCheckBox"
"text": "row header"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowHeaderChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "showVerticalLinesCheckBox"
"text": "show vertical lines"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "treeRowCountLabel"
"text": "Row count:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "intercellSpacingCheckBox"
"text": "intercell spacing"
add( new FormComponent( "javax.swing.JSpinner" ) {
name: "treeRowCountSpinner"
"model": new javax.swing.SpinnerNumberModel {
minimum: 20
stepSize: 20
value: 20
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) )
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "treeRowCountChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "redGridColorCheckBox"
"text": "red grid color"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane3"
add( new FormComponent( "javax.swing.JTree" ) {
name: "tree1"
"showsRootHandles": true
"editable": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "rowSelectionCheckBox"
"text": "row selection"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 5"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "columnSelectionCheckBox"
"text": "column selection"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 6"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "dndCheckBox"
"text": "enable drag and drop"
"mnemonic": 68
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 7"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "tableHeaderButtonCheckBox"
"text": "show button in table header"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 8 2 1"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 2 2 1"
"value": "cell 1 2"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane4"
add( new FormComponent( "javax.swing.JTree" ) {
name: "tree2"
"enabled": false
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1"
"text": "JXTable:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3,aligny top,growy 0"
"value": "cell 3 2,aligny top,growy 0"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "xTable1ScrollPane"
@@ -358,7 +219,56 @@ new FormModel {
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3 2 1"
"value": "cell 4 2 2 1"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[][]0[]"
} ) {
name: "panel4"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3"
"text": "JXTree:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4"
"text": "CheckBoxTree:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "(JIDE)"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane5"
add( new FormComponent( "org.jdesktop.swingx.JXTree" ) {
name: "xTree1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
name: "scrollPane6"
add( new FormComponent( "com.jidesoft.swing.CheckBoxTree" ) {
name: "checkBoxTree1"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 3"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label2"
@@ -380,9 +290,201 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 3 2 1"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "hidemode 3"
"$columnConstraints": "[fill][fill]"
"$rowConstraints": "[]"
} ) {
name: "panel5"
"border": new javax.swing.border.TitledBorder( "General Control" )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "dndCheckBox"
"text": "enable drag and drop"
"mnemonic": 68
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "dndChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "hidemode 3"
"$columnConstraints": "[fill]"
"$rowConstraints": "[][]0[]"
} ) {
name: "treeOptionsPanel"
"border": new javax.swing.border.TitledBorder( "JTree Control" )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "treeRendererLabel"
"text": "Renderer:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "treeRendererComboBox"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "default"
addElement( "default" )
addElement( "defaultSubclass" )
addElement( "label" )
addElement( "swingxDefault" )
addElement( "jideCheckBox" )
addElement( "jideStyled" )
}
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeRendererChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "treeWideSelectionCheckBox"
"text": "wide selection"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treeWideSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "treePaintSelectionCheckBox"
"text": "paint selection"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "treePaintSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 4"
} )
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "hidemode 3"
"$columnConstraints": "[][fill]"
"$rowConstraints": "[][]0[]0[]0[]0"
} ) {
name: "tableOptionsPanel"
"border": new javax.swing.border.TitledBorder( "JTable Control" )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "autoResizeModeLabel"
"text": "Auto resize mode:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 2 1"
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "autoResizeModeField"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "off"
addElement( "off" )
addElement( "nextColumn" )
addElement( "subsequentColumns" )
addElement( "lastColumn" )
addElement( "allColumns" )
}
"selectedIndex": 2
auxiliary() {
"JavaCodeGenerator.variableLocal": false
"JavaCodeGenerator.typeParameters": "String"
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "autoResizeModeChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0 2 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "showHorizontalLinesCheckBox"
"text": "show horizontal lines"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "rowSelectionCheckBox"
"text": "row selection"
"selected": true
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "showVerticalLinesCheckBox"
"text": "show vertical lines"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 2"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "columnSelectionCheckBox"
"text": "column selection"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "columnSelectionChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 2"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "intercellSpacingCheckBox"
"text": "intercell spacing"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 3"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "rowHeaderCheckBox"
"text": "row header"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "rowHeaderChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 3"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "redGridColorCheckBox"
"text": "red grid color"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 4"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "tableHeaderButtonCheckBox"
"text": "show button in table header"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tableHeaderButtonChanged", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 4 2 1"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 825 )
"size": new java.awt.Dimension( 950, 600 )
} )
}
}

View File

@@ -84,18 +84,27 @@ public class FlatJideOssTest
}
}
private void showJidePopupButtonActionPerformed( ActionEvent e ) {
private void showJidePopup( ActionEvent e ) {
Component invoker = (Component) e.getSource();
JPanel panel = new JPanel( new MigLayout() );
panel.add( new JLabel( "Name:") );
panel.add( new JTextField( 20 ) );
JidePopup popupMenu = new JidePopup();
popupMenu.add( panel );
popupMenu.setDetached( true );
popupMenu.setOwner( invoker );
popupMenu.showPopup();
JidePopup popup = new JidePopup();
popup.add( panel );
popup.setDetached( true );
popup.setOwner( invoker );
popup.showPopup();
}
private void showJidePopupMenu( ActionEvent e ) {
Component invoker = (Component) e.getSource();
JidePopupMenu popupMenu = new JidePopupMenu();
for( int i = 1; i <= 100; i++ )
popupMenu.add( "menu item " + i );
popupMenu.show( invoker, 0, invoker.getHeight() );
}
private void tristateCheckBox1Changed() {
@@ -139,6 +148,8 @@ public class FlatJideOssTest
JPanel panel10 = new JPanel();
JLabel jidePopupLabel = new JLabel();
JButton showJidePopupButton = new JButton();
JLabel jidePopupMenuLabel = new JLabel();
JButton showJidePopupMenuButton = new JButton();
JLabel label9 = new JLabel();
tristateCheckBox1 = new TristateCheckBox();
triStateLabel1 = new JLabel();
@@ -314,6 +325,7 @@ public class FlatJideOssTest
"[fill]",
// rows
"[]" +
"[]" +
"[]"));
//---- jidePopupLabel ----
@@ -322,22 +334,31 @@ public class FlatJideOssTest
//---- showJidePopupButton ----
showJidePopupButton.setText("show JidePopup");
showJidePopupButton.addActionListener(e -> showJidePopupButtonActionPerformed(e));
showJidePopupButton.addActionListener(e -> showJidePopup(e));
panel10.add(showJidePopupButton, "cell 1 0");
//---- jidePopupMenuLabel ----
jidePopupMenuLabel.setText("JidePopupMenu:");
panel10.add(jidePopupMenuLabel, "cell 0 1");
//---- showJidePopupMenuButton ----
showJidePopupMenuButton.setText("show JidePopupMenu");
showJidePopupMenuButton.addActionListener(e -> showJidePopupMenu(e));
panel10.add(showJidePopupMenuButton, "cell 1 1");
//---- label9 ----
label9.setText("TristateCheckBox:");
panel10.add(label9, "cell 0 1");
panel10.add(label9, "cell 0 2");
//---- tristateCheckBox1 ----
tristateCheckBox1.setText("three states");
tristateCheckBox1.addActionListener(e -> tristateCheckBox1Changed());
panel10.add(tristateCheckBox1, "cell 1 1");
panel10.add(tristateCheckBox1, "cell 1 2");
//---- triStateLabel1 ----
triStateLabel1.setText("text");
triStateLabel1.setEnabled(false);
panel10.add(triStateLabel1, "cell 2 1");
panel10.add(triStateLabel1, "cell 2 2");
}
panel9.add(panel10, cc.xy(1, 9));
}

View File

@@ -195,7 +195,7 @@ new FormModel {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 3 0 3 3,hidemode 3"
"$columnConstraints": "[fill][fill][fill]"
"$rowConstraints": "[][]"
"$rowConstraints": "[][][]"
} ) {
name: "panel10"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -207,15 +207,28 @@ new FormModel {
add( new FormComponent( "javax.swing.JButton" ) {
name: "showJidePopupButton"
"text": "show JidePopup"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showJidePopupButtonActionPerformed", true ) )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showJidePopup", true ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "jidePopupMenuLabel"
"text": "JidePopupMenu:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "showJidePopupMenuButton"
"text": "show JidePopupMenu"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showJidePopupMenu", true ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "TristateCheckBox:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 1"
"value": "cell 0 2"
} )
add( new FormComponent( "com.jidesoft.swing.TristateCheckBox" ) {
name: "tristateCheckBox1"
@@ -225,7 +238,7 @@ new FormModel {
}
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tristateCheckBox1Changed", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
"value": "cell 1 2"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "triStateLabel1"
@@ -235,7 +248,7 @@ new FormModel {
"JavaCodeGenerator.variableLocal": false
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
"value": "cell 2 2"
} )
}, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) {
"gridY": 9

View File

@@ -76,6 +76,8 @@ Button.disabledBorderColor = #008
Button.focusedBorderColor = #466d94
Button.hoverBorderColor = #f00
Button.innerFocusWidth = 1
Button.default.startBackground = #ddd
Button.default.endBackground = #888
Button.default.foreground = #800
@@ -149,6 +151,7 @@ DesktopIcon.background = darken($Desktop.background,20%)
#---- HelpButton ----
HelpButton.focusedBackground = #0ff
HelpButton.questionMarkColor = #00f

View File

@@ -39,6 +39,7 @@ Button.highlight
Button.hoverBackground
Button.hoverBorderColor
Button.iconTextGap
Button.innerFocusWidth
Button.light
Button.margin
Button.minimumWidth
@@ -236,6 +237,7 @@ FormattedTextFieldUI
HeaderUI
HelpButton.background
HelpButton.borderColor
HelpButton.borderWidth
HelpButton.disabledBackground
HelpButton.disabledBorderColor
HelpButton.disabledQuestionMarkColor
@@ -244,6 +246,7 @@ HelpButton.focusedBorderColor
HelpButton.hoverBackground
HelpButton.hoverBorderColor
HelpButton.icon
HelpButton.innerFocusWidth
HelpButton.pressedBackground
HelpButton.questionMarkColor
Hyperlink.disabledText
@@ -310,6 +313,7 @@ JXTitledPanel.borderColor
JXTitledPanel.captionInsets
JXTitledPanel.titleBackground
JXTitledPanel.titleForeground
JidePopupMenuUI
JideTabbedPane.background
JideTabbedPane.contentBorderInsets
JideTabbedPane.foreground

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 43 KiB