mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
Testing: introduced FlatTestEnumSelector (a toolbar with a single button group) for easier testing
This commit is contained in:
@@ -521,26 +521,27 @@ public class FlatContainerTest
|
|||||||
htmlTabsCheckBox = new JCheckBox();
|
htmlTabsCheckBox = new JCheckBox();
|
||||||
multiLineTabsCheckBox = new JCheckBox();
|
multiLineTabsCheckBox = new JCheckBox();
|
||||||
JLabel tabsPopupPolicyLabel = new JLabel();
|
JLabel tabsPopupPolicyLabel = new JLabel();
|
||||||
tabsPopupPolicyField = new FlatTestEnumComboBox<>();
|
tabsPopupPolicyField = new FlatTestEnumSelector<>();
|
||||||
tabBackForegroundCheckBox = new JCheckBox();
|
tabBackForegroundCheckBox = new JCheckBox();
|
||||||
JLabel scrollButtonsPolicyLabel = new JLabel();
|
JLabel scrollButtonsPolicyLabel = new JLabel();
|
||||||
scrollButtonsPolicyField = new FlatTestEnumComboBox<>();
|
scrollButtonsPolicyField = new FlatTestEnumSelector<>();
|
||||||
tabIconsCheckBox = new JCheckBox();
|
tabIconsCheckBox = new JCheckBox();
|
||||||
tabIconSizeSpinner = new JSpinner();
|
tabIconSizeSpinner = new JSpinner();
|
||||||
iconPlacementField = new FlatTestEnumComboBox<>();
|
iconPlacementField = new FlatTestEnumSelector<>();
|
||||||
JLabel scrollButtonsPlacementLabel = new JLabel();
|
JLabel scrollButtonsPlacementLabel = new JLabel();
|
||||||
scrollButtonsPlacementField = new FlatTestEnumComboBox<>();
|
scrollButtonsPlacementField = new FlatTestEnumSelector<>();
|
||||||
tabsClosableCheckBox = new JCheckBox();
|
tabsClosableCheckBox = new JCheckBox();
|
||||||
JLabel tabPlacementLabel = new JLabel();
|
JLabel tabPlacementLabel = new JLabel();
|
||||||
tabPlacementField = new FlatTestEnumComboBox<>();
|
tabPlacementField = new FlatTestEnumSelector<>();
|
||||||
secondTabClosableCheckBox = new FlatTriStateCheckBox();
|
secondTabClosableCheckBox = new FlatTriStateCheckBox();
|
||||||
JLabel tabAreaAlignmentLabel = new JLabel();
|
JLabel tabAreaAlignmentLabel = new JLabel();
|
||||||
tabAreaAlignmentField = new FlatTestEnumComboBox<>();
|
tabAreaAlignmentField = new FlatTestEnumSelector<>();
|
||||||
tabAlignmentField = new FlatTestEnumComboBox<>();
|
|
||||||
JLabel tabWidthModeLabel = new JLabel();
|
JLabel tabWidthModeLabel = new JLabel();
|
||||||
tabWidthModeField = new FlatTestEnumComboBox<>();
|
tabWidthModeField = new FlatTestEnumSelector<>();
|
||||||
|
JLabel tabAlignmentLabel = new JLabel();
|
||||||
|
tabAlignmentField = new FlatTestEnumSelector<>();
|
||||||
JLabel tabTypeLabel = new JLabel();
|
JLabel tabTypeLabel = new JLabel();
|
||||||
tabTypeComboBox = new FlatTestEnumComboBox<>();
|
tabTypeComboBox = new FlatTestEnumSelector<>();
|
||||||
leadingComponentCheckBox = new JCheckBox();
|
leadingComponentCheckBox = new JCheckBox();
|
||||||
customBorderCheckBox = new JCheckBox();
|
customBorderCheckBox = new JCheckBox();
|
||||||
tabAreaInsetsCheckBox = new JCheckBox();
|
tabAreaInsetsCheckBox = new JCheckBox();
|
||||||
@@ -663,7 +664,8 @@ public class FlatContainerTest
|
|||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
"[]" +
|
"[]" +
|
||||||
"[fill]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[]",
|
"[]",
|
||||||
// rows
|
// rows
|
||||||
"[center]" +
|
"[center]" +
|
||||||
@@ -672,6 +674,7 @@ public class FlatContainerTest
|
|||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[]para" +
|
"[]para" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]para" +
|
"[]para" +
|
||||||
@@ -693,22 +696,22 @@ public class FlatContainerTest
|
|||||||
//---- tabCountSpinner ----
|
//---- tabCountSpinner ----
|
||||||
tabCountSpinner.setModel(new SpinnerNumberModel(4, 0, null, 1));
|
tabCountSpinner.setModel(new SpinnerNumberModel(4, 0, null, 1));
|
||||||
tabCountSpinner.addChangeListener(e -> tabCountChanged());
|
tabCountSpinner.addChangeListener(e -> tabCountChanged());
|
||||||
tabbedPaneControlPanel.add(tabCountSpinner, "cell 1 0");
|
tabbedPaneControlPanel.add(tabCountSpinner, "cell 1 0,width 80");
|
||||||
|
|
||||||
//---- customTabsCheckBox ----
|
//---- customTabsCheckBox ----
|
||||||
customTabsCheckBox.setText("Custom tabs");
|
customTabsCheckBox.setText("Custom tabs");
|
||||||
customTabsCheckBox.addActionListener(e -> customTabsChanged());
|
customTabsCheckBox.addActionListener(e -> customTabsChanged());
|
||||||
tabbedPaneControlPanel.add(customTabsCheckBox, "cell 2 0");
|
tabbedPaneControlPanel.add(customTabsCheckBox, "cell 2 0 2 1");
|
||||||
|
|
||||||
//---- htmlTabsCheckBox ----
|
//---- htmlTabsCheckBox ----
|
||||||
htmlTabsCheckBox.setText("HTML");
|
htmlTabsCheckBox.setText("HTML");
|
||||||
htmlTabsCheckBox.addActionListener(e -> htmlTabsChanged());
|
htmlTabsCheckBox.addActionListener(e -> htmlTabsChanged());
|
||||||
tabbedPaneControlPanel.add(htmlTabsCheckBox, "cell 2 0");
|
tabbedPaneControlPanel.add(htmlTabsCheckBox, "cell 2 0 2 1");
|
||||||
|
|
||||||
//---- multiLineTabsCheckBox ----
|
//---- multiLineTabsCheckBox ----
|
||||||
multiLineTabsCheckBox.setText("multi-line");
|
multiLineTabsCheckBox.setText("multi-line");
|
||||||
multiLineTabsCheckBox.addActionListener(e -> htmlTabsChanged());
|
multiLineTabsCheckBox.addActionListener(e -> htmlTabsChanged());
|
||||||
tabbedPaneControlPanel.add(multiLineTabsCheckBox, "cell 2 0");
|
tabbedPaneControlPanel.add(multiLineTabsCheckBox, "cell 2 0 2 1");
|
||||||
|
|
||||||
//---- tabsPopupPolicyLabel ----
|
//---- tabsPopupPolicyLabel ----
|
||||||
tabsPopupPolicyLabel.setText("Tabs popup policy:");
|
tabsPopupPolicyLabel.setText("Tabs popup policy:");
|
||||||
@@ -721,7 +724,7 @@ public class FlatContainerTest
|
|||||||
//---- tabBackForegroundCheckBox ----
|
//---- tabBackForegroundCheckBox ----
|
||||||
tabBackForegroundCheckBox.setText("Tab back/foreground");
|
tabBackForegroundCheckBox.setText("Tab back/foreground");
|
||||||
tabBackForegroundCheckBox.addActionListener(e -> tabBackForegroundChanged());
|
tabBackForegroundCheckBox.addActionListener(e -> tabBackForegroundChanged());
|
||||||
tabbedPaneControlPanel.add(tabBackForegroundCheckBox, "cell 2 1");
|
tabbedPaneControlPanel.add(tabBackForegroundCheckBox, "cell 2 1 2 1");
|
||||||
|
|
||||||
//---- scrollButtonsPolicyLabel ----
|
//---- scrollButtonsPolicyLabel ----
|
||||||
scrollButtonsPolicyLabel.setText("Scroll buttons policy:");
|
scrollButtonsPolicyLabel.setText("Scroll buttons policy:");
|
||||||
@@ -734,18 +737,18 @@ public class FlatContainerTest
|
|||||||
//---- tabIconsCheckBox ----
|
//---- tabIconsCheckBox ----
|
||||||
tabIconsCheckBox.setText("Tab icons");
|
tabIconsCheckBox.setText("Tab icons");
|
||||||
tabIconsCheckBox.addActionListener(e -> tabIconsChanged());
|
tabIconsCheckBox.addActionListener(e -> tabIconsChanged());
|
||||||
tabbedPaneControlPanel.add(tabIconsCheckBox, "cell 2 2");
|
tabbedPaneControlPanel.add(tabIconsCheckBox, "cell 2 2 2 1");
|
||||||
|
|
||||||
//---- tabIconSizeSpinner ----
|
//---- tabIconSizeSpinner ----
|
||||||
tabIconSizeSpinner.setModel(new SpinnerListModel(new String[] {"16", "24", "32", "48", "64"}));
|
tabIconSizeSpinner.setModel(new SpinnerListModel(new String[] {"16", "24", "32", "48", "64"}));
|
||||||
tabIconSizeSpinner.setEnabled(false);
|
tabIconSizeSpinner.setEnabled(false);
|
||||||
tabIconSizeSpinner.addChangeListener(e -> tabIconsChanged());
|
tabIconSizeSpinner.addChangeListener(e -> tabIconsChanged());
|
||||||
tabbedPaneControlPanel.add(tabIconSizeSpinner, "cell 2 2");
|
tabbedPaneControlPanel.add(tabIconSizeSpinner, "cell 2 2 2 1");
|
||||||
|
|
||||||
//---- iconPlacementField ----
|
//---- iconPlacementField ----
|
||||||
iconPlacementField.setEnabled(false);
|
iconPlacementField.setEnabled(false);
|
||||||
iconPlacementField.addActionListener(e -> iconPlacementChanged());
|
iconPlacementField.addActionListener(e -> iconPlacementChanged());
|
||||||
tabbedPaneControlPanel.add(iconPlacementField, "cell 2 2");
|
tabbedPaneControlPanel.add(iconPlacementField, "cell 2 2 2 1");
|
||||||
|
|
||||||
//---- scrollButtonsPlacementLabel ----
|
//---- scrollButtonsPlacementLabel ----
|
||||||
scrollButtonsPlacementLabel.setText("Scroll buttons placement:");
|
scrollButtonsPlacementLabel.setText("Scroll buttons placement:");
|
||||||
@@ -758,7 +761,7 @@ public class FlatContainerTest
|
|||||||
//---- tabsClosableCheckBox ----
|
//---- tabsClosableCheckBox ----
|
||||||
tabsClosableCheckBox.setText("Tabs closable");
|
tabsClosableCheckBox.setText("Tabs closable");
|
||||||
tabsClosableCheckBox.addActionListener(e -> tabsClosableChanged());
|
tabsClosableCheckBox.addActionListener(e -> tabsClosableChanged());
|
||||||
tabbedPaneControlPanel.add(tabsClosableCheckBox, "cell 2 3");
|
tabbedPaneControlPanel.add(tabsClosableCheckBox, "cell 2 3 2 1");
|
||||||
|
|
||||||
//---- tabPlacementLabel ----
|
//---- tabPlacementLabel ----
|
||||||
tabPlacementLabel.setText("Tab placement:");
|
tabPlacementLabel.setText("Tab placement:");
|
||||||
@@ -771,110 +774,114 @@ public class FlatContainerTest
|
|||||||
//---- secondTabClosableCheckBox ----
|
//---- secondTabClosableCheckBox ----
|
||||||
secondTabClosableCheckBox.setText("Second Tab closable");
|
secondTabClosableCheckBox.setText("Second Tab closable");
|
||||||
secondTabClosableCheckBox.addActionListener(e -> secondTabClosableChanged());
|
secondTabClosableCheckBox.addActionListener(e -> secondTabClosableChanged());
|
||||||
tabbedPaneControlPanel.add(secondTabClosableCheckBox, "cell 2 4");
|
tabbedPaneControlPanel.add(secondTabClosableCheckBox, "cell 2 4 2 1");
|
||||||
|
|
||||||
//---- tabAreaAlignmentLabel ----
|
//---- tabAreaAlignmentLabel ----
|
||||||
tabAreaAlignmentLabel.setText("Tab area/title alignment:");
|
tabAreaAlignmentLabel.setText("Tab area alignment:");
|
||||||
tabbedPaneControlPanel.add(tabAreaAlignmentLabel, "cell 0 5");
|
tabbedPaneControlPanel.add(tabAreaAlignmentLabel, "cell 0 5");
|
||||||
|
|
||||||
//---- tabAreaAlignmentField ----
|
//---- tabAreaAlignmentField ----
|
||||||
tabAreaAlignmentField.addActionListener(e -> tabAreaAlignmentChanged());
|
tabAreaAlignmentField.addActionListener(e -> tabAreaAlignmentChanged());
|
||||||
tabbedPaneControlPanel.add(tabAreaAlignmentField, "cell 1 5");
|
tabbedPaneControlPanel.add(tabAreaAlignmentField, "cell 1 5");
|
||||||
|
|
||||||
//---- tabAlignmentField ----
|
|
||||||
tabAlignmentField.addActionListener(e -> tabAlignmentChanged());
|
|
||||||
tabbedPaneControlPanel.add(tabAlignmentField, "cell 1 5");
|
|
||||||
|
|
||||||
//---- tabWidthModeLabel ----
|
//---- tabWidthModeLabel ----
|
||||||
tabWidthModeLabel.setText("Tab width mode:");
|
tabWidthModeLabel.setText("Tab width mode:");
|
||||||
tabbedPaneControlPanel.add(tabWidthModeLabel, "cell 2 5");
|
tabbedPaneControlPanel.add(tabWidthModeLabel, "cell 2 5");
|
||||||
|
|
||||||
//---- tabWidthModeField ----
|
//---- tabWidthModeField ----
|
||||||
tabWidthModeField.addActionListener(e -> tabWidthModeChanged());
|
tabWidthModeField.addActionListener(e -> tabWidthModeChanged());
|
||||||
tabbedPaneControlPanel.add(tabWidthModeField, "cell 2 5");
|
tabbedPaneControlPanel.add(tabWidthModeField, "cell 3 5");
|
||||||
|
|
||||||
|
//---- tabAlignmentLabel ----
|
||||||
|
tabAlignmentLabel.setText("Tab title alignment:");
|
||||||
|
tabbedPaneControlPanel.add(tabAlignmentLabel, "cell 0 6");
|
||||||
|
|
||||||
|
//---- tabAlignmentField ----
|
||||||
|
tabAlignmentField.addActionListener(e -> tabAlignmentChanged());
|
||||||
|
tabbedPaneControlPanel.add(tabAlignmentField, "cell 1 6");
|
||||||
|
|
||||||
//---- tabTypeLabel ----
|
//---- tabTypeLabel ----
|
||||||
tabTypeLabel.setText("Tab type:");
|
tabTypeLabel.setText("Tab type:");
|
||||||
tabbedPaneControlPanel.add(tabTypeLabel, "cell 0 6");
|
tabbedPaneControlPanel.add(tabTypeLabel, "cell 0 7");
|
||||||
|
|
||||||
//---- tabTypeComboBox ----
|
//---- tabTypeComboBox ----
|
||||||
tabTypeComboBox.addActionListener(e -> tabTypeChanged());
|
tabTypeComboBox.addActionListener(e -> tabTypeChanged());
|
||||||
tabbedPaneControlPanel.add(tabTypeComboBox, "cell 1 6");
|
tabbedPaneControlPanel.add(tabTypeComboBox, "cell 1 7");
|
||||||
|
|
||||||
//---- leadingComponentCheckBox ----
|
//---- leadingComponentCheckBox ----
|
||||||
leadingComponentCheckBox.setText("Leading component");
|
leadingComponentCheckBox.setText("Leading component");
|
||||||
leadingComponentCheckBox.addActionListener(e -> leadingComponentChanged());
|
leadingComponentCheckBox.addActionListener(e -> leadingComponentChanged());
|
||||||
tabbedPaneControlPanel.add(leadingComponentCheckBox, "cell 0 7");
|
tabbedPaneControlPanel.add(leadingComponentCheckBox, "cell 0 8");
|
||||||
|
|
||||||
//---- customBorderCheckBox ----
|
//---- customBorderCheckBox ----
|
||||||
customBorderCheckBox.setText("Custom border");
|
customBorderCheckBox.setText("Custom border");
|
||||||
customBorderCheckBox.addActionListener(e -> customBorderChanged());
|
customBorderCheckBox.addActionListener(e -> customBorderChanged());
|
||||||
tabbedPaneControlPanel.add(customBorderCheckBox, "cell 1 7");
|
tabbedPaneControlPanel.add(customBorderCheckBox, "cell 1 8");
|
||||||
|
|
||||||
//---- tabAreaInsetsCheckBox ----
|
//---- tabAreaInsetsCheckBox ----
|
||||||
tabAreaInsetsCheckBox.setText("Tab area insets (5,5,10,10)");
|
tabAreaInsetsCheckBox.setText("Tab area insets (5,5,10,10)");
|
||||||
tabAreaInsetsCheckBox.addActionListener(e -> tabAreaInsetsChanged());
|
tabAreaInsetsCheckBox.addActionListener(e -> tabAreaInsetsChanged());
|
||||||
tabbedPaneControlPanel.add(tabAreaInsetsCheckBox, "cell 2 7");
|
tabbedPaneControlPanel.add(tabAreaInsetsCheckBox, "cell 2 8 2 1");
|
||||||
|
|
||||||
//---- trailingComponentCheckBox ----
|
//---- trailingComponentCheckBox ----
|
||||||
trailingComponentCheckBox.setText("Trailing component");
|
trailingComponentCheckBox.setText("Trailing component");
|
||||||
trailingComponentCheckBox.addActionListener(e -> trailingComponentChanged());
|
trailingComponentCheckBox.addActionListener(e -> trailingComponentChanged());
|
||||||
tabbedPaneControlPanel.add(trailingComponentCheckBox, "cell 0 8");
|
tabbedPaneControlPanel.add(trailingComponentCheckBox, "cell 0 9");
|
||||||
|
|
||||||
//---- hasFullBorderCheckBox ----
|
//---- hasFullBorderCheckBox ----
|
||||||
hasFullBorderCheckBox.setText("Show content border");
|
hasFullBorderCheckBox.setText("Show content border");
|
||||||
hasFullBorderCheckBox.addActionListener(e -> hasFullBorderChanged());
|
hasFullBorderCheckBox.addActionListener(e -> hasFullBorderChanged());
|
||||||
tabbedPaneControlPanel.add(hasFullBorderCheckBox, "cell 1 8,alignx left,growx 0");
|
tabbedPaneControlPanel.add(hasFullBorderCheckBox, "cell 1 9,alignx left,growx 0");
|
||||||
|
|
||||||
//---- smallerTabHeightCheckBox ----
|
//---- smallerTabHeightCheckBox ----
|
||||||
smallerTabHeightCheckBox.setText("Smaller tab height (26)");
|
smallerTabHeightCheckBox.setText("Smaller tab height (26)");
|
||||||
smallerTabHeightCheckBox.addActionListener(e -> smallerTabHeightChanged());
|
smallerTabHeightCheckBox.addActionListener(e -> smallerTabHeightChanged());
|
||||||
tabbedPaneControlPanel.add(smallerTabHeightCheckBox, "cell 2 8");
|
tabbedPaneControlPanel.add(smallerTabHeightCheckBox, "cell 2 9 2 1");
|
||||||
|
|
||||||
//---- minimumTabWidthCheckBox ----
|
//---- minimumTabWidthCheckBox ----
|
||||||
minimumTabWidthCheckBox.setText("Minimum tab width (100)");
|
minimumTabWidthCheckBox.setText("Minimum tab width (100)");
|
||||||
minimumTabWidthCheckBox.addActionListener(e -> minimumTabWidthChanged());
|
minimumTabWidthCheckBox.addActionListener(e -> minimumTabWidthChanged());
|
||||||
tabbedPaneControlPanel.add(minimumTabWidthCheckBox, "cell 0 9");
|
tabbedPaneControlPanel.add(minimumTabWidthCheckBox, "cell 0 10");
|
||||||
|
|
||||||
//---- hideContentSeparatorCheckBox ----
|
//---- hideContentSeparatorCheckBox ----
|
||||||
hideContentSeparatorCheckBox.setText("Hide content separator");
|
hideContentSeparatorCheckBox.setText("Hide content separator");
|
||||||
hideContentSeparatorCheckBox.addActionListener(e -> hideContentSeparatorChanged());
|
hideContentSeparatorCheckBox.addActionListener(e -> hideContentSeparatorChanged());
|
||||||
tabbedPaneControlPanel.add(hideContentSeparatorCheckBox, "cell 1 9");
|
tabbedPaneControlPanel.add(hideContentSeparatorCheckBox, "cell 1 10");
|
||||||
|
|
||||||
//---- smallerInsetsCheckBox ----
|
//---- smallerInsetsCheckBox ----
|
||||||
smallerInsetsCheckBox.setText("Smaller tab insets (2,2,2,2)");
|
smallerInsetsCheckBox.setText("Smaller tab insets (2,2,2,2)");
|
||||||
smallerInsetsCheckBox.addActionListener(e -> smallerInsetsChanged());
|
smallerInsetsCheckBox.addActionListener(e -> smallerInsetsChanged());
|
||||||
tabbedPaneControlPanel.add(smallerInsetsCheckBox, "cell 2 9");
|
tabbedPaneControlPanel.add(smallerInsetsCheckBox, "cell 2 10 2 1");
|
||||||
|
|
||||||
//---- maximumTabWidthCheckBox ----
|
//---- maximumTabWidthCheckBox ----
|
||||||
maximumTabWidthCheckBox.setText("Maximum tab width (60)");
|
maximumTabWidthCheckBox.setText("Maximum tab width (60)");
|
||||||
maximumTabWidthCheckBox.addActionListener(e -> maximumTabWidthChanged());
|
maximumTabWidthCheckBox.addActionListener(e -> maximumTabWidthChanged());
|
||||||
tabbedPaneControlPanel.add(maximumTabWidthCheckBox, "cell 0 10");
|
tabbedPaneControlPanel.add(maximumTabWidthCheckBox, "cell 0 11");
|
||||||
|
|
||||||
//---- showTabSeparatorsCheckBox ----
|
//---- showTabSeparatorsCheckBox ----
|
||||||
showTabSeparatorsCheckBox.setText("Show tab separators");
|
showTabSeparatorsCheckBox.setText("Show tab separators");
|
||||||
showTabSeparatorsCheckBox.addActionListener(e -> showTabSeparatorsChanged());
|
showTabSeparatorsCheckBox.addActionListener(e -> showTabSeparatorsChanged());
|
||||||
tabbedPaneControlPanel.add(showTabSeparatorsCheckBox, "cell 1 10");
|
tabbedPaneControlPanel.add(showTabSeparatorsCheckBox, "cell 1 11");
|
||||||
|
|
||||||
//---- secondTabWiderCheckBox ----
|
//---- secondTabWiderCheckBox ----
|
||||||
secondTabWiderCheckBox.setText("Second Tab insets wider (4,20,4,20)");
|
secondTabWiderCheckBox.setText("Second Tab insets wider (4,20,4,20)");
|
||||||
secondTabWiderCheckBox.addActionListener(e -> secondTabWiderChanged());
|
secondTabWiderCheckBox.addActionListener(e -> secondTabWiderChanged());
|
||||||
tabbedPaneControlPanel.add(secondTabWiderCheckBox, "cell 2 10");
|
tabbedPaneControlPanel.add(secondTabWiderCheckBox, "cell 2 11 2 1");
|
||||||
|
|
||||||
//---- hideTabAreaWithOneTabCheckBox ----
|
//---- hideTabAreaWithOneTabCheckBox ----
|
||||||
hideTabAreaWithOneTabCheckBox.setText("Hide tab area with one tab");
|
hideTabAreaWithOneTabCheckBox.setText("Hide tab area with one tab");
|
||||||
hideTabAreaWithOneTabCheckBox.addActionListener(e -> hideTabAreaWithOneTabChanged());
|
hideTabAreaWithOneTabCheckBox.addActionListener(e -> hideTabAreaWithOneTabChanged());
|
||||||
tabbedPaneControlPanel.add(hideTabAreaWithOneTabCheckBox, "cell 1 11");
|
tabbedPaneControlPanel.add(hideTabAreaWithOneTabCheckBox, "cell 1 12");
|
||||||
|
|
||||||
//---- customWheelScrollingCheckBox ----
|
//---- customWheelScrollingCheckBox ----
|
||||||
customWheelScrollingCheckBox.setText("Custom wheel scrolling");
|
customWheelScrollingCheckBox.setText("Custom wheel scrolling");
|
||||||
customWheelScrollingCheckBox.addActionListener(e -> customWheelScrollingChanged());
|
customWheelScrollingCheckBox.addActionListener(e -> customWheelScrollingChanged());
|
||||||
tabbedPaneControlPanel.add(customWheelScrollingCheckBox, "cell 2 11");
|
tabbedPaneControlPanel.add(customWheelScrollingCheckBox, "cell 2 12 2 1");
|
||||||
|
|
||||||
//---- contextMenuCheckBox ----
|
//---- contextMenuCheckBox ----
|
||||||
contextMenuCheckBox.setText("Context menu on tabs");
|
contextMenuCheckBox.setText("Context menu on tabs");
|
||||||
contextMenuCheckBox.addActionListener(e -> contextMenuChanged());
|
contextMenuCheckBox.addActionListener(e -> contextMenuChanged());
|
||||||
tabbedPaneControlPanel.add(contextMenuCheckBox, "cell 2 12");
|
tabbedPaneControlPanel.add(contextMenuCheckBox, "cell 2 13 2 1");
|
||||||
}
|
}
|
||||||
panel9.add(tabbedPaneControlPanel, cc.xywh(1, 11, 3, 1));
|
panel9.add(tabbedPaneControlPanel, cc.xywh(1, 11, 3, 1));
|
||||||
}
|
}
|
||||||
@@ -894,20 +901,20 @@ public class FlatContainerTest
|
|||||||
private JCheckBox customTabsCheckBox;
|
private JCheckBox customTabsCheckBox;
|
||||||
private JCheckBox htmlTabsCheckBox;
|
private JCheckBox htmlTabsCheckBox;
|
||||||
private JCheckBox multiLineTabsCheckBox;
|
private JCheckBox multiLineTabsCheckBox;
|
||||||
private FlatTestEnumComboBox<TabsPopupPolicy> tabsPopupPolicyField;
|
private FlatTestEnumSelector<TabsPopupPolicy> tabsPopupPolicyField;
|
||||||
private JCheckBox tabBackForegroundCheckBox;
|
private JCheckBox tabBackForegroundCheckBox;
|
||||||
private FlatTestEnumComboBox<ScrollButtonsPolicy> scrollButtonsPolicyField;
|
private FlatTestEnumSelector<ScrollButtonsPolicy> scrollButtonsPolicyField;
|
||||||
private JCheckBox tabIconsCheckBox;
|
private JCheckBox tabIconsCheckBox;
|
||||||
private JSpinner tabIconSizeSpinner;
|
private JSpinner tabIconSizeSpinner;
|
||||||
private FlatTestEnumComboBox<TabIconPlacement> iconPlacementField;
|
private FlatTestEnumSelector<TabIconPlacement> iconPlacementField;
|
||||||
private FlatTestEnumComboBox<ScrollButtonsPlacement> scrollButtonsPlacementField;
|
private FlatTestEnumSelector<ScrollButtonsPlacement> scrollButtonsPlacementField;
|
||||||
private JCheckBox tabsClosableCheckBox;
|
private JCheckBox tabsClosableCheckBox;
|
||||||
private FlatTestEnumComboBox<TabPlacement> tabPlacementField;
|
private FlatTestEnumSelector<TabPlacement> tabPlacementField;
|
||||||
private FlatTriStateCheckBox secondTabClosableCheckBox;
|
private FlatTriStateCheckBox secondTabClosableCheckBox;
|
||||||
private FlatTestEnumComboBox<TabAreaAlignment> tabAreaAlignmentField;
|
private FlatTestEnumSelector<TabAreaAlignment> tabAreaAlignmentField;
|
||||||
private FlatTestEnumComboBox<TabAlignment> tabAlignmentField;
|
private FlatTestEnumSelector<TabWidthMode> tabWidthModeField;
|
||||||
private FlatTestEnumComboBox<TabWidthMode> tabWidthModeField;
|
private FlatTestEnumSelector<TabAlignment> tabAlignmentField;
|
||||||
private FlatTestEnumComboBox<TabType> tabTypeComboBox;
|
private FlatTestEnumSelector<TabType> tabTypeComboBox;
|
||||||
private JCheckBox leadingComponentCheckBox;
|
private JCheckBox leadingComponentCheckBox;
|
||||||
private JCheckBox customBorderCheckBox;
|
private JCheckBox customBorderCheckBox;
|
||||||
private JCheckBox tabAreaInsetsCheckBox;
|
private JCheckBox tabAreaInsetsCheckBox;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "8.0.0.0.194" Java: "17.0.2" encoding: "UTF-8"
|
JFDML JFormDesigner: "8.2.0.0.331" Java: "21" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -131,8 +131,8 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestFrame$NoRightToLeftPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestFrame$NoRightToLeftPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "insets 0,hidemode 3"
|
"$layoutConstraints": "insets 0,hidemode 3"
|
||||||
"$columnConstraints": "[][fill][]"
|
"$columnConstraints": "[][][][]"
|
||||||
"$rowConstraints": "[center][][][][][][]para[][]para[][][][]"
|
"$rowConstraints": "[center][][][][][][][]para[][]para[][][][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "tabbedPaneControlPanel"
|
name: "tabbedPaneControlPanel"
|
||||||
"opaque": false
|
"opaque": false
|
||||||
@@ -165,7 +165,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabCountChanged", false ) )
|
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabCountChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0,width 80"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "customTabsCheckBox"
|
name: "customTabsCheckBox"
|
||||||
@@ -175,7 +175,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customTabsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customTabsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0"
|
"value": "cell 2 0 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "htmlTabsCheckBox"
|
name: "htmlTabsCheckBox"
|
||||||
@@ -185,7 +185,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "htmlTabsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "htmlTabsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0"
|
"value": "cell 2 0 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "multiLineTabsCheckBox"
|
name: "multiLineTabsCheckBox"
|
||||||
@@ -195,7 +195,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "htmlTabsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "htmlTabsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0"
|
"value": "cell 2 0 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "tabsPopupPolicyLabel"
|
name: "tabsPopupPolicyLabel"
|
||||||
@@ -203,7 +203,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabsPopupPolicyField"
|
name: "tabsPopupPolicyField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -221,7 +221,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabBackForegroundChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabBackForegroundChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 1"
|
"value": "cell 2 1 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "scrollButtonsPolicyLabel"
|
name: "scrollButtonsPolicyLabel"
|
||||||
@@ -229,7 +229,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "scrollButtonsPolicyField"
|
name: "scrollButtonsPolicyField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -247,7 +247,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabIconsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabIconsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 2"
|
"value": "cell 2 2 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JSpinner" ) {
|
add( new FormComponent( "javax.swing.JSpinner" ) {
|
||||||
name: "tabIconSizeSpinner"
|
name: "tabIconSizeSpinner"
|
||||||
@@ -266,9 +266,9 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabIconsChanged", false ) )
|
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabIconsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 2"
|
"value": "cell 2 2 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "iconPlacementField"
|
name: "iconPlacementField"
|
||||||
"enabled": false
|
"enabled": false
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
@@ -277,7 +277,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "iconPlacementChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "iconPlacementChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 2"
|
"value": "cell 2 2 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "scrollButtonsPlacementLabel"
|
name: "scrollButtonsPlacementLabel"
|
||||||
@@ -285,7 +285,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "scrollButtonsPlacementField"
|
name: "scrollButtonsPlacementField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -303,7 +303,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsClosableChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabsClosableChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 3"
|
"value": "cell 2 3 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "tabPlacementLabel"
|
name: "tabPlacementLabel"
|
||||||
@@ -311,7 +311,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabPlacementField"
|
name: "tabPlacementField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -329,15 +329,15 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "secondTabClosableChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "secondTabClosableChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 4"
|
"value": "cell 2 4 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "tabAreaAlignmentLabel"
|
name: "tabAreaAlignmentLabel"
|
||||||
"text": "Tab area/title alignment:"
|
"text": "Tab area alignment:"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabAreaAlignmentField"
|
name: "tabAreaAlignmentField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -347,23 +347,13 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5"
|
"value": "cell 1 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
|
||||||
name: "tabAlignmentField"
|
|
||||||
auxiliary() {
|
|
||||||
"JavaCodeGenerator.variableLocal": false
|
|
||||||
"JavaCodeGenerator.typeParameters": "TabAlignment"
|
|
||||||
}
|
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAlignmentChanged", false ) )
|
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
|
||||||
"value": "cell 1 5"
|
|
||||||
} )
|
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "tabWidthModeLabel"
|
name: "tabWidthModeLabel"
|
||||||
"text": "Tab width mode:"
|
"text": "Tab width mode:"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 5"
|
"value": "cell 2 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabWidthModeField"
|
name: "tabWidthModeField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -371,15 +361,31 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabWidthModeChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabWidthModeChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 5"
|
"value": "cell 3 5"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "tabAlignmentLabel"
|
||||||
|
"text": "Tab title alignment:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 6"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
|
name: "tabAlignmentField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
"JavaCodeGenerator.typeParameters": "TabAlignment"
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAlignmentChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "tabTypeLabel"
|
name: "tabTypeLabel"
|
||||||
"text": "Tab type:"
|
"text": "Tab type:"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 6"
|
"value": "cell 0 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabTypeComboBox"
|
name: "tabTypeComboBox"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.typeParameters": "TabType"
|
"JavaCodeGenerator.typeParameters": "TabType"
|
||||||
@@ -387,7 +393,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabTypeChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "leadingComponentCheckBox"
|
name: "leadingComponentCheckBox"
|
||||||
@@ -397,7 +403,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "leadingComponentChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "leadingComponentChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 7"
|
"value": "cell 0 8"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "customBorderCheckBox"
|
name: "customBorderCheckBox"
|
||||||
@@ -407,7 +413,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customBorderChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customBorderChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7"
|
"value": "cell 1 8"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "tabAreaInsetsCheckBox"
|
name: "tabAreaInsetsCheckBox"
|
||||||
@@ -417,7 +423,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAreaInsetsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "tabAreaInsetsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 7"
|
"value": "cell 2 8 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "trailingComponentCheckBox"
|
name: "trailingComponentCheckBox"
|
||||||
@@ -427,7 +433,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "trailingComponentChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "trailingComponentChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 8"
|
"value": "cell 0 9"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "hasFullBorderCheckBox"
|
name: "hasFullBorderCheckBox"
|
||||||
@@ -437,7 +443,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hasFullBorderChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hasFullBorderChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 8,alignx left,growx 0"
|
"value": "cell 1 9,alignx left,growx 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "smallerTabHeightCheckBox"
|
name: "smallerTabHeightCheckBox"
|
||||||
@@ -447,7 +453,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "smallerTabHeightChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "smallerTabHeightChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 8"
|
"value": "cell 2 9 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "minimumTabWidthCheckBox"
|
name: "minimumTabWidthCheckBox"
|
||||||
@@ -457,7 +463,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "minimumTabWidthChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "minimumTabWidthChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 9"
|
"value": "cell 0 10"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "hideContentSeparatorCheckBox"
|
name: "hideContentSeparatorCheckBox"
|
||||||
@@ -467,7 +473,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hideContentSeparatorChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hideContentSeparatorChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 9"
|
"value": "cell 1 10"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "smallerInsetsCheckBox"
|
name: "smallerInsetsCheckBox"
|
||||||
@@ -477,7 +483,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "smallerInsetsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "smallerInsetsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 9"
|
"value": "cell 2 10 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "maximumTabWidthCheckBox"
|
name: "maximumTabWidthCheckBox"
|
||||||
@@ -487,7 +493,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "maximumTabWidthChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "maximumTabWidthChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10"
|
"value": "cell 0 11"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "showTabSeparatorsCheckBox"
|
name: "showTabSeparatorsCheckBox"
|
||||||
@@ -497,7 +503,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showTabSeparatorsChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showTabSeparatorsChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 10"
|
"value": "cell 1 11"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "secondTabWiderCheckBox"
|
name: "secondTabWiderCheckBox"
|
||||||
@@ -507,7 +513,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "secondTabWiderChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "secondTabWiderChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 10"
|
"value": "cell 2 11 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "hideTabAreaWithOneTabCheckBox"
|
name: "hideTabAreaWithOneTabCheckBox"
|
||||||
@@ -517,7 +523,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hideTabAreaWithOneTabChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "hideTabAreaWithOneTabChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 11"
|
"value": "cell 1 12"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "customWheelScrollingCheckBox"
|
name: "customWheelScrollingCheckBox"
|
||||||
@@ -527,7 +533,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customWheelScrollingChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "customWheelScrollingChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 11"
|
"value": "cell 2 12 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "contextMenuCheckBox"
|
name: "contextMenuCheckBox"
|
||||||
@@ -537,7 +543,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "contextMenuChanged", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "contextMenuChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 12"
|
"value": "cell 2 13 2 1"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) {
|
}, new FormLayoutConstraints( class com.jgoodies.forms.layout.CellConstraints ) {
|
||||||
"gridY": 11
|
"gridY": 11
|
||||||
@@ -548,7 +554,7 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 810, 860 )
|
"size": new java.awt.Dimension( 810, 960 )
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "hidemode 3,align center center"
|
"$layoutConstraints": "hidemode 3,align center center"
|
||||||
@@ -578,7 +584,7 @@ new FormModel {
|
|||||||
"value": "cell 2 0"
|
"value": "cell 2 0"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 890 )
|
"location": new java.awt.Point( 0, 980 )
|
||||||
"size": new java.awt.Dimension( 291, 118 )
|
"size": new java.awt.Dimension( 291, 118 )
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
@@ -603,7 +609,7 @@ new FormModel {
|
|||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 340, 890 )
|
"location": new java.awt.Point( 340, 980 )
|
||||||
"size": new java.awt.Dimension( 291, 118 )
|
"size": new java.awt.Dimension( 291, 118 )
|
||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023 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.testing;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.beans.Beans;
|
||||||
|
import javax.swing.ButtonGroup;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JToggleButton;
|
||||||
|
import javax.swing.JToolBar;
|
||||||
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatTestEnumSelector<E>
|
||||||
|
extends JPanel
|
||||||
|
{
|
||||||
|
private final JToolBar toolBar;
|
||||||
|
|
||||||
|
public FlatTestEnumSelector() {
|
||||||
|
super( new BorderLayout() );
|
||||||
|
|
||||||
|
toolBar = new JToolBar();
|
||||||
|
toolBar.putClientProperty( FlatClientProperties.STYLE, "border: 1,1,1,1,$Component.borderColor,1,8; separatorWidth: 1" );
|
||||||
|
add( toolBar );
|
||||||
|
|
||||||
|
// for JFormDesigner
|
||||||
|
if( Beans.isDesignTime() )
|
||||||
|
toolBar.add( new JToggleButton( "(default)", true ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init( Class<E> enumType, boolean supportDefault ) {
|
||||||
|
ButtonGroup group = new ButtonGroup();
|
||||||
|
|
||||||
|
// create "default" button
|
||||||
|
if( supportDefault )
|
||||||
|
toolBar.add( createButton( "(default)", null, group ) );
|
||||||
|
|
||||||
|
// create value buttons
|
||||||
|
for( E value : enumType.getEnumConstants() ) {
|
||||||
|
if( getComponentCount() > 0 )
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
toolBar.add( createButton( value.toString(), value, group ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// select first button in group
|
||||||
|
group.getElements().nextElement().setSelected( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
private JToggleButton createButton( String text, E value, ButtonGroup group ) {
|
||||||
|
JToggleButton button = new JToggleButton( text );
|
||||||
|
button.putClientProperty( "FlatTestEnumSelector.value", value );
|
||||||
|
button.putClientProperty( FlatClientProperties.STYLE, "toolbar.spacingInsets: 0,0,0,0" );
|
||||||
|
button.setEnabled( isEnabled() );
|
||||||
|
button.addActionListener( e -> fireActionPerformed() );
|
||||||
|
group.add( button );
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings( "unchecked" )
|
||||||
|
public E getSelectedValue() {
|
||||||
|
for( Component c : toolBar.getComponents() ) {
|
||||||
|
if( c instanceof JToggleButton && ((JToggleButton)c).isSelected() )
|
||||||
|
return (E) ((JToggleButton)c).getClientProperty( "FlatTestEnumSelector.value" );
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addActionListener( ActionListener l ) {
|
||||||
|
listenerList.add( ActionListener.class, l );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeActionListener( ActionListener l ) {
|
||||||
|
listenerList.remove( ActionListener.class, l );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fireActionPerformed() {
|
||||||
|
ActionEvent e = new ActionEvent( this, ActionEvent.ACTION_PERFORMED, null );
|
||||||
|
Object[] listeners = listenerList.getListenerList();
|
||||||
|
for( int i = listeners.length - 2; i >= 0; i -= 2 ) {
|
||||||
|
if( listeners[i] == ActionListener.class )
|
||||||
|
((ActionListener)listeners[i+1]).actionPerformed( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnabled( boolean enabled ) {
|
||||||
|
super.setEnabled( enabled );
|
||||||
|
|
||||||
|
for( Component c : toolBar.getComponents() )
|
||||||
|
c.setEnabled( enabled );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -412,13 +412,13 @@ public class FlatJideOssContainerTest
|
|||||||
showCloseButtonOnTabCheckBox = new JCheckBox();
|
showCloseButtonOnTabCheckBox = new JCheckBox();
|
||||||
showCloseButtonOnSelectedTabCheckBox = new JCheckBox();
|
showCloseButtonOnSelectedTabCheckBox = new JCheckBox();
|
||||||
JLabel tabPlacementLabel = new JLabel();
|
JLabel tabPlacementLabel = new JLabel();
|
||||||
tabPlacementField = new FlatTestEnumComboBox<>();
|
tabPlacementField = new FlatTestEnumSelector<>();
|
||||||
secondTabClosableCheckBox = new JCheckBox();
|
secondTabClosableCheckBox = new JCheckBox();
|
||||||
showCloseButtonOnMouseOverCheckBox = new JCheckBox();
|
showCloseButtonOnMouseOverCheckBox = new JCheckBox();
|
||||||
JLabel tabAreaAlignmentLabel = new JLabel();
|
JLabel tabAreaAlignmentLabel = new JLabel();
|
||||||
tabAlignmentField = new FlatTestEnumComboBox<>();
|
tabAlignmentField = new FlatTestEnumSelector<>();
|
||||||
JLabel tabResizeModeLabel = new JLabel();
|
JLabel tabResizeModeLabel = new JLabel();
|
||||||
tabResizeModeField = new FlatTestEnumComboBox<>();
|
tabResizeModeField = new FlatTestEnumSelector<>();
|
||||||
leadingComponentCheckBox = new JCheckBox();
|
leadingComponentCheckBox = new JCheckBox();
|
||||||
customBorderCheckBox = new JCheckBox();
|
customBorderCheckBox = new JCheckBox();
|
||||||
tabAreaInsetsCheckBox = new JCheckBox();
|
tabAreaInsetsCheckBox = new JCheckBox();
|
||||||
@@ -478,7 +478,7 @@ public class FlatJideOssContainerTest
|
|||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
"[]" +
|
"[]" +
|
||||||
"[fill]" +
|
"[]" +
|
||||||
"[]",
|
"[]",
|
||||||
// rows
|
// rows
|
||||||
"[center]" +
|
"[center]" +
|
||||||
@@ -506,7 +506,7 @@ public class FlatJideOssContainerTest
|
|||||||
//---- tabCountSpinner ----
|
//---- tabCountSpinner ----
|
||||||
tabCountSpinner.setModel(new SpinnerNumberModel(4, 0, null, 1));
|
tabCountSpinner.setModel(new SpinnerNumberModel(4, 0, null, 1));
|
||||||
tabCountSpinner.addChangeListener(e -> tabCountChanged());
|
tabCountSpinner.addChangeListener(e -> tabCountChanged());
|
||||||
tabbedPaneControlPanel.add(tabCountSpinner, "cell 1 0");
|
tabbedPaneControlPanel.add(tabCountSpinner, "cell 1 0,width 80");
|
||||||
|
|
||||||
//---- customTabsCheckBox ----
|
//---- customTabsCheckBox ----
|
||||||
customTabsCheckBox.setText("Custom tabs");
|
customTabsCheckBox.setText("Custom tabs");
|
||||||
@@ -674,11 +674,11 @@ public class FlatJideOssContainerTest
|
|||||||
private JCheckBox tabsClosableCheckBox;
|
private JCheckBox tabsClosableCheckBox;
|
||||||
private JCheckBox showCloseButtonOnTabCheckBox;
|
private JCheckBox showCloseButtonOnTabCheckBox;
|
||||||
private JCheckBox showCloseButtonOnSelectedTabCheckBox;
|
private JCheckBox showCloseButtonOnSelectedTabCheckBox;
|
||||||
private FlatTestEnumComboBox<TabPlacement> tabPlacementField;
|
private FlatTestEnumSelector<TabPlacement> tabPlacementField;
|
||||||
private JCheckBox secondTabClosableCheckBox;
|
private JCheckBox secondTabClosableCheckBox;
|
||||||
private JCheckBox showCloseButtonOnMouseOverCheckBox;
|
private JCheckBox showCloseButtonOnMouseOverCheckBox;
|
||||||
private FlatTestEnumComboBox<JideTabAlignment> tabAlignmentField;
|
private FlatTestEnumSelector<JideTabAlignment> tabAlignmentField;
|
||||||
private FlatTestEnumComboBox<JideTabResizeMode> tabResizeModeField;
|
private FlatTestEnumSelector<JideTabResizeMode> tabResizeModeField;
|
||||||
private JCheckBox leadingComponentCheckBox;
|
private JCheckBox leadingComponentCheckBox;
|
||||||
private JCheckBox customBorderCheckBox;
|
private JCheckBox customBorderCheckBox;
|
||||||
private JCheckBox tabAreaInsetsCheckBox;
|
private JCheckBox tabAreaInsetsCheckBox;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.3.1.342" Java: "16" encoding: "UTF-8"
|
JFDML JFormDesigner: "8.2.0.0.331" Java: "21" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -64,7 +64,7 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestFrame$NoRightToLeftPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestFrame$NoRightToLeftPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "insets 0,hidemode 3"
|
"$layoutConstraints": "insets 0,hidemode 3"
|
||||||
"$columnConstraints": "[][fill][]"
|
"$columnConstraints": "[][][]"
|
||||||
"$rowConstraints": "[center][][][][][]para[][]para[][][]"
|
"$rowConstraints": "[center][][][][][]para[][]para[][][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "tabbedPaneControlPanel"
|
name: "tabbedPaneControlPanel"
|
||||||
@@ -97,7 +97,7 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabCountChanged", false ) )
|
addEvent( new FormEvent( "javax.swing.event.ChangeListener", "stateChanged", "tabCountChanged", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0,width 80"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "customTabsCheckBox"
|
name: "customTabsCheckBox"
|
||||||
@@ -205,7 +205,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabPlacementField"
|
name: "tabPlacementField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -242,7 +242,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabAlignmentField"
|
name: "tabAlignmentField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
@@ -258,7 +258,7 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 5"
|
"value": "cell 2 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumComboBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatTestEnumSelector" ) {
|
||||||
name: "tabResizeModeField"
|
name: "tabResizeModeField"
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
|||||||
Reference in New Issue
Block a user