mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
Button and ToggleButton:
- updated CHANGELOG.md for #276 - FlatComponentsTest: use FlatButton and FlatToggleButton - FlatButtonUI: avoid unnecessary reading client property if shadowColor is null, which is the case in most themes
This commit is contained in:
@@ -253,7 +253,7 @@ public class FlatComponentsTest
|
||||
JButton button16 = new JButton();
|
||||
JButton button24 = new JButton();
|
||||
JButton button20 = new JButton();
|
||||
JButton button25 = new JButton();
|
||||
FlatButton button25 = new FlatButton();
|
||||
JLabel toggleButtonLabel = new JLabel();
|
||||
JToggleButton toggleButton1 = new JToggleButton();
|
||||
FlatToggleButton toggleButton9 = new FlatToggleButton();
|
||||
@@ -269,7 +269,7 @@ public class FlatComponentsTest
|
||||
JToggleButton toggleButton14 = new JToggleButton();
|
||||
JToggleButton toggleButton21 = new JToggleButton();
|
||||
JToggleButton toggleButton18 = new JToggleButton();
|
||||
JToggleButton toggleButton22 = new JToggleButton();
|
||||
FlatToggleButton toggleButton22 = new FlatToggleButton();
|
||||
JLabel checkBoxLabel = new JLabel();
|
||||
JCheckBox checkBox1 = new JCheckBox();
|
||||
JCheckBox checkBox2 = new JCheckBox();
|
||||
@@ -582,7 +582,7 @@ public class FlatComponentsTest
|
||||
|
||||
//---- button25 ----
|
||||
button25.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
button25.putClientProperty("JButton.buttonType", "borderLess");
|
||||
button25.setButtonType(FlatButton.ButtonType.borderless);
|
||||
add(button25, "cell 5 1 2 1");
|
||||
|
||||
//---- toggleButtonLabel ----
|
||||
@@ -665,7 +665,7 @@ public class FlatComponentsTest
|
||||
//---- toggleButton22 ----
|
||||
toggleButton22.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
toggleButton22.setSelected(true);
|
||||
toggleButton22.putClientProperty("JButton.buttonType", "borderLess");
|
||||
toggleButton22.setButtonType(FlatButton.ButtonType.borderless);
|
||||
add(toggleButton22, "cell 5 2 2 1");
|
||||
|
||||
//---- checkBoxLabel ----
|
||||
|
||||
@@ -156,10 +156,10 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatButton" ) {
|
||||
name: "button25"
|
||||
"icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
||||
"$client.JButton.buttonType": "borderLess"
|
||||
"buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType borderless
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1 2 1"
|
||||
} )
|
||||
@@ -270,11 +270,11 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 2 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton22"
|
||||
"icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
||||
"selected": true
|
||||
"$client.JButton.buttonType": "borderLess"
|
||||
"buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType borderless
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 2 2 1"
|
||||
} )
|
||||
|
||||
Reference in New Issue
Block a user