mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
SwingX: support JXTipOfTheDay component (issue #980)
Some checks failed
CI / build (11) (push) Has been cancelled
CI / build-on (17, ) (push) Has been cancelled
CI / build-on (21, ) (push) Has been cancelled
CI / build-on (23, ) (push) Has been cancelled
CI / build-on (8, ) (push) Has been cancelled
CI / snapshot (push) Has been cancelled
CI / release (push) Has been cancelled
Some checks failed
CI / build (11) (push) Has been cancelled
CI / build-on (17, ) (push) Has been cancelled
CI / build-on (21, ) (push) Has been cancelled
CI / build-on (23, ) (push) Has been cancelled
CI / build-on (8, ) (push) Has been cancelled
CI / snapshot (push) Has been cancelled
CI / release (push) Has been cancelled
This commit is contained in:
@@ -1239,6 +1239,17 @@ TextPane.selectionForeground #eeeeee HSL 0 0 93 javax.swing.plaf.Colo
|
||||
TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- TipOfTheDay ----
|
||||
|
||||
TipOfTheDay.background #46494b HSL 204 3 28 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#616365 HSL 210 2 39 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
TipOfTheDay.font [active] $defaultFont [UI]
|
||||
TipOfTheDay.icon [lazy] 24,24 com.formdev.flatlaf.swingx.icons.FlatTipOfTheDayIcon [UI]
|
||||
TipOfTheDay.icon.bulbColor #f2c55c HSL 42 85 65 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.icon.socketColor #ced0d6 HSL 225 9 82 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.tipAreaInsets 4,16,4,16 javax.swing.plaf.InsetsUIResource [UI]
|
||||
|
||||
|
||||
#---- TitlePane ----
|
||||
|
||||
TitlePane.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -1620,6 +1631,11 @@ small.font [active] Segoe UI plain 10 javax.swing.plaf.Fo
|
||||
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI
|
||||
|
||||
|
||||
#---- swingx/TipOfTheDay ----
|
||||
|
||||
swingx/TipOfTheDayUI com.formdev.flatlaf.swingx.ui.FlatTipOfTheDayUI
|
||||
|
||||
|
||||
#---- ----
|
||||
|
||||
text #46494b HSL 204 3 28 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1244,6 +1244,17 @@ TextPane.selectionForeground #ffffff HSL 0 0 100 javax.swing.plaf.Colo
|
||||
TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- TipOfTheDay ----
|
||||
|
||||
TipOfTheDay.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#c2c2c2 HSL 0 0 76 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
TipOfTheDay.font [active] $defaultFont [UI]
|
||||
TipOfTheDay.icon [lazy] 24,24 com.formdev.flatlaf.swingx.icons.FlatTipOfTheDayIcon [UI]
|
||||
TipOfTheDay.icon.bulbColor #ffaf0f HSL 40 100 53 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.icon.socketColor #6c707e HSL 227 8 46 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.tipAreaInsets 4,16,4,16 javax.swing.plaf.InsetsUIResource [UI]
|
||||
|
||||
|
||||
#---- TitlePane ----
|
||||
|
||||
TitlePane.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -1625,6 +1636,11 @@ small.font [active] Segoe UI plain 10 javax.swing.plaf.Fo
|
||||
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI
|
||||
|
||||
|
||||
#---- swingx/TipOfTheDay ----
|
||||
|
||||
swingx/TipOfTheDayUI com.formdev.flatlaf.swingx.ui.FlatTipOfTheDayUI
|
||||
|
||||
|
||||
#---- ----
|
||||
|
||||
text #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1249,6 +1249,17 @@ TextPane.selectionForeground #ffffff HSL 0 0 100 javax.swing.plaf.Colo
|
||||
TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- TipOfTheDay ----
|
||||
|
||||
TipOfTheDay.background #282828 HSL 0 0 16 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#ffffff19 10% HSLA 0 0 100 10 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
TipOfTheDay.font [active] $defaultFont [UI]
|
||||
TipOfTheDay.icon [lazy] 24,24 com.formdev.flatlaf.swingx.icons.FlatTipOfTheDayIcon [UI]
|
||||
TipOfTheDay.icon.bulbColor #f2c55c HSL 42 85 65 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.icon.socketColor #ced0d6 HSL 225 9 82 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.tipAreaInsets 4,16,4,16 javax.swing.plaf.InsetsUIResource [UI]
|
||||
|
||||
|
||||
#---- TitlePane ----
|
||||
|
||||
TitlePane.background #323232 HSL 0 0 20 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -1630,6 +1641,11 @@ small.font [active] Segoe UI plain 10 javax.swing.plaf.Fo
|
||||
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI
|
||||
|
||||
|
||||
#---- swingx/TipOfTheDay ----
|
||||
|
||||
swingx/TipOfTheDayUI com.formdev.flatlaf.swingx.ui.FlatTipOfTheDayUI
|
||||
|
||||
|
||||
#---- ----
|
||||
|
||||
text #282828 HSL 0 0 16 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1253,6 +1253,17 @@ TextPane.selectionForeground #262626 HSL 0 0 15 javax.swing.plaf.Colo
|
||||
TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- TipOfTheDay ----
|
||||
|
||||
TipOfTheDay.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#00000026 15% HSLA 0 0 0 15 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
TipOfTheDay.font [active] $defaultFont [UI]
|
||||
TipOfTheDay.icon [lazy] 24,24 com.formdev.flatlaf.swingx.icons.FlatTipOfTheDayIcon [UI]
|
||||
TipOfTheDay.icon.bulbColor #ffaf0f HSL 40 100 53 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.icon.socketColor #6c707e HSL 227 8 46 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.tipAreaInsets 4,16,4,16 javax.swing.plaf.InsetsUIResource [UI]
|
||||
|
||||
|
||||
#---- TitlePane ----
|
||||
|
||||
TitlePane.background #ececec HSL 0 0 93 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -1634,6 +1645,11 @@ small.font [active] Segoe UI plain 10 javax.swing.plaf.Fo
|
||||
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI
|
||||
|
||||
|
||||
#---- swingx/TipOfTheDay ----
|
||||
|
||||
swingx/TipOfTheDayUI com.formdev.flatlaf.swingx.ui.FlatTipOfTheDayUI
|
||||
|
||||
|
||||
#---- ----
|
||||
|
||||
text #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -1289,6 +1289,15 @@ TextPane.selectionForeground #ffff00 HSL 60 100 50 javax.swing.plaf.Colo
|
||||
TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- TipOfTheDay ----
|
||||
|
||||
TipOfTheDay.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
TipOfTheDay.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
TipOfTheDay.font [active] $defaultFont [UI]
|
||||
TipOfTheDay.icon [lazy] 24,24 com.formdev.flatlaf.swingx.icons.FlatTipOfTheDayIcon [UI]
|
||||
TipOfTheDay.tipAreaInsets 4,16,4,16 javax.swing.plaf.InsetsUIResource [UI]
|
||||
|
||||
|
||||
#---- TitlePane ----
|
||||
|
||||
TitlePane.background #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -1679,6 +1688,11 @@ small.font [active] Segoe UI plain 10 javax.swing.plaf.Fo
|
||||
swingx/TaskPaneUI com.formdev.flatlaf.swingx.ui.FlatTaskPaneUI
|
||||
|
||||
|
||||
#---- swingx/TipOfTheDay ----
|
||||
|
||||
swingx/TipOfTheDayUI com.formdev.flatlaf.swingx.ui.FlatTipOfTheDayUI
|
||||
|
||||
|
||||
#---- ----
|
||||
|
||||
text #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -24,6 +24,9 @@ import javax.swing.table.*;
|
||||
import net.miginfocom.swing.*;
|
||||
import org.jdesktop.swingx.*;
|
||||
import org.jdesktop.swingx.table.DatePickerCellEditor;
|
||||
import org.jdesktop.swingx.tips.DefaultTip;
|
||||
import org.jdesktop.swingx.tips.DefaultTipOfTheDayModel;
|
||||
import org.jdesktop.swingx.tips.TipOfTheDayModel.Tip;
|
||||
import com.formdev.flatlaf.testing.FlatTestFrame;
|
||||
import com.formdev.flatlaf.testing.FlatTestPanel;
|
||||
|
||||
@@ -69,6 +72,10 @@ public class FlatSwingXTest
|
||||
JProgressBar statusProgressBar = new JProgressBar();
|
||||
statusProgressBar.setValue( 50 );
|
||||
statusBar1.add( statusProgressBar, new JXStatusBar.Constraint( JXStatusBar.Constraint.ResizeBehavior.FILL ) );
|
||||
|
||||
xTipOfTheDay1.setModel( new DefaultTipOfTheDayModel( new Tip[] {
|
||||
new DefaultTip( "testTip", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." )
|
||||
} ) );
|
||||
}
|
||||
|
||||
private void busyChanged() {
|
||||
@@ -77,6 +84,11 @@ public class FlatSwingXTest
|
||||
xBusyLabel2.setBusy( busy );
|
||||
}
|
||||
|
||||
private void showTipOfTheDayDialog() {
|
||||
JXTipOfTheDay tipOfTheDay = new JXTipOfTheDay( xTipOfTheDay1.getModel() );
|
||||
tipOfTheDay.showDialog( this );
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||
JLabel label1 = new JLabel();
|
||||
@@ -138,6 +150,9 @@ public class FlatSwingXTest
|
||||
JXSearchField xSearchField4 = new JXSearchField();
|
||||
JLabel label12 = new JLabel();
|
||||
statusBar1 = new JXStatusBar();
|
||||
JLabel label13 = new JLabel();
|
||||
xTipOfTheDay1 = new JXTipOfTheDay();
|
||||
JButton showTipOfTheDayDialogButton = new JButton();
|
||||
JButton button1 = new JButton();
|
||||
JButton button2 = new JButton();
|
||||
|
||||
@@ -163,6 +178,7 @@ public class FlatSwingXTest
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[top]" +
|
||||
"[37]"));
|
||||
|
||||
//---- label1 ----
|
||||
@@ -471,6 +487,16 @@ public class FlatSwingXTest
|
||||
add(label12, "cell 0 11");
|
||||
add(statusBar1, "cell 1 11 3 1,grow");
|
||||
|
||||
//---- label13 ----
|
||||
label13.setText("JXTipOfTheDay:");
|
||||
add(label13, "cell 0 12");
|
||||
add(xTipOfTheDay1, "cell 1 12 3 1");
|
||||
|
||||
//---- showTipOfTheDayDialogButton ----
|
||||
showTipOfTheDayDialogButton.setText("Show Dialog...");
|
||||
showTipOfTheDayDialogButton.addActionListener(e -> showTipOfTheDayDialog());
|
||||
add(showTipOfTheDayDialogButton, "cell 1 12 3 1");
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("<");
|
||||
|
||||
@@ -492,5 +518,6 @@ public class FlatSwingXTest
|
||||
private JCheckBox busyCheckBox;
|
||||
private JTable table;
|
||||
private JXStatusBar statusBar1;
|
||||
private JXTipOfTheDay xTipOfTheDay1;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.5.0.404" Java: "17" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "8.3" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -9,7 +9,7 @@ new FormModel {
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[left][][][][fill]"
|
||||
"$rowConstraints": "[]0[][]0[top][][][][][][][][][37]"
|
||||
"$rowConstraints": "[]0[][]0[top][][][][][][][][][top][37]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -402,9 +402,30 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 11 3 1,grow"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label13"
|
||||
"text": "JXTipOfTheDay:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 12"
|
||||
} )
|
||||
add( new FormComponent( "org.jdesktop.swingx.JXTipOfTheDay" ) {
|
||||
name: "xTipOfTheDay1"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 12 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "showTipOfTheDayDialogButton"
|
||||
"text": "Show Dialog..."
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showTipOfTheDayDialog", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 12 3 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 795, 600 )
|
||||
"size": new java.awt.Dimension( 900, 820 )
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
|
||||
Reference in New Issue
Block a user