mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Demo: tooltips added to toolbar buttons
This commit is contained in:
@@ -205,18 +205,37 @@ class DemoFrame
|
||||
//======== toolBar1 ========
|
||||
{
|
||||
toolBar1.setMargin(new Insets(3, 3, 3, 3));
|
||||
|
||||
//---- backButton ----
|
||||
backButton.setToolTipText("Back");
|
||||
toolBar1.add(backButton);
|
||||
|
||||
//---- forwardButton ----
|
||||
forwardButton.setToolTipText("Forward");
|
||||
toolBar1.add(forwardButton);
|
||||
toolBar1.addSeparator();
|
||||
|
||||
//---- cutButton ----
|
||||
cutButton.setToolTipText("Cut");
|
||||
toolBar1.add(cutButton);
|
||||
|
||||
//---- copyButton ----
|
||||
copyButton.setToolTipText("Copy");
|
||||
toolBar1.add(copyButton);
|
||||
|
||||
//---- pasteButton ----
|
||||
pasteButton.setToolTipText("Paste");
|
||||
toolBar1.add(pasteButton);
|
||||
toolBar1.addSeparator();
|
||||
|
||||
//---- refreshButton ----
|
||||
refreshButton.setToolTipText("Refresh");
|
||||
toolBar1.add(refreshButton);
|
||||
toolBar1.addSeparator();
|
||||
|
||||
//---- showToggleButton ----
|
||||
showToggleButton.setSelected(true);
|
||||
showToggleButton.setToolTipText("Show Details");
|
||||
toolBar1.add(showToggleButton);
|
||||
}
|
||||
contentPane.add(toolBar1, BorderLayout.NORTH);
|
||||
|
||||
@@ -17,27 +17,33 @@ new FormModel {
|
||||
"margin": new java.awt.Insets( 3, 3, 3, 3 )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "backButton"
|
||||
"toolTipText": "Back"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "forwardButton"
|
||||
"toolTipText": "Forward"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator5"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "cutButton"
|
||||
"toolTipText": "Cut"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "copyButton"
|
||||
"toolTipText": "Copy"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "pasteButton"
|
||||
"toolTipText": "Paste"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator6"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "refreshButton"
|
||||
"toolTipText": "Refresh"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolBar$Separator" ) {
|
||||
name: "separator7"
|
||||
@@ -45,6 +51,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "showToggleButton"
|
||||
"selected": true
|
||||
"toolTipText": "Show Details"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class java.lang.String ) {
|
||||
"value": "North"
|
||||
|
||||
Reference in New Issue
Block a user