mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 14:37:13 -06:00
Merge PR #534: ToolBar: hover effect for button groups
This commit is contained in:
@@ -1311,6 +1311,8 @@ ToolBar.font [active] $defaultFont [UI]
|
||||
ToolBar.foreground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.gripColor #aeaeae HSL 0 0 68 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.highlight #232324 HSL 240 1 14 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.hoverButtonGroupArc 8
|
||||
ToolBar.hoverButtonGroupBackground #434749 HSL 200 4 27 com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse)
|
||||
ToolBar.isRollover true
|
||||
ToolBar.light #2f3031 HSL 210 2 19 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.separatorColor #505254 HSL 210 2 32 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1316,6 +1316,8 @@ ToolBar.font [active] $defaultFont [UI]
|
||||
ToolBar.foreground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.gripColor #b1b1b1 HSL 0 0 69 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.highlight #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.hoverButtonGroupArc 8
|
||||
ToolBar.hoverButtonGroupBackground #eaeaea HSL 0 0 92 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
|
||||
ToolBar.isRollover true
|
||||
ToolBar.light #e1e1e1 HSL 0 0 88 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.separatorColor #cecece HSL 0 0 81 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1359,6 +1359,8 @@ ToolBar.font [active] $defaultFont [UI]
|
||||
ToolBar.foreground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.gripColor #afafaf HSL 0 0 69 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.highlight #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.hoverButtonGroupArc 8
|
||||
ToolBar.hoverButtonGroupBackground #ffdddd HSL 0 100 93 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.isRollover true
|
||||
ToolBar.light #e3e3e3 HSL 0 0 89 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolBar.separatorColor #00bb00 HSL 120 100 37 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -437,6 +437,14 @@ public class FlatComponentsTest
|
||||
FlatButton button29 = new FlatButton();
|
||||
FlatToggleButton toggleButton25 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton26 = new FlatToggleButton();
|
||||
JLabel label5 = new JLabel();
|
||||
FlatComponentsTest.TestToolBar toolBar5 = new FlatComponentsTest.TestToolBar();
|
||||
FlatToggleButton toggleButton27 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton28 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton29 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton30 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton31 = new FlatToggleButton();
|
||||
FlatToggleButton toggleButton32 = new FlatToggleButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -1540,11 +1548,11 @@ public class FlatComponentsTest
|
||||
toggleButton17.setSelected(true);
|
||||
toolBar1.add(toggleButton17);
|
||||
}
|
||||
add(toolBar1, "cell 1 23 5 1");
|
||||
add(toolBar1, "cell 1 23 6 1");
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("Square:");
|
||||
add(label3, "cell 1 23 5 1");
|
||||
add(label3, "cell 1 23 6 1");
|
||||
|
||||
//======== toolBar3 ========
|
||||
{
|
||||
@@ -1571,11 +1579,11 @@ public class FlatComponentsTest
|
||||
toggleButton24.setButtonType(FlatButton.ButtonType.square);
|
||||
toolBar3.add(toggleButton24);
|
||||
}
|
||||
add(toolBar3, "cell 1 23 5 1");
|
||||
add(toolBar3, "cell 1 23 6 1");
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("Round:");
|
||||
add(label4, "cell 1 23 5 1");
|
||||
add(label4, "cell 1 23 6 1");
|
||||
|
||||
//======== toolBar4 ========
|
||||
{
|
||||
@@ -1602,7 +1610,45 @@ public class FlatComponentsTest
|
||||
toggleButton26.setButtonType(FlatButton.ButtonType.roundRect);
|
||||
toolBar4.add(toggleButton26);
|
||||
}
|
||||
add(toolBar4, "cell 1 23 5 1");
|
||||
add(toolBar4, "cell 1 23 6 1");
|
||||
|
||||
//---- label5 ----
|
||||
label5.setText("Group:");
|
||||
add(label5, "cell 1 23 6 1");
|
||||
|
||||
//======== toolBar5 ========
|
||||
{
|
||||
|
||||
//---- toggleButton27 ----
|
||||
toggleButton27.setIcon(UIManager.getIcon("FileView.computerIcon"));
|
||||
toggleButton27.setSelected(true);
|
||||
toolBar5.add(toggleButton27);
|
||||
|
||||
//---- toggleButton28 ----
|
||||
toggleButton28.setIcon(UIManager.getIcon("FileView.computerIcon"));
|
||||
toolBar5.add(toggleButton28);
|
||||
toolBar5.addSeparator();
|
||||
|
||||
//---- toggleButton29 ----
|
||||
toggleButton29.setIcon(UIManager.getIcon("FileView.computerIcon"));
|
||||
toolBar5.add(toggleButton29);
|
||||
toolBar5.addSeparator();
|
||||
|
||||
//---- toggleButton30 ----
|
||||
toggleButton30.setIcon(UIManager.getIcon("FileView.floppyDriveIcon"));
|
||||
toggleButton30.setSelected(true);
|
||||
toolBar5.add(toggleButton30);
|
||||
|
||||
//---- toggleButton31 ----
|
||||
toggleButton31.setIcon(UIManager.getIcon("FileView.floppyDriveIcon"));
|
||||
toolBar5.add(toggleButton31);
|
||||
toolBar5.addSeparator();
|
||||
|
||||
//---- toggleButton32 ----
|
||||
toggleButton32.setIcon(UIManager.getIcon("FileView.computerIcon"));
|
||||
toolBar5.add(toggleButton32);
|
||||
}
|
||||
add(toolBar5, "cell 1 23 6 1");
|
||||
|
||||
//---- buttonGroup1 ----
|
||||
ButtonGroup buttonGroup1 = new ButtonGroup();
|
||||
@@ -1611,6 +1657,18 @@ public class FlatComponentsTest
|
||||
buttonGroup1.add(warningOutlineRadioButton);
|
||||
buttonGroup1.add(magentaOutlineRadioButton);
|
||||
buttonGroup1.add(magentaCyanOutlineRadioButton);
|
||||
|
||||
//---- buttonGroup2 ----
|
||||
ButtonGroup buttonGroup2 = new ButtonGroup();
|
||||
buttonGroup2.add(toggleButton27);
|
||||
buttonGroup2.add(toggleButton28);
|
||||
buttonGroup2.add(toggleButton29);
|
||||
buttonGroup2.add(toggleButton32);
|
||||
|
||||
//---- buttonGroup3 ----
|
||||
ButtonGroup buttonGroup3 = new ButtonGroup();
|
||||
buttonGroup3.add(toggleButton30);
|
||||
buttonGroup3.add(toggleButton31);
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
|
||||
// Unicode surrogate character pair "script capital A"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.3.1.342" Java: "15" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.5.0.404" Java: "17.0.2" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -1465,13 +1465,13 @@ new FormModel {
|
||||
"selected": true
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 5 1"
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "Square:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 5 1"
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar3"
|
||||
@@ -1498,13 +1498,13 @@ new FormModel {
|
||||
"buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType square
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 5 1"
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
"text": "Round:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 5 1"
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar4"
|
||||
@@ -1531,7 +1531,59 @@ new FormModel {
|
||||
"buttonType": enum com.formdev.flatlaf.extras.components.FlatButton$ButtonType roundRect
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 5 1"
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label5"
|
||||
"text": "Group:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatComponentsTest$TestToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar5"
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton27"
|
||||
"icon": #SwingIcon4
|
||||
"selected": true
|
||||
"$buttonGroup": new FormReference( "buttonGroup2" )
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton28"
|
||||
"icon": #SwingIcon4
|
||||
"$buttonGroup": new FormReference( "buttonGroup2" )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator6"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton29"
|
||||
"icon": #SwingIcon4
|
||||
"$buttonGroup": new FormReference( "buttonGroup2" )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator8"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton30"
|
||||
"icon": #SwingIcon5
|
||||
"$buttonGroup": new FormReference( "buttonGroup3" )
|
||||
"selected": true
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton31"
|
||||
"icon": #SwingIcon5
|
||||
"$buttonGroup": new FormReference( "buttonGroup3" )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator7"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatToggleButton" ) {
|
||||
name: "toggleButton32"
|
||||
"icon": #SwingIcon4
|
||||
"$buttonGroup": new FormReference( "buttonGroup2" )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 23 6 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
@@ -1542,5 +1594,15 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 810 )
|
||||
} )
|
||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||
name: "buttonGroup2"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 862 )
|
||||
} )
|
||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||
name: "buttonGroup3"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 914 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,6 +463,7 @@ ToggleButton.tab.focusForeground = #080
|
||||
#---- ToolBar ----
|
||||
|
||||
ToolBar.focusableButtons = true
|
||||
ToolBar.hoverButtonGroupBackground = #fdd
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
Reference in New Issue
Block a user