mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
JIDE: support JideButton and JideToggleButton
This commit is contained in:
@@ -19,6 +19,7 @@ FlatLaf Change Log
|
||||
menu bar and main content. If enabled with `UIManager.put(
|
||||
"TitlePane.unifiedBackground", true );` then window title bar and menu bar
|
||||
use same background color as main content. (PR #268; issue #254)
|
||||
- JIDE Common Layer: Support `JideButton` and `JideToggleButton`.
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
|
||||
@@ -210,3 +210,13 @@ ToggleButton.toolbar.pressedBackground = ToggleButton.background
|
||||
ToggleButton.toolbar.selectedBackground = ToggleButton.background
|
||||
|
||||
ToggleButton.tab.hoverBackground = null
|
||||
|
||||
|
||||
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
JideButton.focusedBackground = JideButton.background
|
||||
JideButton.selectedAndFocusedBackground = JideButton.background
|
||||
JideButton.selectedBackground = JideButton.background
|
||||
JideButton.highlight = null
|
||||
|
||||
@@ -6,8 +6,10 @@ This addon for FlatLaf adds support for **some**
|
||||
|
||||
Following JIDE Common Layer components are currently supported by this addon:
|
||||
|
||||
- `JideButton`
|
||||
- `JidePopupMenu`
|
||||
- `JideTabbedPane`
|
||||
- `JideToggleButton`
|
||||
- `RangeSlider`
|
||||
- `TristateCheckBox`
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ import javax.swing.LookAndFeel;
|
||||
import javax.swing.UIDefaults;
|
||||
import com.formdev.flatlaf.FlatDefaultsAddon;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.jideoss.ui.FlatJidePainter;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory;
|
||||
import com.jidesoft.plaf.UIDefaultsLookup;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory.UIDefaultsCustomizer;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory.UIDefaultsInitializer;
|
||||
|
||||
@@ -66,6 +68,8 @@ public class FlatJideOssDefaultsAddon
|
||||
* Because JIDE overwrites our UI defaults (from properties files) with its
|
||||
* own UI defaults, we have to first remember our UI defaults in the initializer
|
||||
* (invoked before JIDE overwrites UI defaults) and then restore them in the customizer.
|
||||
* <p>
|
||||
* Invoked from {@link LookAndFeelFactory#installJideExtension()}.
|
||||
*/
|
||||
public static class FlatJideUIDefaultsCustomizer
|
||||
implements UIDefaultsInitializer, UIDefaultsCustomizer
|
||||
@@ -96,6 +100,9 @@ public class FlatJideOssDefaultsAddon
|
||||
jideDefaults = null;
|
||||
}
|
||||
|
||||
// painter
|
||||
UIDefaultsLookup.put( defaults, "Theme.painter", FlatJidePainter.getInstance() );
|
||||
|
||||
// TristateCheckBox
|
||||
defaults.put( "TristateCheckBox.icon", null );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2021 FormDev Software GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.jideoss.ui;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import com.jidesoft.plaf.LookAndFeelFactory;
|
||||
import com.jidesoft.plaf.basic.BasicJideButtonUI;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link com.jidesoft.swing.JideButton}.
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatJideButtonUI
|
||||
extends BasicJideButtonUI
|
||||
{
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
// usually JIDE would invoke this in JideButton.updateUI(),
|
||||
// but it does not because FlatLaf already has added the UI class to the UI defaults
|
||||
LookAndFeelFactory.installJideExtension();
|
||||
|
||||
return new FlatJideButtonUI();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2021 FormDev Software GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.jideoss.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Rectangle;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.UIManager;
|
||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
import com.jidesoft.plaf.basic.BasicPainter;
|
||||
import com.jidesoft.plaf.basic.ThemePainter;
|
||||
import com.jidesoft.swing.JideButton;
|
||||
|
||||
/**
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatJidePainter
|
||||
extends BasicPainter
|
||||
{
|
||||
protected final int arc = UIManager.getInt( "Button.arc" );
|
||||
|
||||
public static ThemePainter getInstance() {
|
||||
// always create a new instance of Laf switching
|
||||
return new FlatJidePainter();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintBackground( JComponent c, Graphics g, Rectangle rect,
|
||||
Color borderColor, Color background, int orientation )
|
||||
{
|
||||
if( c instanceof JideButton && ((JideButton)c).getButtonStyle() == JideButton.TOOLBAR_STYLE ) {
|
||||
Color oldColor = g.getColor();
|
||||
g.setColor( FlatUIUtils.deriveColor( background, c.getBackground() ) );
|
||||
Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g );
|
||||
|
||||
FlatUIUtils.paintComponentBackground( (Graphics2D) g, rect.x, rect.y,
|
||||
rect.width, rect.height, 0, UIScale.scale( (float) arc ) );
|
||||
|
||||
FlatUIUtils.resetRenderingHints( g, oldRenderingHints );
|
||||
g.setColor( oldColor );
|
||||
} else
|
||||
super.paintBackground( c, g, rect, borderColor, background, orientation );
|
||||
}
|
||||
}
|
||||
@@ -16,11 +16,33 @@
|
||||
|
||||
#---- UI delegates ----
|
||||
|
||||
JideButtonUI = com.formdev.flatlaf.jideoss.ui.FlatJideButtonUI
|
||||
JidePopupMenuUI = com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
|
||||
JideTabbedPaneUI = com.formdev.flatlaf.jideoss.ui.FlatJideTabbedPaneUI
|
||||
RangeSliderUI = com.formdev.flatlaf.jideoss.ui.FlatRangeSliderUI
|
||||
|
||||
|
||||
#---- JideButton and JideToggleButton ----
|
||||
|
||||
JideButton.border = com.formdev.flatlaf.ui.FlatMarginBorder
|
||||
JideButton.margin = $Button.toolbar.margin
|
||||
JideButton.textIconGap = {scaledInteger}4
|
||||
|
||||
JideButton.background = $Button.background
|
||||
JideButton.foreground = $Button.foreground
|
||||
JideButton.focusedBackground = $Button.toolbar.hoverBackground
|
||||
JideButton.selectedBackground = $Button.toolbar.selectedBackground
|
||||
JideButton.selectedAndFocusedBackground = $Button.toolbar.pressedBackground
|
||||
JideButton.borderColor = $Button.borderColor
|
||||
|
||||
JideButton.shadow = $Button.borderColor
|
||||
JideButton.darkShadow = $Button.borderColor
|
||||
JideButton.light = $Button.borderColor
|
||||
JideButton.highlight = $Button.selectedBackground
|
||||
|
||||
Button.disabledForeground = $Button.disabledText
|
||||
|
||||
|
||||
#---- JidePopup ----
|
||||
|
||||
Resizable.resizeBorder = 4,4,4,4,$PopupMenu.borderColor
|
||||
|
||||
@@ -80,6 +80,7 @@ Button.default.pressedBackground #3f6796 com.formdev.flatlaf.util.DerivedColo
|
||||
Button.defaultButtonFollowsFocus false
|
||||
Button.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledBorderColor #5e6060 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledForeground #888888 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledSelectedBackground #53585a com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse)
|
||||
Button.disabledText #888888 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -441,6 +442,24 @@ JXTitledPanel.titleBackground #4c5052 javax.swing.plaf.ColorUIResource [UI]
|
||||
JXTitledPanel.titleForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
JideButton.background #4c5052 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
|
||||
JideButton.borderColor #5e6060 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.darkShadow #5e6060 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.focusedBackground #4e5355 com.formdev.flatlaf.util.DerivedColor [UI] lighten(1% autoInverse)
|
||||
JideButton.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.highlight #656a6c com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
||||
JideButton.light #5e6060 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
JideButton.selectedAndFocusedBackground #565a5d com.formdev.flatlaf.util.DerivedColor [UI] lighten(4% autoInverse)
|
||||
JideButton.selectedBackground #5d6265 com.formdev.flatlaf.util.DerivedColor [UI] lighten(7% autoInverse)
|
||||
JideButton.shadow #5e6060 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.textIconGap [active] 4
|
||||
JideButtonUI com.formdev.flatlaf.jideoss.ui.FlatJideButtonUI
|
||||
|
||||
|
||||
#---- JidePopupMenu ----
|
||||
|
||||
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
|
||||
|
||||
@@ -80,6 +80,7 @@ Button.default.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColo
|
||||
Button.defaultButtonFollowsFocus false
|
||||
Button.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledBorderColor #cfcfcf javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledSelectedBackground #dedede com.formdev.flatlaf.util.DerivedColor [UI] darken(13% autoInverse)
|
||||
Button.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -446,6 +447,24 @@ JXTitledPanel.titleBackground #dfdfdf javax.swing.plaf.ColorUIResource [UI]
|
||||
JXTitledPanel.titleForeground #222222 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
JideButton.background #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
|
||||
JideButton.borderColor #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.darkShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.focusedBackground #e0e0e0 com.formdev.flatlaf.util.DerivedColor [UI] darken(12% autoInverse)
|
||||
JideButton.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.highlight #cccccc com.formdev.flatlaf.util.DerivedColor [UI] darken(20% autoInverse)
|
||||
JideButton.light #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
JideButton.selectedAndFocusedBackground #d9d9d9 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
|
||||
JideButton.selectedBackground #cccccc com.formdev.flatlaf.util.DerivedColor [UI] darken(20% autoInverse)
|
||||
JideButton.shadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.textIconGap [active] 4
|
||||
JideButtonUI com.formdev.flatlaf.jideoss.ui.FlatJideButtonUI
|
||||
|
||||
|
||||
#---- JidePopupMenu ----
|
||||
|
||||
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
|
||||
|
||||
@@ -64,6 +64,7 @@ BusyLabelUI com.formdev.flatlaf.swingx.ui.FlatBusyLabelUI
|
||||
Button.arc 6
|
||||
Button.background #ccffcc javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatButtonBorder [UI]
|
||||
Button.borderColor #00ff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.borderWidth 1
|
||||
Button.darkShadow #696969 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.default.borderWidth 1
|
||||
@@ -81,6 +82,7 @@ Button.default.startBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.defaultButtonFollowsFocus false
|
||||
Button.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledBorderColor #000088 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledForeground #000088 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.disabledText #000088 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.endBackground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.endBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -98,6 +100,7 @@ Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [U
|
||||
Button.minimumWidth 72
|
||||
Button.pressedBackground #ffc800 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.rollover true
|
||||
Button.selectedBackground #ffbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.shadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.startBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.startBorderColor #0000ff javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -106,6 +109,7 @@ Button.textShiftOffset 0
|
||||
Button.toolbar.hoverBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.toolbar.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Button.toolbar.pressedBackground #eeeeee javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.toolbar.selectedBackground #dddddd javax.swing.plaf.ColorUIResource [UI]
|
||||
Button.toolbar.spacingInsets 1,2,1,2 javax.swing.plaf.InsetsUIResource [UI]
|
||||
ButtonUI com.formdev.flatlaf.ui.FlatButtonUI
|
||||
|
||||
@@ -434,6 +438,24 @@ JXTitledPanel.titleBackground #ffff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
JXTitledPanel.titleForeground #ff00ff javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
JideButton.background #ccffcc javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.border [lazy] 0,0,0,0 false com.formdev.flatlaf.ui.FlatMarginBorder [UI]
|
||||
JideButton.borderColor #00ff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.darkShadow #00ff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.focusedBackground #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.foreground #ff0000 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.highlight #ffbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.light #00ff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
JideButton.selectedAndFocusedBackground #eeeeee javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.selectedBackground #dddddd javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.shadow #00ff00 javax.swing.plaf.ColorUIResource [UI]
|
||||
JideButton.textIconGap [active] 4
|
||||
JideButtonUI com.formdev.flatlaf.jideoss.ui.FlatJideButtonUI
|
||||
|
||||
|
||||
#---- JidePopupMenu ----
|
||||
|
||||
JidePopupMenuUI com.formdev.flatlaf.jideoss.ui.FlatJidePopupMenuUI
|
||||
|
||||
@@ -66,22 +66,8 @@
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
+ JideButton.background [active] #f0f0f0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.border 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
|
||||
+ JideButton.borderColor [active] #0078d7 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.darkShadow [active] #696969 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.focusedBackground [active] #cfeafe javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideButton.foreground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.highlight [active] #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.light [active] #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
+ JideButton.selectedAndFocusedBackground [active] #88caff javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.selectedBackground [active] #acdafe javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.shadow [active] #a0a0a0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.textIconGap 4
|
||||
+ JideButton.textShiftOffset 0
|
||||
+ JideButtonUI com.jidesoft.plaf.basic.BasicJideButtonUI
|
||||
|
||||
|
||||
#---- JideComboBox ----
|
||||
|
||||
@@ -66,22 +66,8 @@
|
||||
|
||||
#---- JideButton ----
|
||||
|
||||
+ JideButton.background [active] #f0f0f0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.border 0,0,0,0 false javax.swing.plaf.basic.BasicBorders$MarginBorder [UI]
|
||||
+ JideButton.borderColor [active] #0078d7 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.darkShadow [active] #696969 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.focusedBackground [active] #cfeafe javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.font Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||
+ JideButton.foreground [active] #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.highlight [active] #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.light [active] #e3e3e3 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.margin 3,3,3,3 javax.swing.plaf.InsetsUIResource [UI]
|
||||
+ JideButton.selectedAndFocusedBackground [active] #88caff javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.selectedBackground [active] #acdafe javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.shadow [active] #a0a0a0 javax.swing.plaf.ColorUIResource [UI]
|
||||
+ JideButton.textIconGap 4
|
||||
+ JideButton.textShiftOffset 0
|
||||
+ JideButtonUI com.jidesoft.plaf.basic.BasicJideButtonUI
|
||||
|
||||
|
||||
#---- JideComboBox ----
|
||||
|
||||
@@ -618,7 +618,7 @@ public class FlatTestFrame
|
||||
sizeVariantComboBox.setVisible( visible );
|
||||
}
|
||||
|
||||
void updateComponentsRecur( Container container, BiConsumer<Component, String> action ) {
|
||||
public void updateComponentsRecur( Container container, BiConsumer<Component, String> action ) {
|
||||
for( Component c : container.getComponents() ) {
|
||||
if( c instanceof JPanel || c instanceof JDesktopPane ) {
|
||||
updateComponentsRecur( (Container) c, action );
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import com.formdev.flatlaf.testing.*;
|
||||
import com.formdev.flatlaf.testing.FlatTestFrame;
|
||||
import com.formdev.flatlaf.util.ScaledImageIcon;
|
||||
import com.jidesoft.popup.JidePopup;
|
||||
import com.jidesoft.swing.*;
|
||||
import net.miginfocom.swing.*;
|
||||
@@ -77,6 +78,41 @@ public class FlatJideOssTest
|
||||
triStateLabel1.setText( text );
|
||||
}
|
||||
|
||||
private void verticalChanged() {
|
||||
FlatTestFrame frame = (FlatTestFrame) SwingUtilities.getAncestorOfClass( FlatTestFrame.class, this );
|
||||
if( frame == null )
|
||||
return;
|
||||
|
||||
int orientation = verticalCheckBox.isSelected()
|
||||
? SwingUtilities.VERTICAL
|
||||
: SwingUtilities.HORIZONTAL;
|
||||
|
||||
frame.updateComponentsRecur( this, (c, type) -> {
|
||||
if( c instanceof JideButton )
|
||||
((JideButton)c).setOrientation( orientation );
|
||||
} );
|
||||
|
||||
revalidate();
|
||||
}
|
||||
|
||||
private void iconChanged() {
|
||||
FlatTestFrame frame = (FlatTestFrame) SwingUtilities.getAncestorOfClass( FlatTestFrame.class, this );
|
||||
if( frame == null )
|
||||
return;
|
||||
|
||||
Icon icon = iconCheckBox.isSelected()
|
||||
? new ScaledImageIcon( new ImageIcon(getClass().getResource(
|
||||
"/com/formdev/flatlaf/testing/test16.png" ) ) )
|
||||
: null;
|
||||
|
||||
frame.updateComponentsRecur( this, (c, type) -> {
|
||||
if( c instanceof JideButton )
|
||||
((JideButton)c).setIcon( icon );
|
||||
} );
|
||||
|
||||
revalidate();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||
JLabel jidePopupLabel = new JLabel();
|
||||
@@ -86,17 +122,56 @@ public class FlatJideOssTest
|
||||
JLabel label9 = new JLabel();
|
||||
tristateCheckBox1 = new TristateCheckBox();
|
||||
triStateLabel1 = new JLabel();
|
||||
JLabel jideButtonLabel = new JLabel();
|
||||
JideButton jideButton1 = new JideButton();
|
||||
JideButton jideButton2 = new JideButton();
|
||||
JideButton jideButton3 = new JideButton();
|
||||
JideButton jideButton4 = new JideButton();
|
||||
JToolBar toolBar1 = new JToolBar();
|
||||
JideButton jideButton9 = new JideButton();
|
||||
JButton button1 = new JButton();
|
||||
verticalCheckBox = new JCheckBox();
|
||||
JLabel label1 = new JLabel();
|
||||
JideButton jideButton5 = new JideButton();
|
||||
JideButton jideButton6 = new JideButton();
|
||||
JideButton jideButton7 = new JideButton();
|
||||
JideButton jideButton8 = new JideButton();
|
||||
JToolBar toolBar2 = new JToolBar();
|
||||
JideButton jideButton10 = new JideButton();
|
||||
iconCheckBox = new JCheckBox();
|
||||
JLabel jideToggleButtonLabel = new JLabel();
|
||||
JideToggleButton jideToggleButton1 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton2 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton3 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton4 = new JideToggleButton();
|
||||
JToolBar toolBar3 = new JToolBar();
|
||||
JideToggleButton jideToggleButton9 = new JideToggleButton();
|
||||
JToggleButton toggleButton1 = new JToggleButton();
|
||||
JLabel label2 = new JLabel();
|
||||
JideToggleButton jideToggleButton5 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton6 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton7 = new JideToggleButton();
|
||||
JideToggleButton jideToggleButton8 = new JideToggleButton();
|
||||
JToolBar toolBar4 = new JToolBar();
|
||||
JideToggleButton jideToggleButton10 = new JideToggleButton();
|
||||
JToggleButton toggleButton2 = new JToggleButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
"insets dialog,hidemode 3",
|
||||
// columns
|
||||
"[]" +
|
||||
"[left]" +
|
||||
"[fill]" +
|
||||
"[fill]" +
|
||||
"[fill]",
|
||||
// rows
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]para" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//---- jidePopupLabel ----
|
||||
@@ -106,7 +181,7 @@ public class FlatJideOssTest
|
||||
//---- showJidePopupButton ----
|
||||
showJidePopupButton.setText("show JidePopup");
|
||||
showJidePopupButton.addActionListener(e -> showJidePopup(e));
|
||||
add(showJidePopupButton, "cell 1 0");
|
||||
add(showJidePopupButton, "cell 1 0,growx");
|
||||
|
||||
//---- jidePopupMenuLabel ----
|
||||
jidePopupMenuLabel.setText("JidePopupMenu:");
|
||||
@@ -115,7 +190,7 @@ public class FlatJideOssTest
|
||||
//---- showJidePopupMenuButton ----
|
||||
showJidePopupMenuButton.setText("show JidePopupMenu");
|
||||
showJidePopupMenuButton.addActionListener(e -> showJidePopupMenu(e));
|
||||
add(showJidePopupMenuButton, "cell 1 1");
|
||||
add(showJidePopupMenuButton, "cell 1 1,growx");
|
||||
|
||||
//---- label9 ----
|
||||
label9.setText("TristateCheckBox:");
|
||||
@@ -130,11 +205,176 @@ public class FlatJideOssTest
|
||||
triStateLabel1.setText("text");
|
||||
triStateLabel1.setEnabled(false);
|
||||
add(triStateLabel1, "cell 2 2");
|
||||
|
||||
//---- jideButtonLabel ----
|
||||
jideButtonLabel.setText("JideButton:");
|
||||
add(jideButtonLabel, "cell 0 3");
|
||||
|
||||
//---- jideButton1 ----
|
||||
jideButton1.setText("TOOLBAR");
|
||||
add(jideButton1, "cell 1 3 3 1");
|
||||
|
||||
//---- jideButton2 ----
|
||||
jideButton2.setText("TOOLBOX");
|
||||
jideButton2.setButtonStyle(1);
|
||||
add(jideButton2, "cell 1 3 3 1");
|
||||
|
||||
//---- jideButton3 ----
|
||||
jideButton3.setText("FLAT");
|
||||
jideButton3.setButtonStyle(2);
|
||||
add(jideButton3, "cell 1 3 3 1");
|
||||
|
||||
//---- jideButton4 ----
|
||||
jideButton4.setText("HYPERLINK");
|
||||
jideButton4.setButtonStyle(3);
|
||||
add(jideButton4, "cell 1 3 3 1");
|
||||
|
||||
//======== toolBar1 ========
|
||||
{
|
||||
|
||||
//---- jideButton9 ----
|
||||
jideButton9.setText("JideButton");
|
||||
toolBar1.add(jideButton9);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("JButton");
|
||||
toolBar1.add(button1);
|
||||
}
|
||||
add(toolBar1, "cell 1 3 3 1");
|
||||
|
||||
//---- verticalCheckBox ----
|
||||
verticalCheckBox.setText("vertical");
|
||||
verticalCheckBox.addActionListener(e -> verticalChanged());
|
||||
add(verticalCheckBox, "cell 4 3");
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("selected");
|
||||
label1.setEnabled(false);
|
||||
add(label1, "cell 0 4,alignx right,growx 0");
|
||||
|
||||
//---- jideButton5 ----
|
||||
jideButton5.setText("TOOLBAR");
|
||||
jideButton5.setSelected(true);
|
||||
add(jideButton5, "cell 1 4 3 1");
|
||||
|
||||
//---- jideButton6 ----
|
||||
jideButton6.setText("TOOLBOX");
|
||||
jideButton6.setButtonStyle(1);
|
||||
jideButton6.setSelected(true);
|
||||
add(jideButton6, "cell 1 4 3 1");
|
||||
|
||||
//---- jideButton7 ----
|
||||
jideButton7.setText("FLAT");
|
||||
jideButton7.setButtonStyle(2);
|
||||
jideButton7.setSelected(true);
|
||||
add(jideButton7, "cell 1 4 3 1");
|
||||
|
||||
//---- jideButton8 ----
|
||||
jideButton8.setText("HYPERLINK");
|
||||
jideButton8.setButtonStyle(3);
|
||||
jideButton8.setSelected(true);
|
||||
add(jideButton8, "cell 1 4 3 1");
|
||||
|
||||
//======== toolBar2 ========
|
||||
{
|
||||
|
||||
//---- jideButton10 ----
|
||||
jideButton10.setText("JideButton");
|
||||
jideButton10.setSelected(true);
|
||||
toolBar2.add(jideButton10);
|
||||
}
|
||||
add(toolBar2, "cell 1 4 3 1");
|
||||
|
||||
//---- iconCheckBox ----
|
||||
iconCheckBox.setText("icon");
|
||||
iconCheckBox.addActionListener(e -> iconChanged());
|
||||
add(iconCheckBox, "cell 4 4");
|
||||
|
||||
//---- jideToggleButtonLabel ----
|
||||
jideToggleButtonLabel.setText("JideToggleButton:");
|
||||
add(jideToggleButtonLabel, "cell 0 5");
|
||||
|
||||
//---- jideToggleButton1 ----
|
||||
jideToggleButton1.setText("TOOLBAR");
|
||||
add(jideToggleButton1, "cell 1 5 3 1");
|
||||
|
||||
//---- jideToggleButton2 ----
|
||||
jideToggleButton2.setText("TOOLBOX");
|
||||
jideToggleButton2.setButtonStyle(1);
|
||||
add(jideToggleButton2, "cell 1 5 3 1");
|
||||
|
||||
//---- jideToggleButton3 ----
|
||||
jideToggleButton3.setText("FLAT");
|
||||
jideToggleButton3.setButtonStyle(2);
|
||||
add(jideToggleButton3, "cell 1 5 3 1");
|
||||
|
||||
//---- jideToggleButton4 ----
|
||||
jideToggleButton4.setText("HYPERLINK");
|
||||
jideToggleButton4.setButtonStyle(3);
|
||||
add(jideToggleButton4, "cell 1 5 3 1");
|
||||
|
||||
//======== toolBar3 ========
|
||||
{
|
||||
|
||||
//---- jideToggleButton9 ----
|
||||
jideToggleButton9.setText("JideToggleButton");
|
||||
toolBar3.add(jideToggleButton9);
|
||||
|
||||
//---- toggleButton1 ----
|
||||
toggleButton1.setText("JToggleButton");
|
||||
toolBar3.add(toggleButton1);
|
||||
}
|
||||
add(toolBar3, "cell 1 5 3 1");
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("selected");
|
||||
label2.setEnabled(false);
|
||||
add(label2, "cell 0 6,alignx right,growx 0");
|
||||
|
||||
//---- jideToggleButton5 ----
|
||||
jideToggleButton5.setText("TOOLBAR");
|
||||
jideToggleButton5.setSelected(true);
|
||||
add(jideToggleButton5, "cell 1 6 3 1");
|
||||
|
||||
//---- jideToggleButton6 ----
|
||||
jideToggleButton6.setText("TOOLBOX");
|
||||
jideToggleButton6.setSelected(true);
|
||||
jideToggleButton6.setButtonStyle(1);
|
||||
add(jideToggleButton6, "cell 1 6 3 1");
|
||||
|
||||
//---- jideToggleButton7 ----
|
||||
jideToggleButton7.setText("FLAT");
|
||||
jideToggleButton7.setSelected(true);
|
||||
jideToggleButton7.setButtonStyle(2);
|
||||
add(jideToggleButton7, "cell 1 6 3 1");
|
||||
|
||||
//---- jideToggleButton8 ----
|
||||
jideToggleButton8.setText("HYPERLINK");
|
||||
jideToggleButton8.setSelected(true);
|
||||
jideToggleButton8.setButtonStyle(3);
|
||||
add(jideToggleButton8, "cell 1 6 3 1");
|
||||
|
||||
//======== toolBar4 ========
|
||||
{
|
||||
|
||||
//---- jideToggleButton10 ----
|
||||
jideToggleButton10.setText("JideToggleButton");
|
||||
jideToggleButton10.setSelected(true);
|
||||
toolBar4.add(jideToggleButton10);
|
||||
|
||||
//---- toggleButton2 ----
|
||||
toggleButton2.setText("JToggleButton");
|
||||
toggleButton2.setSelected(true);
|
||||
toolBar4.add(toggleButton2);
|
||||
}
|
||||
add(toolBar4, "cell 1 6 3 1");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||
private TristateCheckBox tristateCheckBox1;
|
||||
private JLabel triStateLabel1;
|
||||
private JCheckBox verticalCheckBox;
|
||||
private JCheckBox iconCheckBox;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ new FormModel {
|
||||
}
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[][fill][fill]"
|
||||
"$rowConstraints": "[][][]"
|
||||
"$columnConstraints": "[][left][fill][fill][fill]"
|
||||
"$rowConstraints": "[][][]para[][][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -23,7 +23,7 @@ new FormModel {
|
||||
"text": "show JidePopup"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showJidePopup", true ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 0"
|
||||
"value": "cell 1 0,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "jidePopupMenuLabel"
|
||||
@@ -36,7 +36,7 @@ new FormModel {
|
||||
"text": "show JidePopupMenu"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showJidePopupMenu", true ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 1"
|
||||
"value": "cell 1 1,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label9"
|
||||
@@ -64,9 +64,222 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 2"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "jideButtonLabel"
|
||||
"text": "JideButton:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 3"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton1"
|
||||
"text": "TOOLBAR"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton2"
|
||||
"text": "TOOLBOX"
|
||||
"buttonStyle": 1
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton3"
|
||||
"text": "FLAT"
|
||||
"buttonStyle": 2
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton4"
|
||||
"text": "HYPERLINK"
|
||||
"buttonStyle": 3
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 3 1"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar1"
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton9"
|
||||
"text": "JideButton"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "JButton"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "verticalCheckBox"
|
||||
"text": "vertical"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "verticalChanged", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 3"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "selected"
|
||||
"enabled": false
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 4,alignx right,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton5"
|
||||
"text": "TOOLBAR"
|
||||
"selected": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton6"
|
||||
"text": "TOOLBOX"
|
||||
"buttonStyle": 1
|
||||
"selected": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton7"
|
||||
"text": "FLAT"
|
||||
"buttonStyle": 2
|
||||
"selected": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton8"
|
||||
"text": "HYPERLINK"
|
||||
"buttonStyle": 3
|
||||
"selected": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4 3 1"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar2"
|
||||
add( new FormComponent( "com.jidesoft.swing.JideButton" ) {
|
||||
name: "jideButton10"
|
||||
"text": "JideButton"
|
||||
"selected": true
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||
name: "iconCheckBox"
|
||||
"text": "icon"
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "iconChanged", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "jideToggleButtonLabel"
|
||||
"text": "JideToggleButton:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 5"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton1"
|
||||
"text": "TOOLBAR"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton2"
|
||||
"text": "TOOLBOX"
|
||||
"buttonStyle": 1
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton3"
|
||||
"text": "FLAT"
|
||||
"buttonStyle": 2
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton4"
|
||||
"text": "HYPERLINK"
|
||||
"buttonStyle": 3
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5 3 1"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar3"
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton9"
|
||||
"text": "JideToggleButton"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton1"
|
||||
"text": "JToggleButton"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "selected"
|
||||
"enabled": false
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 6,alignx right,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton5"
|
||||
"text": "TOOLBAR"
|
||||
"selected": true
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton6"
|
||||
"text": "TOOLBOX"
|
||||
"selected": true
|
||||
"buttonStyle": 1
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton7"
|
||||
"text": "FLAT"
|
||||
"selected": true
|
||||
"buttonStyle": 2
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6 3 1"
|
||||
} )
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton8"
|
||||
"text": "HYPERLINK"
|
||||
"selected": true
|
||||
"buttonStyle": 3
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6 3 1"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||
name: "toolBar4"
|
||||
add( new FormComponent( "com.jidesoft.swing.JideToggleButton" ) {
|
||||
name: "jideToggleButton10"
|
||||
"text": "JideToggleButton"
|
||||
"selected": true
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton2"
|
||||
"text": "JToggleButton"
|
||||
"selected": true
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6 3 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 500, 500 )
|
||||
"size": new java.awt.Dimension( 635, 500 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,9 @@ Button.endBackground = #bbb
|
||||
Button.focusedBackground = #0ff
|
||||
Button.hoverBackground = #ff0
|
||||
Button.pressedBackground = #FFC800
|
||||
Button.selectedBackground = #fbb
|
||||
|
||||
Button.borderColor = #0f0
|
||||
Button.startBorderColor = #00f
|
||||
Button.endBorderColor = #f00
|
||||
Button.disabledBorderColor = #008
|
||||
@@ -92,6 +94,7 @@ Button.default.focusColor = #f00
|
||||
|
||||
Button.toolbar.hoverBackground = #fff
|
||||
Button.toolbar.pressedBackground = #eee
|
||||
Button.toolbar.selectedBackground = #ddd
|
||||
|
||||
|
||||
#---- CheckBox ----
|
||||
|
||||
@@ -28,6 +28,7 @@ Button.default.pressedBackground
|
||||
Button.defaultButtonFollowsFocus
|
||||
Button.disabledBackground
|
||||
Button.disabledBorderColor
|
||||
Button.disabledForeground
|
||||
Button.disabledSelectedBackground
|
||||
Button.disabledText
|
||||
Button.focusInputMap
|
||||
@@ -313,6 +314,20 @@ JXTitledPanel.borderColor
|
||||
JXTitledPanel.captionInsets
|
||||
JXTitledPanel.titleBackground
|
||||
JXTitledPanel.titleForeground
|
||||
JideButton.background
|
||||
JideButton.border
|
||||
JideButton.borderColor
|
||||
JideButton.darkShadow
|
||||
JideButton.focusedBackground
|
||||
JideButton.foreground
|
||||
JideButton.highlight
|
||||
JideButton.light
|
||||
JideButton.margin
|
||||
JideButton.selectedAndFocusedBackground
|
||||
JideButton.selectedBackground
|
||||
JideButton.shadow
|
||||
JideButton.textIconGap
|
||||
JideButtonUI
|
||||
JidePopupMenuUI
|
||||
JideTabbedPane.background
|
||||
JideTabbedPane.contentBorderInsets
|
||||
|
||||
Reference in New Issue
Block a user