HelpButton added

This commit is contained in:
Karl Tauber
2019-09-10 23:46:48 +02:00
parent daf026f8c7
commit b517f64884
13 changed files with 273 additions and 1 deletions

View File

@@ -53,6 +53,8 @@ public class FlatComponentsTest
JButton button1 = new JButton();
JButton button2 = new JButton();
FlatComponentsTest.TestDefaultButton button5 = new FlatComponentsTest.TestDefaultButton();
JButton button3 = new JButton();
JButton button12 = new JButton();
JLabel toggleButtonLabel = new JLabel();
JToggleButton toggleButton1 = new JToggleButton();
JToggleButton toggleButton2 = new JToggleButton();
@@ -231,6 +233,17 @@ public class FlatComponentsTest
button5.setDisplayedMnemonicIndex(0);
add(button5, "cell 3 1");
//---- button3 ----
button3.setText("Help");
button3.putClientProperty("JButton.buttonType", "help");
add(button3, "cell 4 1");
//---- button12 ----
button12.setText("Help");
button12.putClientProperty("JButton.buttonType", "help");
button12.setEnabled(false);
add(button12, "cell 4 1");
//---- toggleButtonLabel ----
toggleButtonLabel.setText("JToggleButton:");
add(toggleButtonLabel, "cell 0 2");

View File

@@ -61,6 +61,21 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "Help"
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button12"
"text": "Help"
"$client.JButton.buttonType": "help"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "toggleButtonLabel"
"text": "JToggleButton:"

View File

@@ -95,6 +95,11 @@ Component.focusColor=97c3f3
#Component.arc=8
#---- HelpButton ----
HelpButton.questionMarkColor=0000ff
#---- Label ----
Label.foreground=008800