mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
ToolTip implementation
This commit is contained in:
@@ -188,6 +188,11 @@ TableHeader.separatorColor=585858
|
||||
TableHeader.bottomSeparatorColor=585858
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
ToolTip.background=4b4d4d
|
||||
|
||||
|
||||
#---- Tree ----
|
||||
|
||||
Tree.background=@textComponentBackground
|
||||
|
||||
@@ -45,6 +45,7 @@ TableHeaderUI=com.formdev.flatlaf.ui.FlatTableHeaderUI
|
||||
TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI
|
||||
TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI
|
||||
TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
ToolTipUI=javax.swing.plaf.basic.BasicToolTipUI
|
||||
TreeUI=com.formdev.flatlaf.ui.FlatTreeUI
|
||||
ViewportUI=com.formdev.flatlaf.ui.FlatViewportUI
|
||||
|
||||
@@ -258,6 +259,11 @@ TextPane.background=@textComponentBackground
|
||||
TextPane.margin=@textComponentMargin
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
ToolTip.border=2,6,2,6,@@Component.borderColor
|
||||
|
||||
|
||||
#---- Tree ----
|
||||
|
||||
Tree.border=1,1,1,1
|
||||
|
||||
@@ -188,6 +188,11 @@ TableHeader.separatorColor=e5e5e5
|
||||
TableHeader.bottomSeparatorColor=e5e5e5
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
ToolTip.background=f7f7f7
|
||||
|
||||
|
||||
#---- Tree ----
|
||||
|
||||
Tree.background=@textComponentBackground
|
||||
|
||||
@@ -140,6 +140,8 @@ public class FlatComponentsTest
|
||||
progressBar1 = new JProgressBar();
|
||||
progressBar2 = new JProgressBar();
|
||||
indeterminateCheckBox = new JCheckBox();
|
||||
JLabel toolTipLabel = new JLabel();
|
||||
JToolTip toolTip1 = new JToolTip();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -170,6 +172,7 @@ public class FlatComponentsTest
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//---- labelLabel ----
|
||||
@@ -675,6 +678,14 @@ public class FlatComponentsTest
|
||||
indeterminateCheckBox.setText("indeterminate");
|
||||
indeterminateCheckBox.addActionListener(e -> indeterminateCheckBoxActionPerformed());
|
||||
add(indeterminateCheckBox, "cell 4 18");
|
||||
|
||||
//---- toolTipLabel ----
|
||||
toolTipLabel.setText("JToolTip:");
|
||||
add(toolTipLabel, "cell 0 19");
|
||||
|
||||
//---- toolTip1 ----
|
||||
toolTip1.setTipText("Some text in tool tip.");
|
||||
add(toolTip1, "cell 1 19 3 1");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ new FormModel {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets 0,hidemode 3,gap 5 5,ltr"
|
||||
"$columnConstraints": "[][][][][][]"
|
||||
"$rowConstraints": "[][][][][][][][][][][][][][][][][][][]"
|
||||
"$rowConstraints": "[][][][][][][][][][][][][][][][][][][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -678,6 +678,18 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 18"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "toolTipLabel"
|
||||
"text": "JToolTip:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 19"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToolTip" ) {
|
||||
name: "toolTip1"
|
||||
"tipText": "Some text in tool tip."
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 19 3 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 790, 715 )
|
||||
|
||||
@@ -197,6 +197,11 @@ TableHeader.separatorColor=00ff00
|
||||
TableHeader.bottomSeparatorColor=00ff00
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
ToolTip.background=eeeeff
|
||||
|
||||
|
||||
#---- Tree ----
|
||||
|
||||
Tree.background=fff0ff
|
||||
|
||||
Reference in New Issue
Block a user