mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Demo: removed unnecessary setting component name
This commit is contained in:
@@ -412,7 +412,6 @@ class TabsPanel
|
|||||||
cardTabTypeButton = new JToggleButton();
|
cardTabTypeButton = new JToggleButton();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setName("this");
|
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
"insets dialog,hidemode 3",
|
"insets dialog,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -426,7 +425,6 @@ class TabsPanel
|
|||||||
|
|
||||||
//======== panel1 ========
|
//======== panel1 ========
|
||||||
{
|
{
|
||||||
panel1.setName("panel1");
|
|
||||||
panel1.setLayout(new MigLayout(
|
panel1.setLayout(new MigLayout(
|
||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -445,41 +443,35 @@ class TabsPanel
|
|||||||
//---- tabPlacementLabel ----
|
//---- tabPlacementLabel ----
|
||||||
tabPlacementLabel.setText("Tab placement");
|
tabPlacementLabel.setText("Tab placement");
|
||||||
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabPlacementLabel.setName("tabPlacementLabel");
|
|
||||||
panel1.add(tabPlacementLabel, "cell 0 0");
|
panel1.add(tabPlacementLabel, "cell 0 0");
|
||||||
|
|
||||||
//======== tabPlacementToolBar ========
|
//======== tabPlacementToolBar ========
|
||||||
{
|
{
|
||||||
tabPlacementToolBar.setFloatable(false);
|
tabPlacementToolBar.setFloatable(false);
|
||||||
tabPlacementToolBar.setBorder(BorderFactory.createEmptyBorder());
|
tabPlacementToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
tabPlacementToolBar.setName("tabPlacementToolBar");
|
|
||||||
|
|
||||||
//---- topPlacementButton ----
|
//---- topPlacementButton ----
|
||||||
topPlacementButton.setText("top");
|
topPlacementButton.setText("top");
|
||||||
topPlacementButton.setSelected(true);
|
topPlacementButton.setSelected(true);
|
||||||
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
topPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
topPlacementButton.setName("topPlacementButton");
|
|
||||||
topPlacementButton.addActionListener(e -> tabPlacementChanged());
|
topPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||||
tabPlacementToolBar.add(topPlacementButton);
|
tabPlacementToolBar.add(topPlacementButton);
|
||||||
|
|
||||||
//---- bottomPlacementButton ----
|
//---- bottomPlacementButton ----
|
||||||
bottomPlacementButton.setText("bottom");
|
bottomPlacementButton.setText("bottom");
|
||||||
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
bottomPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
bottomPlacementButton.setName("bottomPlacementButton");
|
|
||||||
bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
|
bottomPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||||
tabPlacementToolBar.add(bottomPlacementButton);
|
tabPlacementToolBar.add(bottomPlacementButton);
|
||||||
|
|
||||||
//---- leftPlacementButton ----
|
//---- leftPlacementButton ----
|
||||||
leftPlacementButton.setText("left");
|
leftPlacementButton.setText("left");
|
||||||
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
leftPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
leftPlacementButton.setName("leftPlacementButton");
|
|
||||||
leftPlacementButton.addActionListener(e -> tabPlacementChanged());
|
leftPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||||
tabPlacementToolBar.add(leftPlacementButton);
|
tabPlacementToolBar.add(leftPlacementButton);
|
||||||
|
|
||||||
//---- rightPlacementButton ----
|
//---- rightPlacementButton ----
|
||||||
rightPlacementButton.setText("right");
|
rightPlacementButton.setText("right");
|
||||||
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
rightPlacementButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
rightPlacementButton.setName("rightPlacementButton");
|
|
||||||
rightPlacementButton.addActionListener(e -> tabPlacementChanged());
|
rightPlacementButton.addActionListener(e -> tabPlacementChanged());
|
||||||
tabPlacementToolBar.add(rightPlacementButton);
|
tabPlacementToolBar.add(rightPlacementButton);
|
||||||
tabPlacementToolBar.addSeparator();
|
tabPlacementToolBar.addSeparator();
|
||||||
@@ -487,49 +479,38 @@ class TabsPanel
|
|||||||
//---- scrollButton ----
|
//---- scrollButton ----
|
||||||
scrollButton.setText("scroll");
|
scrollButton.setText("scroll");
|
||||||
scrollButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollButton.setName("scrollButton");
|
|
||||||
scrollButton.addActionListener(e -> scrollChanged());
|
scrollButton.addActionListener(e -> scrollChanged());
|
||||||
tabPlacementToolBar.add(scrollButton);
|
tabPlacementToolBar.add(scrollButton);
|
||||||
|
|
||||||
//---- borderButton ----
|
//---- borderButton ----
|
||||||
borderButton.setText("border");
|
borderButton.setText("border");
|
||||||
borderButton.putClientProperty("FlatLaf.styleClass", "small");
|
borderButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
borderButton.setName("borderButton");
|
|
||||||
borderButton.addActionListener(e -> borderChanged());
|
borderButton.addActionListener(e -> borderChanged());
|
||||||
tabPlacementToolBar.add(borderButton);
|
tabPlacementToolBar.add(borderButton);
|
||||||
}
|
}
|
||||||
panel1.add(tabPlacementToolBar, "cell 0 0,alignx right,growx 0");
|
panel1.add(tabPlacementToolBar, "cell 0 0,alignx right,growx 0");
|
||||||
|
|
||||||
//======== tabPlacementTabbedPane ========
|
|
||||||
{
|
|
||||||
tabPlacementTabbedPane.setName("tabPlacementTabbedPane");
|
|
||||||
}
|
|
||||||
panel1.add(tabPlacementTabbedPane, "cell 0 1,width 300:300,height 100:100");
|
panel1.add(tabPlacementTabbedPane, "cell 0 1,width 300:300,height 100:100");
|
||||||
|
|
||||||
//---- tabLayoutLabel ----
|
//---- tabLayoutLabel ----
|
||||||
tabLayoutLabel.setText("Tab layout");
|
tabLayoutLabel.setText("Tab layout");
|
||||||
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabLayoutLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabLayoutLabel.setName("tabLayoutLabel");
|
|
||||||
panel1.add(tabLayoutLabel, "cell 0 2");
|
panel1.add(tabLayoutLabel, "cell 0 2");
|
||||||
|
|
||||||
//======== tabLayoutToolBar ========
|
//======== tabLayoutToolBar ========
|
||||||
{
|
{
|
||||||
tabLayoutToolBar.setFloatable(false);
|
tabLayoutToolBar.setFloatable(false);
|
||||||
tabLayoutToolBar.setBorder(BorderFactory.createEmptyBorder());
|
tabLayoutToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
tabLayoutToolBar.setName("tabLayoutToolBar");
|
|
||||||
|
|
||||||
//---- scrollTabLayoutButton ----
|
//---- scrollTabLayoutButton ----
|
||||||
scrollTabLayoutButton.setText("scroll");
|
scrollTabLayoutButton.setText("scroll");
|
||||||
scrollTabLayoutButton.setSelected(true);
|
scrollTabLayoutButton.setSelected(true);
|
||||||
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollTabLayoutButton.setName("scrollTabLayoutButton");
|
|
||||||
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
scrollTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||||
tabLayoutToolBar.add(scrollTabLayoutButton);
|
tabLayoutToolBar.add(scrollTabLayoutButton);
|
||||||
|
|
||||||
//---- wrapTabLayoutButton ----
|
//---- wrapTabLayoutButton ----
|
||||||
wrapTabLayoutButton.setText("wrap");
|
wrapTabLayoutButton.setText("wrap");
|
||||||
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
wrapTabLayoutButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
wrapTabLayoutButton.setName("wrapTabLayoutButton");
|
|
||||||
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
wrapTabLayoutButton.addActionListener(e -> tabLayoutChanged());
|
||||||
tabLayoutToolBar.add(wrapTabLayoutButton);
|
tabLayoutToolBar.add(wrapTabLayoutButton);
|
||||||
}
|
}
|
||||||
@@ -539,87 +520,62 @@ class TabsPanel
|
|||||||
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
|
scrollLayoutNoteLabel.setText("(use mouse wheel to scroll; arrow button shows hidden tabs)");
|
||||||
scrollLayoutNoteLabel.setEnabled(false);
|
scrollLayoutNoteLabel.setEnabled(false);
|
||||||
scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
scrollLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollLayoutNoteLabel.setName("scrollLayoutNoteLabel");
|
|
||||||
panel1.add(scrollLayoutNoteLabel, "cell 0 3");
|
panel1.add(scrollLayoutNoteLabel, "cell 0 3");
|
||||||
|
|
||||||
//---- wrapLayoutNoteLabel ----
|
//---- wrapLayoutNoteLabel ----
|
||||||
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
|
wrapLayoutNoteLabel.setText("(probably better to use scroll layout?)");
|
||||||
wrapLayoutNoteLabel.setEnabled(false);
|
wrapLayoutNoteLabel.setEnabled(false);
|
||||||
wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
wrapLayoutNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
wrapLayoutNoteLabel.setName("wrapLayoutNoteLabel");
|
|
||||||
panel1.add(wrapLayoutNoteLabel, "cell 0 3");
|
panel1.add(wrapLayoutNoteLabel, "cell 0 3");
|
||||||
|
|
||||||
//======== scrollLayoutTabbedPane ========
|
|
||||||
{
|
|
||||||
scrollLayoutTabbedPane.setName("scrollLayoutTabbedPane");
|
|
||||||
}
|
|
||||||
panel1.add(scrollLayoutTabbedPane, "cell 0 4");
|
panel1.add(scrollLayoutTabbedPane, "cell 0 4");
|
||||||
|
|
||||||
//======== wrapLayoutTabbedPane ========
|
|
||||||
{
|
|
||||||
wrapLayoutTabbedPane.setName("wrapLayoutTabbedPane");
|
|
||||||
}
|
|
||||||
panel1.add(wrapLayoutTabbedPane, "cell 0 4,width 100:100,height pref*2px");
|
panel1.add(wrapLayoutTabbedPane, "cell 0 4,width 100:100,height pref*2px");
|
||||||
|
|
||||||
//---- closableTabsLabel ----
|
//---- closableTabsLabel ----
|
||||||
closableTabsLabel.setText("Closable tabs");
|
closableTabsLabel.setText("Closable tabs");
|
||||||
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
closableTabsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
closableTabsLabel.setName("closableTabsLabel");
|
|
||||||
panel1.add(closableTabsLabel, "cell 0 5");
|
panel1.add(closableTabsLabel, "cell 0 5");
|
||||||
|
|
||||||
//======== closableTabsToolBar ========
|
//======== closableTabsToolBar ========
|
||||||
{
|
{
|
||||||
closableTabsToolBar.setFloatable(false);
|
closableTabsToolBar.setFloatable(false);
|
||||||
closableTabsToolBar.setBorder(BorderFactory.createEmptyBorder());
|
closableTabsToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
closableTabsToolBar.setName("closableTabsToolBar");
|
|
||||||
|
|
||||||
//---- squareCloseButton ----
|
//---- squareCloseButton ----
|
||||||
squareCloseButton.setText("square");
|
squareCloseButton.setText("square");
|
||||||
squareCloseButton.setSelected(true);
|
squareCloseButton.setSelected(true);
|
||||||
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
squareCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
squareCloseButton.setName("squareCloseButton");
|
|
||||||
squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
squareCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||||
closableTabsToolBar.add(squareCloseButton);
|
closableTabsToolBar.add(squareCloseButton);
|
||||||
|
|
||||||
//---- circleCloseButton ----
|
//---- circleCloseButton ----
|
||||||
circleCloseButton.setText("circle");
|
circleCloseButton.setText("circle");
|
||||||
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
circleCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
circleCloseButton.setName("circleCloseButton");
|
|
||||||
circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
circleCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||||
closableTabsToolBar.add(circleCloseButton);
|
closableTabsToolBar.add(circleCloseButton);
|
||||||
|
|
||||||
//---- redCrossCloseButton ----
|
//---- redCrossCloseButton ----
|
||||||
redCrossCloseButton.setText("red cross");
|
redCrossCloseButton.setText("red cross");
|
||||||
redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
redCrossCloseButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
redCrossCloseButton.setName("redCrossCloseButton");
|
|
||||||
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
redCrossCloseButton.addActionListener(e -> closeButtonStyleChanged());
|
||||||
closableTabsToolBar.add(redCrossCloseButton);
|
closableTabsToolBar.add(redCrossCloseButton);
|
||||||
}
|
}
|
||||||
panel1.add(closableTabsToolBar, "cell 0 5,alignx right,growx 0");
|
panel1.add(closableTabsToolBar, "cell 0 5,alignx right,growx 0");
|
||||||
|
|
||||||
//======== closableTabsTabbedPane ========
|
|
||||||
{
|
|
||||||
closableTabsTabbedPane.setName("closableTabsTabbedPane");
|
|
||||||
}
|
|
||||||
panel1.add(closableTabsTabbedPane, "cell 0 6");
|
panel1.add(closableTabsTabbedPane, "cell 0 6");
|
||||||
|
|
||||||
//---- tabAreaComponentsLabel ----
|
//---- tabAreaComponentsLabel ----
|
||||||
tabAreaComponentsLabel.setText("Custom tab area components");
|
tabAreaComponentsLabel.setText("Custom tab area components");
|
||||||
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabAreaComponentsLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabAreaComponentsLabel.setName("tabAreaComponentsLabel");
|
|
||||||
panel1.add(tabAreaComponentsLabel, "cell 0 7");
|
panel1.add(tabAreaComponentsLabel, "cell 0 7");
|
||||||
|
|
||||||
//======== tabAreaComponentsToolBar ========
|
//======== tabAreaComponentsToolBar ========
|
||||||
{
|
{
|
||||||
tabAreaComponentsToolBar.setFloatable(false);
|
tabAreaComponentsToolBar.setFloatable(false);
|
||||||
tabAreaComponentsToolBar.setBorder(BorderFactory.createEmptyBorder());
|
tabAreaComponentsToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
tabAreaComponentsToolBar.setName("tabAreaComponentsToolBar");
|
|
||||||
|
|
||||||
//---- leadingComponentButton ----
|
//---- leadingComponentButton ----
|
||||||
leadingComponentButton.setText("leading");
|
leadingComponentButton.setText("leading");
|
||||||
leadingComponentButton.setSelected(true);
|
leadingComponentButton.setSelected(true);
|
||||||
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
leadingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
leadingComponentButton.setName("leadingComponentButton");
|
|
||||||
leadingComponentButton.addActionListener(e -> customComponentsChanged());
|
leadingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||||
tabAreaComponentsToolBar.add(leadingComponentButton);
|
tabAreaComponentsToolBar.add(leadingComponentButton);
|
||||||
|
|
||||||
@@ -627,23 +583,16 @@ class TabsPanel
|
|||||||
trailingComponentButton.setText("trailing");
|
trailingComponentButton.setText("trailing");
|
||||||
trailingComponentButton.setSelected(true);
|
trailingComponentButton.setSelected(true);
|
||||||
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
trailingComponentButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
trailingComponentButton.setName("trailingComponentButton");
|
|
||||||
trailingComponentButton.addActionListener(e -> customComponentsChanged());
|
trailingComponentButton.addActionListener(e -> customComponentsChanged());
|
||||||
tabAreaComponentsToolBar.add(trailingComponentButton);
|
tabAreaComponentsToolBar.add(trailingComponentButton);
|
||||||
}
|
}
|
||||||
panel1.add(tabAreaComponentsToolBar, "cell 0 7,alignx right,growx 0");
|
panel1.add(tabAreaComponentsToolBar, "cell 0 7,alignx right,growx 0");
|
||||||
|
|
||||||
//======== customComponentsTabbedPane ========
|
|
||||||
{
|
|
||||||
customComponentsTabbedPane.setName("customComponentsTabbedPane");
|
|
||||||
}
|
|
||||||
panel1.add(customComponentsTabbedPane, "cell 0 8");
|
panel1.add(customComponentsTabbedPane, "cell 0 8");
|
||||||
}
|
}
|
||||||
add(panel1, "cell 0 0");
|
add(panel1, "cell 0 0");
|
||||||
|
|
||||||
//======== panel2 ========
|
//======== panel2 ========
|
||||||
{
|
{
|
||||||
panel2.setName("panel2");
|
|
||||||
panel2.setLayout(new MigLayout(
|
panel2.setLayout(new MigLayout(
|
||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -665,82 +614,37 @@ class TabsPanel
|
|||||||
//---- tabIconPlacementLabel ----
|
//---- tabIconPlacementLabel ----
|
||||||
tabIconPlacementLabel.setText("Tab icon placement");
|
tabIconPlacementLabel.setText("Tab icon placement");
|
||||||
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabIconPlacementLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabIconPlacementLabel.setName("tabIconPlacementLabel");
|
|
||||||
panel2.add(tabIconPlacementLabel, "cell 0 0");
|
panel2.add(tabIconPlacementLabel, "cell 0 0");
|
||||||
|
|
||||||
//---- tabIconPlacementNodeLabel ----
|
//---- tabIconPlacementNodeLabel ----
|
||||||
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
|
tabIconPlacementNodeLabel.setText("(top/bottom/leading/trailing)");
|
||||||
tabIconPlacementNodeLabel.setEnabled(false);
|
tabIconPlacementNodeLabel.setEnabled(false);
|
||||||
tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
|
tabIconPlacementNodeLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
tabIconPlacementNodeLabel.setName("tabIconPlacementNodeLabel");
|
|
||||||
panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
|
panel2.add(tabIconPlacementNodeLabel, "cell 0 1");
|
||||||
|
|
||||||
//======== iconTopTabbedPane ========
|
|
||||||
{
|
|
||||||
iconTopTabbedPane.setName("iconTopTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(iconTopTabbedPane, "cell 0 2");
|
panel2.add(iconTopTabbedPane, "cell 0 2");
|
||||||
|
|
||||||
//======== iconBottomTabbedPane ========
|
|
||||||
{
|
|
||||||
iconBottomTabbedPane.setName("iconBottomTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(iconBottomTabbedPane, "cell 0 3");
|
panel2.add(iconBottomTabbedPane, "cell 0 3");
|
||||||
|
|
||||||
//======== iconLeadingTabbedPane ========
|
|
||||||
{
|
|
||||||
iconLeadingTabbedPane.setName("iconLeadingTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(iconLeadingTabbedPane, "cell 0 4");
|
panel2.add(iconLeadingTabbedPane, "cell 0 4");
|
||||||
|
|
||||||
//======== iconTrailingTabbedPane ========
|
|
||||||
{
|
|
||||||
iconTrailingTabbedPane.setName("iconTrailingTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(iconTrailingTabbedPane, "cell 0 5");
|
panel2.add(iconTrailingTabbedPane, "cell 0 5");
|
||||||
|
|
||||||
//---- tabAreaAlignmentLabel ----
|
//---- tabAreaAlignmentLabel ----
|
||||||
tabAreaAlignmentLabel.setText("Tab area alignment");
|
tabAreaAlignmentLabel.setText("Tab area alignment");
|
||||||
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabAreaAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabAreaAlignmentLabel.setName("tabAreaAlignmentLabel");
|
|
||||||
panel2.add(tabAreaAlignmentLabel, "cell 0 6");
|
panel2.add(tabAreaAlignmentLabel, "cell 0 6");
|
||||||
|
|
||||||
//---- tabAreaAlignmentNoteLabel ----
|
//---- tabAreaAlignmentNoteLabel ----
|
||||||
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
|
tabAreaAlignmentNoteLabel.setText("(leading/center/trailing/fill)");
|
||||||
tabAreaAlignmentNoteLabel.setEnabled(false);
|
tabAreaAlignmentNoteLabel.setEnabled(false);
|
||||||
tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
tabAreaAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
tabAreaAlignmentNoteLabel.setName("tabAreaAlignmentNoteLabel");
|
|
||||||
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
|
panel2.add(tabAreaAlignmentNoteLabel, "cell 0 7");
|
||||||
|
|
||||||
//======== alignLeadingTabbedPane ========
|
|
||||||
{
|
|
||||||
alignLeadingTabbedPane.setName("alignLeadingTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(alignLeadingTabbedPane, "cell 0 8");
|
panel2.add(alignLeadingTabbedPane, "cell 0 8");
|
||||||
|
|
||||||
//======== alignCenterTabbedPane ========
|
|
||||||
{
|
|
||||||
alignCenterTabbedPane.setName("alignCenterTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(alignCenterTabbedPane, "cell 0 9");
|
panel2.add(alignCenterTabbedPane, "cell 0 9");
|
||||||
|
|
||||||
//======== alignTrailingTabbedPane ========
|
|
||||||
{
|
|
||||||
alignTrailingTabbedPane.setName("alignTrailingTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(alignTrailingTabbedPane, "cell 0 10");
|
panel2.add(alignTrailingTabbedPane, "cell 0 10");
|
||||||
|
|
||||||
//======== alignFillTabbedPane ========
|
|
||||||
{
|
|
||||||
alignFillTabbedPane.setName("alignFillTabbedPane");
|
|
||||||
}
|
|
||||||
panel2.add(alignFillTabbedPane, "cell 0 11");
|
panel2.add(alignFillTabbedPane, "cell 0 11");
|
||||||
}
|
}
|
||||||
add(panel2, "cell 1 0,growy");
|
add(panel2, "cell 1 0,growy");
|
||||||
|
|
||||||
//======== panel3 ========
|
//======== panel3 ========
|
||||||
{
|
{
|
||||||
panel3.setName("panel3");
|
|
||||||
panel3.setLayout(new MigLayout(
|
panel3.setLayout(new MigLayout(
|
||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -760,61 +664,31 @@ class TabsPanel
|
|||||||
//---- tabWidthModeLabel ----
|
//---- tabWidthModeLabel ----
|
||||||
tabWidthModeLabel.setText("Tab width mode");
|
tabWidthModeLabel.setText("Tab width mode");
|
||||||
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabWidthModeLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabWidthModeLabel.setName("tabWidthModeLabel");
|
|
||||||
panel3.add(tabWidthModeLabel, "cell 0 0");
|
panel3.add(tabWidthModeLabel, "cell 0 0");
|
||||||
|
|
||||||
//---- tabWidthModeNoteLabel ----
|
//---- tabWidthModeNoteLabel ----
|
||||||
tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
|
tabWidthModeNoteLabel.setText("(preferred/equal/compact)");
|
||||||
tabWidthModeNoteLabel.setEnabled(false);
|
tabWidthModeNoteLabel.setEnabled(false);
|
||||||
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
tabWidthModeNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
tabWidthModeNoteLabel.setName("tabWidthModeNoteLabel");
|
|
||||||
panel3.add(tabWidthModeNoteLabel, "cell 0 1");
|
panel3.add(tabWidthModeNoteLabel, "cell 0 1");
|
||||||
|
|
||||||
//======== widthPreferredTabbedPane ========
|
|
||||||
{
|
|
||||||
widthPreferredTabbedPane.setName("widthPreferredTabbedPane");
|
|
||||||
}
|
|
||||||
panel3.add(widthPreferredTabbedPane, "cell 0 2");
|
panel3.add(widthPreferredTabbedPane, "cell 0 2");
|
||||||
|
|
||||||
//======== widthEqualTabbedPane ========
|
|
||||||
{
|
|
||||||
widthEqualTabbedPane.setName("widthEqualTabbedPane");
|
|
||||||
}
|
|
||||||
panel3.add(widthEqualTabbedPane, "cell 0 3");
|
panel3.add(widthEqualTabbedPane, "cell 0 3");
|
||||||
|
|
||||||
//======== widthCompactTabbedPane ========
|
|
||||||
{
|
|
||||||
widthCompactTabbedPane.setName("widthCompactTabbedPane");
|
|
||||||
}
|
|
||||||
panel3.add(widthCompactTabbedPane, "cell 0 4");
|
panel3.add(widthCompactTabbedPane, "cell 0 4");
|
||||||
|
|
||||||
//---- minMaxTabWidthLabel ----
|
//---- minMaxTabWidthLabel ----
|
||||||
minMaxTabWidthLabel.setText("Minimum/maximum tab width");
|
minMaxTabWidthLabel.setText("Minimum/maximum tab width");
|
||||||
minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
minMaxTabWidthLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
minMaxTabWidthLabel.setName("minMaxTabWidthLabel");
|
|
||||||
panel3.add(minMaxTabWidthLabel, "cell 0 5");
|
panel3.add(minMaxTabWidthLabel, "cell 0 5");
|
||||||
|
|
||||||
//======== minimumTabWidthTabbedPane ========
|
|
||||||
{
|
|
||||||
minimumTabWidthTabbedPane.setName("minimumTabWidthTabbedPane");
|
|
||||||
}
|
|
||||||
panel3.add(minimumTabWidthTabbedPane, "cell 0 6");
|
panel3.add(minimumTabWidthTabbedPane, "cell 0 6");
|
||||||
|
|
||||||
//======== maximumTabWidthTabbedPane ========
|
|
||||||
{
|
|
||||||
maximumTabWidthTabbedPane.setName("maximumTabWidthTabbedPane");
|
|
||||||
}
|
|
||||||
panel3.add(maximumTabWidthTabbedPane, "cell 0 7");
|
panel3.add(maximumTabWidthTabbedPane, "cell 0 7");
|
||||||
|
|
||||||
//---- tabAlignmentLabel ----
|
//---- tabAlignmentLabel ----
|
||||||
tabAlignmentLabel.setText("Tab title alignment");
|
tabAlignmentLabel.setText("Tab title alignment");
|
||||||
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
tabAlignmentLabel.putClientProperty("FlatLaf.styleClass", "h3");
|
||||||
tabAlignmentLabel.setName("tabAlignmentLabel");
|
|
||||||
panel3.add(tabAlignmentLabel, "cell 0 8");
|
panel3.add(tabAlignmentLabel, "cell 0 8");
|
||||||
|
|
||||||
//======== panel5 ========
|
//======== panel5 ========
|
||||||
{
|
{
|
||||||
panel5.setName("panel5");
|
|
||||||
panel5.setLayout(new MigLayout(
|
panel5.setLayout(new MigLayout(
|
||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -830,52 +704,30 @@ class TabsPanel
|
|||||||
tabAlignmentNoteLabel.setText("(leading/center/trailing)");
|
tabAlignmentNoteLabel.setText("(leading/center/trailing)");
|
||||||
tabAlignmentNoteLabel.setEnabled(false);
|
tabAlignmentNoteLabel.setEnabled(false);
|
||||||
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
tabAlignmentNoteLabel.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
tabAlignmentNoteLabel.setName("tabAlignmentNoteLabel");
|
|
||||||
panel5.add(tabAlignmentNoteLabel, "cell 0 0");
|
panel5.add(tabAlignmentNoteLabel, "cell 0 0");
|
||||||
|
|
||||||
//---- tabAlignmentNoteLabel2 ----
|
//---- tabAlignmentNoteLabel2 ----
|
||||||
tabAlignmentNoteLabel2.setText("(trailing)");
|
tabAlignmentNoteLabel2.setText("(trailing)");
|
||||||
tabAlignmentNoteLabel2.setEnabled(false);
|
tabAlignmentNoteLabel2.setEnabled(false);
|
||||||
tabAlignmentNoteLabel2.putClientProperty("FlatLaf.styleClass", "small");
|
tabAlignmentNoteLabel2.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
tabAlignmentNoteLabel2.setName("tabAlignmentNoteLabel2");
|
|
||||||
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
|
panel5.add(tabAlignmentNoteLabel2, "cell 1 0,alignx right,growx 0");
|
||||||
|
|
||||||
//======== tabAlignLeadingTabbedPane ========
|
|
||||||
{
|
|
||||||
tabAlignLeadingTabbedPane.setName("tabAlignLeadingTabbedPane");
|
|
||||||
}
|
|
||||||
panel5.add(tabAlignLeadingTabbedPane, "cell 0 1");
|
panel5.add(tabAlignLeadingTabbedPane, "cell 0 1");
|
||||||
|
|
||||||
//======== tabAlignVerticalTabbedPane ========
|
//======== tabAlignVerticalTabbedPane ========
|
||||||
{
|
{
|
||||||
tabAlignVerticalTabbedPane.setTabPlacement(SwingConstants.LEFT);
|
tabAlignVerticalTabbedPane.setTabPlacement(SwingConstants.LEFT);
|
||||||
tabAlignVerticalTabbedPane.setName("tabAlignVerticalTabbedPane");
|
|
||||||
}
|
}
|
||||||
panel5.add(tabAlignVerticalTabbedPane, "cell 1 1 1 3,growy");
|
panel5.add(tabAlignVerticalTabbedPane, "cell 1 1 1 3,growy");
|
||||||
|
|
||||||
//======== tabAlignCenterTabbedPane ========
|
|
||||||
{
|
|
||||||
tabAlignCenterTabbedPane.setName("tabAlignCenterTabbedPane");
|
|
||||||
}
|
|
||||||
panel5.add(tabAlignCenterTabbedPane, "cell 0 2");
|
panel5.add(tabAlignCenterTabbedPane, "cell 0 2");
|
||||||
|
|
||||||
//======== tabAlignTrailingTabbedPane ========
|
|
||||||
{
|
|
||||||
tabAlignTrailingTabbedPane.setName("tabAlignTrailingTabbedPane");
|
|
||||||
}
|
|
||||||
panel5.add(tabAlignTrailingTabbedPane, "cell 0 3");
|
panel5.add(tabAlignTrailingTabbedPane, "cell 0 3");
|
||||||
}
|
}
|
||||||
panel3.add(panel5, "cell 0 9");
|
panel3.add(panel5, "cell 0 9");
|
||||||
}
|
}
|
||||||
add(panel3, "cell 2 0");
|
add(panel3, "cell 2 0");
|
||||||
|
|
||||||
//---- separator2 ----
|
|
||||||
separator2.setName("separator2");
|
|
||||||
add(separator2, "cell 0 1 3 1");
|
add(separator2, "cell 0 1 3 1");
|
||||||
|
|
||||||
//======== panel4 ========
|
//======== panel4 ========
|
||||||
{
|
{
|
||||||
panel4.setName("panel4");
|
|
||||||
panel4.setLayout(new MigLayout(
|
panel4.setLayout(new MigLayout(
|
||||||
"insets 0,hidemode 3",
|
"insets 0,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -890,34 +742,29 @@ class TabsPanel
|
|||||||
|
|
||||||
//---- scrollButtonsPolicyLabel ----
|
//---- scrollButtonsPolicyLabel ----
|
||||||
scrollButtonsPolicyLabel.setText("Scroll buttons policy:");
|
scrollButtonsPolicyLabel.setText("Scroll buttons policy:");
|
||||||
scrollButtonsPolicyLabel.setName("scrollButtonsPolicyLabel");
|
|
||||||
panel4.add(scrollButtonsPolicyLabel, "cell 0 0");
|
panel4.add(scrollButtonsPolicyLabel, "cell 0 0");
|
||||||
|
|
||||||
//======== scrollButtonsPolicyToolBar ========
|
//======== scrollButtonsPolicyToolBar ========
|
||||||
{
|
{
|
||||||
scrollButtonsPolicyToolBar.setFloatable(false);
|
scrollButtonsPolicyToolBar.setFloatable(false);
|
||||||
scrollButtonsPolicyToolBar.setBorder(BorderFactory.createEmptyBorder());
|
scrollButtonsPolicyToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
scrollButtonsPolicyToolBar.setName("scrollButtonsPolicyToolBar");
|
|
||||||
|
|
||||||
//---- scrollAsNeededSingleButton ----
|
//---- scrollAsNeededSingleButton ----
|
||||||
scrollAsNeededSingleButton.setText("asNeededSingle");
|
scrollAsNeededSingleButton.setText("asNeededSingle");
|
||||||
scrollAsNeededSingleButton.setSelected(true);
|
scrollAsNeededSingleButton.setSelected(true);
|
||||||
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollAsNeededSingleButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollAsNeededSingleButton.setName("scrollAsNeededSingleButton");
|
|
||||||
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
scrollAsNeededSingleButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||||
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
|
scrollButtonsPolicyToolBar.add(scrollAsNeededSingleButton);
|
||||||
|
|
||||||
//---- scrollAsNeededButton ----
|
//---- scrollAsNeededButton ----
|
||||||
scrollAsNeededButton.setText("asNeeded");
|
scrollAsNeededButton.setText("asNeeded");
|
||||||
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollAsNeededButton.setName("scrollAsNeededButton");
|
|
||||||
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
scrollAsNeededButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||||
scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
|
scrollButtonsPolicyToolBar.add(scrollAsNeededButton);
|
||||||
|
|
||||||
//---- scrollNeverButton ----
|
//---- scrollNeverButton ----
|
||||||
scrollNeverButton.setText("never");
|
scrollNeverButton.setText("never");
|
||||||
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollNeverButton.setName("scrollNeverButton");
|
|
||||||
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
scrollNeverButton.addActionListener(e -> scrollButtonsPolicyChanged());
|
||||||
scrollButtonsPolicyToolBar.add(scrollNeverButton);
|
scrollButtonsPolicyToolBar.add(scrollNeverButton);
|
||||||
}
|
}
|
||||||
@@ -925,27 +772,23 @@ class TabsPanel
|
|||||||
|
|
||||||
//---- scrollButtonsPlacementLabel ----
|
//---- scrollButtonsPlacementLabel ----
|
||||||
scrollButtonsPlacementLabel.setText("Scroll buttons placement:");
|
scrollButtonsPlacementLabel.setText("Scroll buttons placement:");
|
||||||
scrollButtonsPlacementLabel.setName("scrollButtonsPlacementLabel");
|
|
||||||
panel4.add(scrollButtonsPlacementLabel, "cell 2 0");
|
panel4.add(scrollButtonsPlacementLabel, "cell 2 0");
|
||||||
|
|
||||||
//======== scrollButtonsPlacementToolBar ========
|
//======== scrollButtonsPlacementToolBar ========
|
||||||
{
|
{
|
||||||
scrollButtonsPlacementToolBar.setFloatable(false);
|
scrollButtonsPlacementToolBar.setFloatable(false);
|
||||||
scrollButtonsPlacementToolBar.setBorder(BorderFactory.createEmptyBorder());
|
scrollButtonsPlacementToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
scrollButtonsPlacementToolBar.setName("scrollButtonsPlacementToolBar");
|
|
||||||
|
|
||||||
//---- scrollBothButton ----
|
//---- scrollBothButton ----
|
||||||
scrollBothButton.setText("both");
|
scrollBothButton.setText("both");
|
||||||
scrollBothButton.setSelected(true);
|
scrollBothButton.setSelected(true);
|
||||||
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollBothButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollBothButton.setName("scrollBothButton");
|
|
||||||
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
scrollBothButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||||
scrollButtonsPlacementToolBar.add(scrollBothButton);
|
scrollButtonsPlacementToolBar.add(scrollBothButton);
|
||||||
|
|
||||||
//---- scrollTrailingButton ----
|
//---- scrollTrailingButton ----
|
||||||
scrollTrailingButton.setText("trailing");
|
scrollTrailingButton.setText("trailing");
|
||||||
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
|
scrollTrailingButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
scrollTrailingButton.setName("scrollTrailingButton");
|
|
||||||
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
scrollTrailingButton.addActionListener(e -> scrollButtonsPlacementChanged());
|
||||||
scrollButtonsPlacementToolBar.add(scrollTrailingButton);
|
scrollButtonsPlacementToolBar.add(scrollTrailingButton);
|
||||||
}
|
}
|
||||||
@@ -953,33 +796,28 @@ class TabsPanel
|
|||||||
|
|
||||||
//---- showTabSeparatorsCheckBox ----
|
//---- showTabSeparatorsCheckBox ----
|
||||||
showTabSeparatorsCheckBox.setText("Show tab separators");
|
showTabSeparatorsCheckBox.setText("Show tab separators");
|
||||||
showTabSeparatorsCheckBox.setName("showTabSeparatorsCheckBox");
|
|
||||||
showTabSeparatorsCheckBox.addActionListener(e -> showTabSeparatorsChanged());
|
showTabSeparatorsCheckBox.addActionListener(e -> showTabSeparatorsChanged());
|
||||||
panel4.add(showTabSeparatorsCheckBox, "cell 4 0");
|
panel4.add(showTabSeparatorsCheckBox, "cell 4 0");
|
||||||
|
|
||||||
//---- tabsPopupPolicyLabel ----
|
//---- tabsPopupPolicyLabel ----
|
||||||
tabsPopupPolicyLabel.setText("Tabs popup policy:");
|
tabsPopupPolicyLabel.setText("Tabs popup policy:");
|
||||||
tabsPopupPolicyLabel.setName("tabsPopupPolicyLabel");
|
|
||||||
panel4.add(tabsPopupPolicyLabel, "cell 0 1");
|
panel4.add(tabsPopupPolicyLabel, "cell 0 1");
|
||||||
|
|
||||||
//======== tabsPopupPolicyToolBar ========
|
//======== tabsPopupPolicyToolBar ========
|
||||||
{
|
{
|
||||||
tabsPopupPolicyToolBar.setFloatable(false);
|
tabsPopupPolicyToolBar.setFloatable(false);
|
||||||
tabsPopupPolicyToolBar.setBorder(BorderFactory.createEmptyBorder());
|
tabsPopupPolicyToolBar.setBorder(BorderFactory.createEmptyBorder());
|
||||||
tabsPopupPolicyToolBar.setName("tabsPopupPolicyToolBar");
|
|
||||||
|
|
||||||
//---- popupAsNeededButton ----
|
//---- popupAsNeededButton ----
|
||||||
popupAsNeededButton.setText("asNeeded");
|
popupAsNeededButton.setText("asNeeded");
|
||||||
popupAsNeededButton.setSelected(true);
|
popupAsNeededButton.setSelected(true);
|
||||||
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
popupAsNeededButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
popupAsNeededButton.setName("popupAsNeededButton");
|
|
||||||
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
|
popupAsNeededButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||||
tabsPopupPolicyToolBar.add(popupAsNeededButton);
|
tabsPopupPolicyToolBar.add(popupAsNeededButton);
|
||||||
|
|
||||||
//---- popupNeverButton ----
|
//---- popupNeverButton ----
|
||||||
popupNeverButton.setText("never");
|
popupNeverButton.setText("never");
|
||||||
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
popupNeverButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
popupNeverButton.setName("popupNeverButton");
|
|
||||||
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
|
popupNeverButton.addActionListener(e -> tabsPopupPolicyChanged());
|
||||||
tabsPopupPolicyToolBar.add(popupNeverButton);
|
tabsPopupPolicyToolBar.add(popupNeverButton);
|
||||||
}
|
}
|
||||||
@@ -987,26 +825,22 @@ class TabsPanel
|
|||||||
|
|
||||||
//---- tabTypeLabel ----
|
//---- tabTypeLabel ----
|
||||||
tabTypeLabel.setText("Tab type:");
|
tabTypeLabel.setText("Tab type:");
|
||||||
tabTypeLabel.setName("tabTypeLabel");
|
|
||||||
panel4.add(tabTypeLabel, "cell 2 1");
|
panel4.add(tabTypeLabel, "cell 2 1");
|
||||||
|
|
||||||
//======== tabTypeToolBar ========
|
//======== tabTypeToolBar ========
|
||||||
{
|
{
|
||||||
tabTypeToolBar.setFloatable(false);
|
tabTypeToolBar.setFloatable(false);
|
||||||
tabTypeToolBar.setName("tabTypeToolBar");
|
|
||||||
|
|
||||||
//---- underlinedTabTypeButton ----
|
//---- underlinedTabTypeButton ----
|
||||||
underlinedTabTypeButton.setText("underlined");
|
underlinedTabTypeButton.setText("underlined");
|
||||||
underlinedTabTypeButton.setSelected(true);
|
underlinedTabTypeButton.setSelected(true);
|
||||||
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
underlinedTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
underlinedTabTypeButton.setName("underlinedTabTypeButton");
|
|
||||||
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
|
underlinedTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||||
tabTypeToolBar.add(underlinedTabTypeButton);
|
tabTypeToolBar.add(underlinedTabTypeButton);
|
||||||
|
|
||||||
//---- cardTabTypeButton ----
|
//---- cardTabTypeButton ----
|
||||||
cardTabTypeButton.setText("card");
|
cardTabTypeButton.setText("card");
|
||||||
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
cardTabTypeButton.putClientProperty("FlatLaf.styleClass", "small");
|
||||||
cardTabTypeButton.setName("cardTabTypeButton");
|
|
||||||
cardTabTypeButton.addActionListener(e -> tabTypeChanged());
|
cardTabTypeButton.addActionListener(e -> tabTypeChanged());
|
||||||
tabTypeToolBar.add(cardTabTypeButton);
|
tabTypeToolBar.add(cardTabTypeButton);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
JFDML JFormDesigner: "7.0.5.0.382" Java: "16" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.5.0.404" Java: "17" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
"$setComponentNames": true
|
|
||||||
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": "insets dialog,hidemode 3"
|
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[grow,fill]para[fill]para[fill]"
|
"$columnConstraints": "[grow,fill]para[fill]para[fill]"
|
||||||
|
|||||||
@@ -234,7 +234,6 @@ public class FlatTextComponentsTest
|
|||||||
JMenuItem pasteMenuItem = new JMenuItem();
|
JMenuItem pasteMenuItem = new JMenuItem();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setName("this");
|
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
"ltr,insets dialog,hidemode 3",
|
"ltr,insets dialog,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -267,21 +266,18 @@ public class FlatTextComponentsTest
|
|||||||
textFieldLabel.setText("JTextField:");
|
textFieldLabel.setText("JTextField:");
|
||||||
textFieldLabel.setDisplayedMnemonic('T');
|
textFieldLabel.setDisplayedMnemonic('T');
|
||||||
textFieldLabel.setLabelFor(textField1);
|
textFieldLabel.setLabelFor(textField1);
|
||||||
textFieldLabel.setName("textFieldLabel");
|
|
||||||
add(textFieldLabel, "cell 0 0");
|
add(textFieldLabel, "cell 0 0");
|
||||||
|
|
||||||
//---- textField1 ----
|
//---- textField1 ----
|
||||||
textField1.setText("editable");
|
textField1.setText("editable");
|
||||||
textField1.setComponentPopupMenu(popupMenu1);
|
textField1.setComponentPopupMenu(popupMenu1);
|
||||||
textField1.putClientProperty("JTextField.placeholderText", "place");
|
textField1.putClientProperty("JTextField.placeholderText", "place");
|
||||||
textField1.setName("textField1");
|
|
||||||
add(textField1, "cell 1 0,growx");
|
add(textField1, "cell 1 0,growx");
|
||||||
|
|
||||||
//---- textField3 ----
|
//---- textField3 ----
|
||||||
textField3.setText("longer text for testing horizontal scrolling");
|
textField3.setText("longer text for testing horizontal scrolling");
|
||||||
textField3.setComponentPopupMenu(popupMenu1);
|
textField3.setComponentPopupMenu(popupMenu1);
|
||||||
textField3.putClientProperty("JTextField.placeholderText", "place");
|
textField3.putClientProperty("JTextField.placeholderText", "place");
|
||||||
textField3.setName("textField3");
|
|
||||||
add(textField3, "cell 2 0,growx");
|
add(textField3, "cell 2 0,growx");
|
||||||
|
|
||||||
//---- textField2 ----
|
//---- textField2 ----
|
||||||
@@ -290,34 +286,29 @@ public class FlatTextComponentsTest
|
|||||||
textField2.setSelectionEnd(4);
|
textField2.setSelectionEnd(4);
|
||||||
textField2.setComponentPopupMenu(popupMenu1);
|
textField2.setComponentPopupMenu(popupMenu1);
|
||||||
textField2.putClientProperty("JTextField.placeholderText", "place");
|
textField2.putClientProperty("JTextField.placeholderText", "place");
|
||||||
textField2.setName("textField2");
|
|
||||||
add(textField2, "cell 3 0");
|
add(textField2, "cell 3 0");
|
||||||
|
|
||||||
//---- formattedTextFieldLabel ----
|
//---- formattedTextFieldLabel ----
|
||||||
formattedTextFieldLabel.setText("JFormattedTextField:");
|
formattedTextFieldLabel.setText("JFormattedTextField:");
|
||||||
formattedTextFieldLabel.setDisplayedMnemonic('F');
|
formattedTextFieldLabel.setDisplayedMnemonic('F');
|
||||||
formattedTextFieldLabel.setLabelFor(formattedTextField1);
|
formattedTextFieldLabel.setLabelFor(formattedTextField1);
|
||||||
formattedTextFieldLabel.setName("formattedTextFieldLabel");
|
|
||||||
add(formattedTextFieldLabel, "cell 0 1");
|
add(formattedTextFieldLabel, "cell 0 1");
|
||||||
|
|
||||||
//---- formattedTextField1 ----
|
//---- formattedTextField1 ----
|
||||||
formattedTextField1.setText("editable");
|
formattedTextField1.setText("editable");
|
||||||
formattedTextField1.setComponentPopupMenu(popupMenu1);
|
formattedTextField1.setComponentPopupMenu(popupMenu1);
|
||||||
formattedTextField1.putClientProperty("JTextField.placeholderText", "place");
|
formattedTextField1.putClientProperty("JTextField.placeholderText", "place");
|
||||||
formattedTextField1.setName("formattedTextField1");
|
|
||||||
add(formattedTextField1, "cell 1 1,growx");
|
add(formattedTextField1, "cell 1 1,growx");
|
||||||
|
|
||||||
//---- formattedTextField3 ----
|
//---- formattedTextField3 ----
|
||||||
formattedTextField3.setText("longer text for testing horizontal scrolling");
|
formattedTextField3.setText("longer text for testing horizontal scrolling");
|
||||||
formattedTextField3.setComponentPopupMenu(popupMenu1);
|
formattedTextField3.setComponentPopupMenu(popupMenu1);
|
||||||
formattedTextField3.putClientProperty("JTextField.placeholderText", "place");
|
formattedTextField3.putClientProperty("JTextField.placeholderText", "place");
|
||||||
formattedTextField3.setName("formattedTextField3");
|
|
||||||
add(formattedTextField3, "cell 2 1,growx");
|
add(formattedTextField3, "cell 2 1,growx");
|
||||||
|
|
||||||
//======== panel1 ========
|
//======== panel1 ========
|
||||||
{
|
{
|
||||||
panel1.setBorder(new TitledBorder("Control"));
|
panel1.setBorder(new TitledBorder("Control"));
|
||||||
panel1.setName("panel1");
|
|
||||||
panel1.setLayout(new MigLayout(
|
panel1.setLayout(new MigLayout(
|
||||||
"hidemode 3",
|
"hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
@@ -340,97 +331,80 @@ public class FlatTextComponentsTest
|
|||||||
|
|
||||||
//---- button1 ----
|
//---- button1 ----
|
||||||
button1.setText("change text");
|
button1.setText("change text");
|
||||||
button1.setName("button1");
|
|
||||||
button1.addActionListener(e -> changeText());
|
button1.addActionListener(e -> changeText());
|
||||||
panel1.add(button1, "cell 0 0 2 1,alignx left,growx 0");
|
panel1.add(button1, "cell 0 0 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- leftPaddingLabel ----
|
//---- leftPaddingLabel ----
|
||||||
leftPaddingLabel.setText("Left padding:");
|
leftPaddingLabel.setText("Left padding:");
|
||||||
leftPaddingLabel.setName("leftPaddingLabel");
|
|
||||||
panel1.add(leftPaddingLabel, "cell 0 1");
|
panel1.add(leftPaddingLabel, "cell 0 1");
|
||||||
|
|
||||||
//---- leftPaddingField ----
|
//---- leftPaddingField ----
|
||||||
leftPaddingField.setName("leftPaddingField");
|
|
||||||
leftPaddingField.addChangeListener(e -> paddingChanged());
|
leftPaddingField.addChangeListener(e -> paddingChanged());
|
||||||
panel1.add(leftPaddingField, "cell 1 1");
|
panel1.add(leftPaddingField, "cell 1 1");
|
||||||
|
|
||||||
//---- rightPaddingLabel ----
|
//---- rightPaddingLabel ----
|
||||||
rightPaddingLabel.setText("Right padding:");
|
rightPaddingLabel.setText("Right padding:");
|
||||||
rightPaddingLabel.setName("rightPaddingLabel");
|
|
||||||
panel1.add(rightPaddingLabel, "cell 0 2");
|
panel1.add(rightPaddingLabel, "cell 0 2");
|
||||||
|
|
||||||
//---- rightPaddingField ----
|
//---- rightPaddingField ----
|
||||||
rightPaddingField.setName("rightPaddingField");
|
|
||||||
rightPaddingField.addChangeListener(e -> paddingChanged());
|
rightPaddingField.addChangeListener(e -> paddingChanged());
|
||||||
panel1.add(rightPaddingField, "cell 1 2");
|
panel1.add(rightPaddingField, "cell 1 2");
|
||||||
|
|
||||||
//---- topPaddingLabel ----
|
//---- topPaddingLabel ----
|
||||||
topPaddingLabel.setText("Top padding:");
|
topPaddingLabel.setText("Top padding:");
|
||||||
topPaddingLabel.setName("topPaddingLabel");
|
|
||||||
panel1.add(topPaddingLabel, "cell 0 3");
|
panel1.add(topPaddingLabel, "cell 0 3");
|
||||||
|
|
||||||
//---- topPaddingField ----
|
//---- topPaddingField ----
|
||||||
topPaddingField.setName("topPaddingField");
|
|
||||||
topPaddingField.addChangeListener(e -> paddingChanged());
|
topPaddingField.addChangeListener(e -> paddingChanged());
|
||||||
panel1.add(topPaddingField, "cell 1 3");
|
panel1.add(topPaddingField, "cell 1 3");
|
||||||
|
|
||||||
//---- bottomPaddingLabel ----
|
//---- bottomPaddingLabel ----
|
||||||
bottomPaddingLabel.setText("Bottom padding:");
|
bottomPaddingLabel.setText("Bottom padding:");
|
||||||
bottomPaddingLabel.setName("bottomPaddingLabel");
|
|
||||||
panel1.add(bottomPaddingLabel, "cell 0 4");
|
panel1.add(bottomPaddingLabel, "cell 0 4");
|
||||||
|
|
||||||
//---- bottomPaddingField ----
|
//---- bottomPaddingField ----
|
||||||
bottomPaddingField.setName("bottomPaddingField");
|
|
||||||
bottomPaddingField.addChangeListener(e -> paddingChanged());
|
bottomPaddingField.addChangeListener(e -> paddingChanged());
|
||||||
panel1.add(bottomPaddingField, "cell 1 4");
|
panel1.add(bottomPaddingField, "cell 1 4");
|
||||||
|
|
||||||
//---- leadingIconCheckBox ----
|
//---- leadingIconCheckBox ----
|
||||||
leadingIconCheckBox.setText("leading icon");
|
leadingIconCheckBox.setText("leading icon");
|
||||||
leadingIconCheckBox.setName("leadingIconCheckBox");
|
|
||||||
leadingIconCheckBox.addActionListener(e -> leadingIcon());
|
leadingIconCheckBox.addActionListener(e -> leadingIcon());
|
||||||
panel1.add(leadingIconCheckBox, "cell 0 5 2 1,alignx left,growx 0");
|
panel1.add(leadingIconCheckBox, "cell 0 5 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- trailingIconCheckBox ----
|
//---- trailingIconCheckBox ----
|
||||||
trailingIconCheckBox.setText("trailing icon");
|
trailingIconCheckBox.setText("trailing icon");
|
||||||
trailingIconCheckBox.setName("trailingIconCheckBox");
|
|
||||||
trailingIconCheckBox.addActionListener(e -> trailingIcon());
|
trailingIconCheckBox.addActionListener(e -> trailingIcon());
|
||||||
panel1.add(trailingIconCheckBox, "cell 0 6 2 1,alignx left,growx 0");
|
panel1.add(trailingIconCheckBox, "cell 0 6 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- leadingComponentCheckBox ----
|
//---- leadingComponentCheckBox ----
|
||||||
leadingComponentCheckBox.setText("leading component");
|
leadingComponentCheckBox.setText("leading component");
|
||||||
leadingComponentCheckBox.setName("leadingComponentCheckBox");
|
|
||||||
leadingComponentCheckBox.addActionListener(e -> leadingComponent());
|
leadingComponentCheckBox.addActionListener(e -> leadingComponent());
|
||||||
panel1.add(leadingComponentCheckBox, "cell 0 7 2 1,alignx left,growx 0");
|
panel1.add(leadingComponentCheckBox, "cell 0 7 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- trailingComponentCheckBox ----
|
//---- trailingComponentCheckBox ----
|
||||||
trailingComponentCheckBox.setText("trailing component");
|
trailingComponentCheckBox.setText("trailing component");
|
||||||
trailingComponentCheckBox.setName("trailingComponentCheckBox");
|
|
||||||
trailingComponentCheckBox.addActionListener(e -> trailingComponent());
|
trailingComponentCheckBox.addActionListener(e -> trailingComponent());
|
||||||
panel1.add(trailingComponentCheckBox, "cell 0 8 2 1,alignx left,growx 0");
|
panel1.add(trailingComponentCheckBox, "cell 0 8 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- leadingComponentVisibleCheckBox ----
|
//---- leadingComponentVisibleCheckBox ----
|
||||||
leadingComponentVisibleCheckBox.setText("leading component visible");
|
leadingComponentVisibleCheckBox.setText("leading component visible");
|
||||||
leadingComponentVisibleCheckBox.setSelected(true);
|
leadingComponentVisibleCheckBox.setSelected(true);
|
||||||
leadingComponentVisibleCheckBox.setName("leadingComponentVisibleCheckBox");
|
|
||||||
leadingComponentVisibleCheckBox.addActionListener(e -> leadingComponentVisible());
|
leadingComponentVisibleCheckBox.addActionListener(e -> leadingComponentVisible());
|
||||||
panel1.add(leadingComponentVisibleCheckBox, "cell 0 9 2 1,alignx left,growx 0");
|
panel1.add(leadingComponentVisibleCheckBox, "cell 0 9 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- trailingComponentVisibleCheckBox ----
|
//---- trailingComponentVisibleCheckBox ----
|
||||||
trailingComponentVisibleCheckBox.setText("trailing component visible");
|
trailingComponentVisibleCheckBox.setText("trailing component visible");
|
||||||
trailingComponentVisibleCheckBox.setSelected(true);
|
trailingComponentVisibleCheckBox.setSelected(true);
|
||||||
trailingComponentVisibleCheckBox.setName("trailingComponentVisibleCheckBox");
|
|
||||||
trailingComponentVisibleCheckBox.addActionListener(e -> trailingComponentVisible());
|
trailingComponentVisibleCheckBox.addActionListener(e -> trailingComponentVisible());
|
||||||
panel1.add(trailingComponentVisibleCheckBox, "cell 0 10 2 1,alignx left,growx 0");
|
panel1.add(trailingComponentVisibleCheckBox, "cell 0 10 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- showClearButtonCheckBox ----
|
//---- showClearButtonCheckBox ----
|
||||||
showClearButtonCheckBox.setText("clear button");
|
showClearButtonCheckBox.setText("clear button");
|
||||||
showClearButtonCheckBox.setName("showClearButtonCheckBox");
|
|
||||||
showClearButtonCheckBox.addActionListener(e -> showClearButton());
|
showClearButtonCheckBox.addActionListener(e -> showClearButton());
|
||||||
panel1.add(showClearButtonCheckBox, "cell 0 11 2 1,alignx left,growx 0");
|
panel1.add(showClearButtonCheckBox, "cell 0 11 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- showRevealButtonCheckBox ----
|
//---- showRevealButtonCheckBox ----
|
||||||
showRevealButtonCheckBox.setText("password reveal button");
|
showRevealButtonCheckBox.setText("password reveal button");
|
||||||
showRevealButtonCheckBox.setName("showRevealButtonCheckBox");
|
|
||||||
showRevealButtonCheckBox.addActionListener(e -> showRevealButton());
|
showRevealButtonCheckBox.addActionListener(e -> showRevealButton());
|
||||||
panel1.add(showRevealButtonCheckBox, "cell 0 12 2 1,alignx left,growx 0");
|
panel1.add(showRevealButtonCheckBox, "cell 0 12 2 1,alignx left,growx 0");
|
||||||
}
|
}
|
||||||
@@ -440,50 +414,42 @@ public class FlatTextComponentsTest
|
|||||||
passwordFieldLabel.setText("JPasswordField:");
|
passwordFieldLabel.setText("JPasswordField:");
|
||||||
passwordFieldLabel.setDisplayedMnemonic('P');
|
passwordFieldLabel.setDisplayedMnemonic('P');
|
||||||
passwordFieldLabel.setLabelFor(passwordField1);
|
passwordFieldLabel.setLabelFor(passwordField1);
|
||||||
passwordFieldLabel.setName("passwordFieldLabel");
|
|
||||||
add(passwordFieldLabel, "cell 0 2");
|
add(passwordFieldLabel, "cell 0 2");
|
||||||
|
|
||||||
//---- passwordField1 ----
|
//---- passwordField1 ----
|
||||||
passwordField1.setText("editable");
|
passwordField1.setText("editable");
|
||||||
passwordField1.setComponentPopupMenu(popupMenu1);
|
passwordField1.setComponentPopupMenu(popupMenu1);
|
||||||
passwordField1.putClientProperty("JTextField.placeholderText", "place");
|
passwordField1.putClientProperty("JTextField.placeholderText", "place");
|
||||||
passwordField1.setName("passwordField1");
|
|
||||||
add(passwordField1, "cell 1 2,growx");
|
add(passwordField1, "cell 1 2,growx");
|
||||||
|
|
||||||
//---- passwordField3 ----
|
//---- passwordField3 ----
|
||||||
passwordField3.setText("longer text for testing horizontal scrolling");
|
passwordField3.setText("longer text for testing horizontal scrolling");
|
||||||
passwordField3.setComponentPopupMenu(popupMenu1);
|
passwordField3.setComponentPopupMenu(popupMenu1);
|
||||||
passwordField3.putClientProperty("JTextField.placeholderText", "place");
|
passwordField3.putClientProperty("JTextField.placeholderText", "place");
|
||||||
passwordField3.setName("passwordField3");
|
|
||||||
add(passwordField3, "cell 2 2,growx");
|
add(passwordField3, "cell 2 2,growx");
|
||||||
|
|
||||||
//---- textAreaLabel ----
|
//---- textAreaLabel ----
|
||||||
textAreaLabel.setText("JTextArea:");
|
textAreaLabel.setText("JTextArea:");
|
||||||
textAreaLabel.setDisplayedMnemonic('A');
|
textAreaLabel.setDisplayedMnemonic('A');
|
||||||
textAreaLabel.setLabelFor(textArea1);
|
textAreaLabel.setLabelFor(textArea1);
|
||||||
textAreaLabel.setName("textAreaLabel");
|
|
||||||
add(textAreaLabel, "cell 0 3");
|
add(textAreaLabel, "cell 0 3");
|
||||||
|
|
||||||
//======== scrollPane1 ========
|
//======== scrollPane1 ========
|
||||||
{
|
{
|
||||||
scrollPane1.setName("scrollPane1");
|
|
||||||
|
|
||||||
//---- textArea1 ----
|
//---- textArea1 ----
|
||||||
textArea1.setText("editable");
|
textArea1.setText("editable");
|
||||||
textArea1.setComponentPopupMenu(popupMenu1);
|
textArea1.setComponentPopupMenu(popupMenu1);
|
||||||
textArea1.setName("textArea1");
|
|
||||||
scrollPane1.setViewportView(textArea1);
|
scrollPane1.setViewportView(textArea1);
|
||||||
}
|
}
|
||||||
add(scrollPane1, "cell 1 3,growx");
|
add(scrollPane1, "cell 1 3,growx");
|
||||||
|
|
||||||
//======== scrollPane3 ========
|
//======== scrollPane3 ========
|
||||||
{
|
{
|
||||||
scrollPane3.setName("scrollPane3");
|
|
||||||
|
|
||||||
//---- textArea3 ----
|
//---- textArea3 ----
|
||||||
textArea3.setText("longer text for testing horizontal scrolling");
|
textArea3.setText("longer text for testing horizontal scrolling");
|
||||||
textArea3.setComponentPopupMenu(popupMenu1);
|
textArea3.setComponentPopupMenu(popupMenu1);
|
||||||
textArea3.setName("textArea3");
|
|
||||||
scrollPane3.setViewportView(textArea3);
|
scrollPane3.setViewportView(textArea3);
|
||||||
}
|
}
|
||||||
add(scrollPane3, "cell 2 3,growx");
|
add(scrollPane3, "cell 2 3,growx");
|
||||||
@@ -492,29 +458,24 @@ public class FlatTextComponentsTest
|
|||||||
editorPaneLabel.setText("JEditorPane");
|
editorPaneLabel.setText("JEditorPane");
|
||||||
editorPaneLabel.setDisplayedMnemonic('J');
|
editorPaneLabel.setDisplayedMnemonic('J');
|
||||||
editorPaneLabel.setLabelFor(editorPane1);
|
editorPaneLabel.setLabelFor(editorPane1);
|
||||||
editorPaneLabel.setName("editorPaneLabel");
|
|
||||||
add(editorPaneLabel, "cell 0 4");
|
add(editorPaneLabel, "cell 0 4");
|
||||||
|
|
||||||
//======== scrollPane5 ========
|
//======== scrollPane5 ========
|
||||||
{
|
{
|
||||||
scrollPane5.setName("scrollPane5");
|
|
||||||
|
|
||||||
//---- editorPane1 ----
|
//---- editorPane1 ----
|
||||||
editorPane1.setText("editable");
|
editorPane1.setText("editable");
|
||||||
editorPane1.setComponentPopupMenu(popupMenu1);
|
editorPane1.setComponentPopupMenu(popupMenu1);
|
||||||
editorPane1.setName("editorPane1");
|
|
||||||
scrollPane5.setViewportView(editorPane1);
|
scrollPane5.setViewportView(editorPane1);
|
||||||
}
|
}
|
||||||
add(scrollPane5, "cell 1 4,growx");
|
add(scrollPane5, "cell 1 4,growx");
|
||||||
|
|
||||||
//======== scrollPane7 ========
|
//======== scrollPane7 ========
|
||||||
{
|
{
|
||||||
scrollPane7.setName("scrollPane7");
|
|
||||||
|
|
||||||
//---- editorPane3 ----
|
//---- editorPane3 ----
|
||||||
editorPane3.setText("longer text for testing horizontal scrolling");
|
editorPane3.setText("longer text for testing horizontal scrolling");
|
||||||
editorPane3.setComponentPopupMenu(popupMenu1);
|
editorPane3.setComponentPopupMenu(popupMenu1);
|
||||||
editorPane3.setName("editorPane3");
|
|
||||||
scrollPane7.setViewportView(editorPane3);
|
scrollPane7.setViewportView(editorPane3);
|
||||||
}
|
}
|
||||||
add(scrollPane7, "cell 2 4,growx");
|
add(scrollPane7, "cell 2 4,growx");
|
||||||
@@ -523,29 +484,24 @@ public class FlatTextComponentsTest
|
|||||||
textPaneLabel.setText("JTextPane:");
|
textPaneLabel.setText("JTextPane:");
|
||||||
textPaneLabel.setDisplayedMnemonic('N');
|
textPaneLabel.setDisplayedMnemonic('N');
|
||||||
textPaneLabel.setLabelFor(textPane1);
|
textPaneLabel.setLabelFor(textPane1);
|
||||||
textPaneLabel.setName("textPaneLabel");
|
|
||||||
add(textPaneLabel, "cell 0 5");
|
add(textPaneLabel, "cell 0 5");
|
||||||
|
|
||||||
//======== scrollPane9 ========
|
//======== scrollPane9 ========
|
||||||
{
|
{
|
||||||
scrollPane9.setName("scrollPane9");
|
|
||||||
|
|
||||||
//---- textPane1 ----
|
//---- textPane1 ----
|
||||||
textPane1.setText("editable");
|
textPane1.setText("editable");
|
||||||
textPane1.setComponentPopupMenu(popupMenu1);
|
textPane1.setComponentPopupMenu(popupMenu1);
|
||||||
textPane1.setName("textPane1");
|
|
||||||
scrollPane9.setViewportView(textPane1);
|
scrollPane9.setViewportView(textPane1);
|
||||||
}
|
}
|
||||||
add(scrollPane9, "cell 1 5,growx");
|
add(scrollPane9, "cell 1 5,growx");
|
||||||
|
|
||||||
//======== scrollPane11 ========
|
//======== scrollPane11 ========
|
||||||
{
|
{
|
||||||
scrollPane11.setName("scrollPane11");
|
|
||||||
|
|
||||||
//---- textPane3 ----
|
//---- textPane3 ----
|
||||||
textPane3.setText("longer text for testing horizontal scrolling");
|
textPane3.setText("longer text for testing horizontal scrolling");
|
||||||
textPane3.setComponentPopupMenu(popupMenu1);
|
textPane3.setComponentPopupMenu(popupMenu1);
|
||||||
textPane3.setName("textPane3");
|
|
||||||
scrollPane11.setViewportView(textPane3);
|
scrollPane11.setViewportView(textPane3);
|
||||||
}
|
}
|
||||||
add(scrollPane11, "cell 2 5,growx");
|
add(scrollPane11, "cell 2 5,growx");
|
||||||
@@ -554,7 +510,6 @@ public class FlatTextComponentsTest
|
|||||||
comboBoxLabel.setText("JComboBox:");
|
comboBoxLabel.setText("JComboBox:");
|
||||||
comboBoxLabel.setDisplayedMnemonic('C');
|
comboBoxLabel.setDisplayedMnemonic('C');
|
||||||
comboBoxLabel.setLabelFor(comboBox1);
|
comboBoxLabel.setLabelFor(comboBox1);
|
||||||
comboBoxLabel.setName("comboBoxLabel");
|
|
||||||
add(comboBoxLabel, "cell 0 6");
|
add(comboBoxLabel, "cell 0 6");
|
||||||
|
|
||||||
//---- comboBox1 ----
|
//---- comboBox1 ----
|
||||||
@@ -566,7 +521,6 @@ public class FlatTextComponentsTest
|
|||||||
"ccc"
|
"ccc"
|
||||||
}));
|
}));
|
||||||
comboBox1.setComponentPopupMenu(popupMenu1);
|
comboBox1.setComponentPopupMenu(popupMenu1);
|
||||||
comboBox1.setName("comboBox1");
|
|
||||||
add(comboBox1, "cell 1 6,growx");
|
add(comboBox1, "cell 1 6,growx");
|
||||||
|
|
||||||
//---- comboBox3 ----
|
//---- comboBox3 ----
|
||||||
@@ -579,154 +533,121 @@ public class FlatTextComponentsTest
|
|||||||
comboBox3.setEditable(true);
|
comboBox3.setEditable(true);
|
||||||
comboBox3.setPrototypeDisplayValue("12345");
|
comboBox3.setPrototypeDisplayValue("12345");
|
||||||
comboBox3.setComponentPopupMenu(popupMenu1);
|
comboBox3.setComponentPopupMenu(popupMenu1);
|
||||||
comboBox3.setName("comboBox3");
|
|
||||||
add(comboBox3, "cell 2 6,growx,wmin 50");
|
add(comboBox3, "cell 2 6,growx,wmin 50");
|
||||||
|
|
||||||
//---- spinnerLabel ----
|
//---- spinnerLabel ----
|
||||||
spinnerLabel.setText("JSpinner:");
|
spinnerLabel.setText("JSpinner:");
|
||||||
spinnerLabel.setDisplayedMnemonic('S');
|
spinnerLabel.setDisplayedMnemonic('S');
|
||||||
spinnerLabel.setLabelFor(spinner1);
|
spinnerLabel.setLabelFor(spinner1);
|
||||||
spinnerLabel.setName("spinnerLabel");
|
|
||||||
add(spinnerLabel, "cell 0 7");
|
add(spinnerLabel, "cell 0 7");
|
||||||
|
|
||||||
//---- spinner1 ----
|
//---- spinner1 ----
|
||||||
spinner1.setComponentPopupMenu(popupMenu1);
|
spinner1.setComponentPopupMenu(popupMenu1);
|
||||||
spinner1.setName("spinner1");
|
|
||||||
add(spinner1, "cell 1 7,growx");
|
add(spinner1, "cell 1 7,growx");
|
||||||
|
|
||||||
//---- label2 ----
|
//---- label2 ----
|
||||||
label2.setText("<html>Large row height:<br>(default pref height)</html>");
|
label2.setText("<html>Large row height:<br>(default pref height)</html>");
|
||||||
label2.setName("label2");
|
|
||||||
add(label2, "cell 0 8,aligny top,growy 0");
|
add(label2, "cell 0 8,aligny top,growy 0");
|
||||||
|
|
||||||
//---- comboBox2 ----
|
//---- comboBox2 ----
|
||||||
comboBox2.setEditable(true);
|
comboBox2.setEditable(true);
|
||||||
comboBox2.setName("comboBox2");
|
|
||||||
add(comboBox2, "cell 1 8,grow");
|
add(comboBox2, "cell 1 8,grow");
|
||||||
|
|
||||||
//---- spinner2 ----
|
|
||||||
spinner2.setName("spinner2");
|
|
||||||
add(spinner2, "cell 1 9,grow");
|
add(spinner2, "cell 1 9,grow");
|
||||||
|
|
||||||
//---- label1 ----
|
//---- label1 ----
|
||||||
label1.setText("Large pref height:");
|
label1.setText("Large pref height:");
|
||||||
label1.setName("label1");
|
|
||||||
add(label1, "cell 0 10,aligny top,growy 0");
|
add(label1, "cell 0 10,aligny top,growy 0");
|
||||||
|
|
||||||
//---- comboBox5 ----
|
//---- comboBox5 ----
|
||||||
comboBox5.setPreferredSize(new Dimension(60, 40));
|
comboBox5.setPreferredSize(new Dimension(60, 40));
|
||||||
comboBox5.setEditable(true);
|
comboBox5.setEditable(true);
|
||||||
comboBox5.setName("comboBox5");
|
|
||||||
add(comboBox5, "cell 1 10,growx");
|
add(comboBox5, "cell 1 10,growx");
|
||||||
|
|
||||||
//---- spinner4 ----
|
//---- spinner4 ----
|
||||||
spinner4.setPreferredSize(new Dimension(60, 40));
|
spinner4.setPreferredSize(new Dimension(60, 40));
|
||||||
spinner4.setName("spinner4");
|
|
||||||
add(spinner4, "cell 1 11,growx");
|
add(spinner4, "cell 1 11,growx");
|
||||||
|
|
||||||
//---- label3 ----
|
//---- label3 ----
|
||||||
label3.setText("<html>Small row height:<br>(default pref height)</html>");
|
label3.setText("<html>Small row height:<br>(default pref height)</html>");
|
||||||
label3.setName("label3");
|
|
||||||
add(label3, "cell 0 12 1 2,aligny top,growy 0");
|
add(label3, "cell 0 12 1 2,aligny top,growy 0");
|
||||||
|
|
||||||
//---- comboBox4 ----
|
//---- comboBox4 ----
|
||||||
comboBox4.setEditable(true);
|
comboBox4.setEditable(true);
|
||||||
comboBox4.setName("comboBox4");
|
|
||||||
add(comboBox4, "cell 1 12,growx");
|
add(comboBox4, "cell 1 12,growx");
|
||||||
|
|
||||||
//---- spinner3 ----
|
|
||||||
spinner3.setName("spinner3");
|
|
||||||
add(spinner3, "cell 1 13,growx");
|
add(spinner3, "cell 1 13,growx");
|
||||||
|
|
||||||
//---- label4 ----
|
//---- label4 ----
|
||||||
label4.setText("Small pref height:");
|
label4.setText("Small pref height:");
|
||||||
label4.setName("label4");
|
|
||||||
add(label4, "cell 0 14 1 2,aligny top,growy 0");
|
add(label4, "cell 0 14 1 2,aligny top,growy 0");
|
||||||
|
|
||||||
//---- comboBox6 ----
|
//---- comboBox6 ----
|
||||||
comboBox6.setEditable(true);
|
comboBox6.setEditable(true);
|
||||||
comboBox6.setPreferredSize(new Dimension(60, 14));
|
comboBox6.setPreferredSize(new Dimension(60, 14));
|
||||||
comboBox6.setMinimumSize(new Dimension(60, 14));
|
comboBox6.setMinimumSize(new Dimension(60, 14));
|
||||||
comboBox6.setName("comboBox6");
|
|
||||||
add(comboBox6, "cell 1 14,growx");
|
add(comboBox6, "cell 1 14,growx");
|
||||||
|
|
||||||
//---- spinner5 ----
|
//---- spinner5 ----
|
||||||
spinner5.setMinimumSize(new Dimension(60, 14));
|
spinner5.setMinimumSize(new Dimension(60, 14));
|
||||||
spinner5.setPreferredSize(new Dimension(60, 14));
|
spinner5.setPreferredSize(new Dimension(60, 14));
|
||||||
spinner5.setName("spinner5");
|
|
||||||
add(spinner5, "cell 1 15,growx,hmax 14");
|
add(spinner5, "cell 1 15,growx,hmax 14");
|
||||||
|
|
||||||
//---- label5 ----
|
//---- label5 ----
|
||||||
label5.setText("Double-click-and-drag:");
|
label5.setText("Double-click-and-drag:");
|
||||||
label5.setName("label5");
|
|
||||||
add(label5, "cell 0 16");
|
add(label5, "cell 0 16");
|
||||||
|
|
||||||
//---- textField ----
|
//---- textField ----
|
||||||
textField.setText("123 456 789 abc def");
|
textField.setText("123 456 789 abc def");
|
||||||
textField.setName("textField");
|
|
||||||
add(textField, "cell 1 16 2 1,growx");
|
add(textField, "cell 1 16 2 1,growx");
|
||||||
|
|
||||||
//---- dragEnabledCheckBox ----
|
//---- dragEnabledCheckBox ----
|
||||||
dragEnabledCheckBox.setText("Drag enabled");
|
dragEnabledCheckBox.setText("Drag enabled");
|
||||||
dragEnabledCheckBox.setName("dragEnabledCheckBox");
|
|
||||||
dragEnabledCheckBox.addActionListener(e -> dragEnabledChanged());
|
dragEnabledCheckBox.addActionListener(e -> dragEnabledChanged());
|
||||||
add(dragEnabledCheckBox, "cell 3 16 2 1,alignx left,growx 0");
|
add(dragEnabledCheckBox, "cell 3 16 2 1,alignx left,growx 0");
|
||||||
|
|
||||||
//---- label6 ----
|
//---- label6 ----
|
||||||
label6.setText("<html>JTextArea<br>JTextPane<br>JEditorPane</html>");
|
label6.setText("<html>JTextArea<br>JTextPane<br>JEditorPane</html>");
|
||||||
label6.setName("label6");
|
|
||||||
add(label6, "cell 0 17,align right top,grow 0 0");
|
add(label6, "cell 0 17,align right top,grow 0 0");
|
||||||
|
|
||||||
//======== scrollPane2 ========
|
//======== scrollPane2 ========
|
||||||
{
|
{
|
||||||
scrollPane2.setName("scrollPane2");
|
|
||||||
|
|
||||||
//---- textArea ----
|
//---- textArea ----
|
||||||
textArea.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
textArea.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
||||||
textArea.setName("textArea");
|
|
||||||
scrollPane2.setViewportView(textArea);
|
scrollPane2.setViewportView(textArea);
|
||||||
}
|
}
|
||||||
add(scrollPane2, "cell 1 17 4 1,growx");
|
add(scrollPane2, "cell 1 17 4 1,growx");
|
||||||
|
|
||||||
//======== scrollPane4 ========
|
//======== scrollPane4 ========
|
||||||
{
|
{
|
||||||
scrollPane4.setName("scrollPane4");
|
|
||||||
|
|
||||||
//---- textPane ----
|
//---- textPane ----
|
||||||
textPane.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
textPane.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
||||||
textPane.setName("textPane");
|
|
||||||
scrollPane4.setViewportView(textPane);
|
scrollPane4.setViewportView(textPane);
|
||||||
}
|
}
|
||||||
add(scrollPane4, "cell 1 17 4 1,growx");
|
add(scrollPane4, "cell 1 17 4 1,growx");
|
||||||
|
|
||||||
//======== scrollPane6 ========
|
//======== scrollPane6 ========
|
||||||
{
|
{
|
||||||
scrollPane6.setName("scrollPane6");
|
|
||||||
|
|
||||||
//---- editorPane ----
|
//---- editorPane ----
|
||||||
editorPane.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
editorPane.setText("1 123 456 789 abc def\n2 123 456 789 abc def\n3 123 456 789 abc def\n4 123 456 789 abc def\n5 123 456 789 abc def\n6 123 456 789 abc def\n7 123 456 789 abc def\n8 123 456 789 abc def");
|
||||||
editorPane.setName("editorPane");
|
|
||||||
scrollPane6.setViewportView(editorPane);
|
scrollPane6.setViewportView(editorPane);
|
||||||
}
|
}
|
||||||
add(scrollPane6, "cell 1 17 4 1,growx");
|
add(scrollPane6, "cell 1 17 4 1,growx");
|
||||||
|
|
||||||
//======== popupMenu1 ========
|
//======== popupMenu1 ========
|
||||||
{
|
{
|
||||||
popupMenu1.setName("popupMenu1");
|
|
||||||
|
|
||||||
//---- cutMenuItem ----
|
//---- cutMenuItem ----
|
||||||
cutMenuItem.setText("Cut");
|
cutMenuItem.setText("Cut");
|
||||||
cutMenuItem.setName("cutMenuItem");
|
|
||||||
popupMenu1.add(cutMenuItem);
|
popupMenu1.add(cutMenuItem);
|
||||||
|
|
||||||
//---- copyMenuItem ----
|
//---- copyMenuItem ----
|
||||||
copyMenuItem.setText("Copy");
|
copyMenuItem.setText("Copy");
|
||||||
copyMenuItem.setName("copyMenuItem");
|
|
||||||
popupMenu1.add(copyMenuItem);
|
popupMenu1.add(copyMenuItem);
|
||||||
|
|
||||||
//---- pasteMenuItem ----
|
//---- pasteMenuItem ----
|
||||||
pasteMenuItem.setText("Paste");
|
pasteMenuItem.setText("Paste");
|
||||||
pasteMenuItem.setName("pasteMenuItem");
|
|
||||||
popupMenu1.add(pasteMenuItem);
|
popupMenu1.add(pasteMenuItem);
|
||||||
}
|
}
|
||||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
JFDML JFormDesigner: "7.0.4.0.360" Java: "17" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.5.0.404" Java: "17" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
"$setComponentNames": true
|
|
||||||
auxiliary() {
|
auxiliary() {
|
||||||
"JavaCodeGenerator.defaultVariableLocal": true
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user