mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Button: make button square if button text is "..." or a single character
This commit is contained in:
@@ -58,6 +58,9 @@ public class FlatComponentsTest
|
||||
JButton button3 = new JButton();
|
||||
JButton button12 = new JButton();
|
||||
JButton button13 = new JButton();
|
||||
JButton button14 = new JButton();
|
||||
JButton button15 = new JButton();
|
||||
JButton button16 = new JButton();
|
||||
JLabel toggleButtonLabel = new JLabel();
|
||||
JToggleButton toggleButton1 = new JToggleButton();
|
||||
JToggleButton toggleButton2 = new JToggleButton();
|
||||
@@ -263,6 +266,18 @@ public class FlatComponentsTest
|
||||
button13.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
add(button13, "cell 5 1");
|
||||
|
||||
//---- button14 ----
|
||||
button14.setText("...");
|
||||
add(button14, "cell 5 1");
|
||||
|
||||
//---- button15 ----
|
||||
button15.setText("\u2026");
|
||||
add(button15, "cell 5 1");
|
||||
|
||||
//---- button16 ----
|
||||
button16.setText("#");
|
||||
add(button16, "cell 5 1");
|
||||
|
||||
//---- toggleButtonLabel ----
|
||||
toggleButtonLabel.setText("JToggleButton:");
|
||||
add(toggleButtonLabel, "cell 0 2");
|
||||
|
||||
@@ -85,6 +85,24 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button14"
|
||||
"text": "..."
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button15"
|
||||
"text": "…"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button16"
|
||||
"text": "#"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "toggleButtonLabel"
|
||||
"text": "JToggleButton:"
|
||||
|
||||
Reference in New Issue
Block a user