Styling: renamed class FlatStyleSupport to FlatStylingSupport

This commit is contained in:
Karl Tauber
2021-09-01 00:21:47 +02:00
parent 6f9bbb184a
commit 397c369114
51 changed files with 262 additions and 262 deletions

View File

@@ -23,7 +23,7 @@ import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatUIUtils;
/**

View File

@@ -28,8 +28,8 @@ import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatButtonUI;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatUIUtils;
/**
@@ -136,14 +136,14 @@ public class FlatCheckBoxIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -25,8 +25,8 @@ import java.util.Map;
import javax.swing.AbstractButton;
import javax.swing.JMenuItem;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* Icon for {@link javax.swing.JCheckBoxMenuItem}.
@@ -53,14 +53,14 @@ public class FlatCheckBoxMenuItemIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -26,9 +26,9 @@ import java.util.Map;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
/**
* "clear" icon for search fields.
@@ -55,14 +55,14 @@ public class FlatClearIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -25,9 +25,9 @@ import java.awt.geom.Path2D;
import java.util.Map;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatButtonUI;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
/**
* Help button icon for {@link javax.swing.JButton}.
@@ -78,14 +78,14 @@ public class FlatHelpButtonIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -24,9 +24,9 @@ import java.awt.geom.Path2D;
import java.util.Map;
import javax.swing.JMenu;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* "arrow" icon for {@link javax.swing.JMenu}.
@@ -55,14 +55,14 @@ public class FlatMenuArrowIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -19,7 +19,7 @@ package com.formdev.flatlaf.icons;
import java.awt.Component;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* Icon for {@link javax.swing.JRadioButton}.

View File

@@ -24,9 +24,9 @@ import java.awt.geom.Ellipse2D;
import java.util.Map;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatButtonUI;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
/**
* "search" icon for search fields.
@@ -53,14 +53,14 @@ public class FlatSearchIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -26,8 +26,8 @@ import java.awt.geom.Path2D;
import java.util.Map;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatButtonUI;
import com.formdev.flatlaf.ui.FlatStyleSupport;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatUIUtils;
/**
@@ -70,14 +70,14 @@ public class FlatTabbedPaneCloseIcon
* @since TODO
*/
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -32,8 +32,8 @@ import javax.swing.JViewport;
import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicBorders;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableBorder;
import com.formdev.flatlaf.util.DerivedColor;
/**
@@ -84,7 +84,7 @@ public class FlatBorder
*/
@Override
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -92,7 +92,7 @@ public class FlatBorder
*/
@Override
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -26,7 +26,7 @@ import java.awt.Paint;
import javax.swing.AbstractButton;
import javax.swing.UIManager;
import javax.swing.plaf.UIResource;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.util.UIScale;
/**

View File

@@ -48,9 +48,9 @@ import javax.swing.plaf.basic.BasicButtonListener;
import javax.swing.plaf.basic.BasicButtonUI;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.icons.FlatHelpButtonIcon;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -160,7 +160,7 @@ public class FlatButtonUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( (AbstractButton) c, FlatStyleSupport.getStyle( c ) );
applyStyle( (AbstractButton) c, FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -275,7 +275,7 @@ public class FlatButtonUI
* @since TODO
*/
protected void applyStyle( AbstractButton b, Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style,
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style,
(key, value) -> applyStyleProperty( b, key, value ) );
}
@@ -288,7 +288,7 @@ public class FlatButtonUI
return new UnknownStyleException( key );
if( helpButtonIconShared ) {
helpButtonIcon = FlatStyleSupport.cloneIcon( helpButtonIcon );
helpButtonIcon = FlatStylingSupport.cloneIcon( helpButtonIcon );
helpButtonIconShared = false;
}
@@ -298,7 +298,7 @@ public class FlatButtonUI
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, b, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, b, borderShared );
}
/**
@@ -306,9 +306,9 @@ public class FlatButtonUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStyleSupport.getAnnotatedStyleableInfos( this, c.getBorder() );
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this, c.getBorder() );
if( helpButtonIcon instanceof FlatHelpButtonIcon )
FlatStyleSupport.putAllPrefixKey( infos, "help.", ((FlatHelpButtonIcon)helpButtonIcon).getStyleableInfos() );
FlatStylingSupport.putAllPrefixKey( infos, "help.", ((FlatHelpButtonIcon)helpButtonIcon).getStyleableInfos() );
return infos;
}

View File

@@ -25,8 +25,8 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicCheckBoxMenuItemUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JCheckBoxMenuItem}.
@@ -71,7 +71,7 @@ public class FlatCheckBoxMenuItemUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( menuItem ) );
applyStyle( FlatStylingSupport.getStyle( menuItem ) );
}
@Override
@@ -97,14 +97,14 @@ public class FlatCheckBoxMenuItemUI
@Override
protected PropertyChangeListener createPropertyChangeListener( JComponent c ) {
return FlatStyleSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**

View File

@@ -71,8 +71,8 @@ import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.basic.ComboPopup;
import javax.swing.text.JTextComponent;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.SystemInfo;
/**
@@ -156,7 +156,7 @@ public class FlatComboBoxUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( comboBox ) );
applyStyle( FlatStylingSupport.getStyle( comboBox ) );
}
@Override
@@ -454,7 +454,7 @@ public class FlatComboBoxUI
Insets oldPadding = padding;
int oldEditorColumns = editorColumns;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( !padding.equals( oldPadding ) ) {
paddingBorder.padding = padding;
@@ -481,7 +481,7 @@ public class FlatComboBoxUI
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, comboBox, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, comboBox, borderShared );
}
/**
@@ -491,8 +491,8 @@ public class FlatComboBoxUI
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = new LinkedHashMap<>();
infos.put( "padding", Insets.class );
FlatStyleSupport.collectAnnotatedStyleableInfos( this, infos );
FlatStyleSupport.collectStyleableInfos( comboBox.getBorder(), infos );
FlatStylingSupport.collectAnnotatedStyleableInfos( this, infos );
FlatStylingSupport.collectStyleableInfos( comboBox.getBorder(), infos );
return infos;
}

View File

@@ -25,8 +25,8 @@ import java.awt.Insets;
import java.awt.RadialGradientPaint;
import java.awt.image.BufferedImage;
import java.util.Map;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableBorder;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.UIScale;
@@ -95,7 +95,7 @@ public class FlatDropShadowBorder
*/
@Override
public Object applyStyleProperty( String key, Object value ) {
Object oldValue = FlatStyleSupport.applyToAnnotatedObject( this, key, value );
Object oldValue = FlatStylingSupport.applyToAnnotatedObject( this, key, value );
if( key.equals( "shadowInsets" ) ) {
applyStyleProperty( nonNegativeInsets( shadowInsets ) );
shadowSize = maxInset( shadowInsets );
@@ -108,7 +108,7 @@ public class FlatDropShadowBorder
*/
@Override
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -33,8 +33,8 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicEditorPaneUI;
import javax.swing.text.JTextComponent;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
/**
@@ -91,7 +91,7 @@ public class FlatEditorPaneUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -179,7 +179,7 @@ public class FlatEditorPaneUI
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateBackground();
}
@@ -188,7 +188,7 @@ public class FlatEditorPaneUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -196,7 +196,7 @@ public class FlatEditorPaneUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
private void updateBackground() {

View File

@@ -35,9 +35,9 @@ import javax.swing.UIManager;
import javax.swing.event.MouseInputAdapter;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JInternalFrame}.
@@ -116,7 +116,7 @@ public class FlatInternalFrameUI
windowResizer = createWindowResizer();
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -148,7 +148,7 @@ public class FlatInternalFrameUI
@Override
protected PropertyChangeListener createPropertyChangeListener() {
return FlatStyleSupport.createPropertyChangeListener( frame, this::applyStyle,
return FlatStylingSupport.createPropertyChangeListener( frame, this::applyStyle,
super.createPropertyChangeListener() );
}
@@ -156,7 +156,7 @@ public class FlatInternalFrameUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -165,7 +165,7 @@ public class FlatInternalFrameUI
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, frame, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, frame, borderShared );
}
/**
@@ -173,7 +173,7 @@ public class FlatInternalFrameUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, frame.getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, frame.getBorder() );
}
//---- class FlatInternalFrameBorder --------------------------------------
@@ -213,13 +213,13 @@ public class FlatInternalFrameUI
case "inactiveDropShadowOpacity": return inactiveDropShadowBorder.applyStyleProperty( "shadowOpacity", value );
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
@Override
public Map<String, Class<?>> getStyleableInfos() {
Map<String, Class<?>> infos = new LinkedHashMap<>();
FlatStyleSupport.collectAnnotatedStyleableInfos( this, infos );
FlatStylingSupport.collectAnnotatedStyleableInfos( this, infos );
infos.put( "borderMargins", Insets.class );
infos.put( "activeDropShadowColor", Color.class );
infos.put( "activeDropShadowInsets", Insets.class );

View File

@@ -36,8 +36,8 @@ import javax.swing.plaf.basic.BasicHTML;
import javax.swing.plaf.basic.BasicLabelUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.UIScale;
@@ -83,7 +83,7 @@ public class FlatLabelUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -141,14 +141,14 @@ public class FlatLabelUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -156,7 +156,7 @@ public class FlatLabelUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**

View File

@@ -27,8 +27,8 @@ import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicListUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JList}.
@@ -90,7 +90,7 @@ public class FlatListUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -140,7 +140,7 @@ public class FlatListUI
@Override
protected PropertyChangeListener createPropertyChangeListener() {
return FlatStyleSupport.createPropertyChangeListener( list, this::applyStyle,
return FlatStylingSupport.createPropertyChangeListener( list, this::applyStyle,
super.createPropertyChangeListener() );
}
@@ -153,7 +153,7 @@ public class FlatListUI
Color oldSelectionInactiveBackground = selectionInactiveBackground;
Color oldSelectionInactiveForeground = selectionInactiveForeground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
// update selection background
if( selectionBackground != oldSelectionBackground ) {
@@ -178,7 +178,7 @@ public class FlatListUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -186,7 +186,7 @@ public class FlatListUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**

View File

@@ -24,8 +24,8 @@ import java.awt.Insets;
import java.util.Map;
import javax.swing.JMenuBar;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableBorder;
/**
* Border for {@link javax.swing.JMenuBar}.
@@ -45,12 +45,12 @@ public class FlatMenuBarBorder
*/
@Override
public Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
@Override
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -40,7 +40,7 @@ import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicMenuBarUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.SystemInfo;
/**
@@ -80,7 +80,7 @@ public class FlatMenuBarUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -102,7 +102,7 @@ public class FlatMenuBarUI
protected void installListeners() {
super.installListeners();
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener(
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
menuBar, this::applyStyle, null );
menuBar.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -131,7 +131,7 @@ public class FlatMenuBarUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -140,7 +140,7 @@ public class FlatMenuBarUI
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, menuBar, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, menuBar, borderShared );
}
/**
@@ -148,7 +148,7 @@ public class FlatMenuBarUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, menuBar.getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, menuBar.getBorder() );
}
@Override

View File

@@ -42,8 +42,8 @@ import javax.swing.text.View;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.icons.FlatCheckBoxMenuItemIcon;
import com.formdev.flatlaf.icons.FlatMenuArrowIcon;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.DerivedColor;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.HiDPIUtils;
@@ -110,9 +110,9 @@ public class FlatMenuItemRenderer
if( key.startsWith( "icon." ) || key.equals( "selectionForeground" ) ) {
if( iconsShared ) {
if( checkIcon instanceof FlatCheckBoxMenuItemIcon )
checkIcon = FlatStyleSupport.cloneIcon( checkIcon );
checkIcon = FlatStylingSupport.cloneIcon( checkIcon );
if( arrowIcon instanceof FlatMenuArrowIcon )
arrowIcon = FlatStyleSupport.cloneIcon( arrowIcon );
arrowIcon = FlatStylingSupport.cloneIcon( arrowIcon );
iconsShared = false;
}
@@ -147,18 +147,18 @@ public class FlatMenuItemRenderer
}
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
Map<String, Class<?>> infos = FlatStyleSupport.getAnnotatedStyleableInfos( this );
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );
if( checkIcon instanceof FlatCheckBoxMenuItemIcon )
FlatStyleSupport.putAllPrefixKey( infos, "icon.", ((FlatCheckBoxMenuItemIcon)checkIcon).getStyleableInfos() );
FlatStylingSupport.putAllPrefixKey( infos, "icon.", ((FlatCheckBoxMenuItemIcon)checkIcon).getStyleableInfos() );
if( arrowIcon instanceof FlatMenuArrowIcon )
FlatStyleSupport.putAllPrefixKey( infos, "icon.", ((FlatMenuArrowIcon)arrowIcon).getStyleableInfos() );
FlatStylingSupport.putAllPrefixKey( infos, "icon.", ((FlatMenuArrowIcon)arrowIcon).getStyleableInfos() );
infos.remove( "icon.selectionForeground" );
return infos;
}

View File

@@ -27,8 +27,8 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuItemUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JMenuItem}.
@@ -73,7 +73,7 @@ public class FlatMenuItemUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( menuItem ) );
applyStyle( FlatStylingSupport.getStyle( menuItem ) );
}
@Override
@@ -99,14 +99,14 @@ public class FlatMenuItemUI
@Override
protected PropertyChangeListener createPropertyChangeListener( JComponent c ) {
return FlatStyleSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -130,7 +130,7 @@ public class FlatMenuItemUI
case "disabledForeground":
case "acceleratorForeground":
case "acceleratorSelectionForeground":
return FlatStyleSupport.applyToField( ui, key, key, value );
return FlatStylingSupport.applyToField( ui, key, key, value );
default: throw new UnknownStyleException( key );
}

View File

@@ -33,8 +33,8 @@ import javax.swing.UIManager;
import javax.swing.event.MouseInputListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JMenu}.
@@ -90,7 +90,7 @@ public class FlatMenuUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( menuItem ) );
applyStyle( FlatStylingSupport.getStyle( menuItem ) );
}
@Override
@@ -145,14 +145,14 @@ public class FlatMenuUI
@Override
protected PropertyChangeListener createPropertyChangeListener( JComponent c ) {
return FlatStyleSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**

View File

@@ -39,7 +39,7 @@ import javax.swing.text.JTextComponent;
import javax.swing.text.PasswordView;
import javax.swing.text.View;
import com.formdev.flatlaf.icons.FlatCapsLockIcon;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JPasswordField}.
@@ -168,7 +168,7 @@ public class FlatPasswordFieldUI
protected Object applyStyleProperty( String key, Object value ) {
if( key.equals( "capsLockIconColor" ) && capsLockIcon instanceof FlatCapsLockIcon ) {
if( capsLockIconShared ) {
capsLockIcon = FlatStyleSupport.cloneIcon( capsLockIcon );
capsLockIcon = FlatStylingSupport.cloneIcon( capsLockIcon );
capsLockIconShared = false;
}
return ((FlatCapsLockIcon)capsLockIcon).applyStyleProperty( key, value );

View File

@@ -24,8 +24,8 @@ import java.util.LinkedHashMap;
import java.util.Map;
import javax.swing.JScrollPane;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableBorder;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.UIScale;
/**

View File

@@ -23,7 +23,7 @@ import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicPopupMenuUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JPopupMenu}.
@@ -53,7 +53,7 @@ public class FlatPopupMenuUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -68,7 +68,7 @@ public class FlatPopupMenuUI
protected void installListeners() {
super.installListeners();
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener( popupMenu, this::applyStyle, null );
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener( popupMenu, this::applyStyle, null );
popupMenu.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -84,7 +84,7 @@ public class FlatPopupMenuUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -93,7 +93,7 @@ public class FlatPopupMenuUI
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, popupMenu, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, popupMenu, borderShared );
}
/**
@@ -101,6 +101,6 @@ public class FlatPopupMenuUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, popupMenu.getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, popupMenu.getBorder() );
}
}

View File

@@ -32,8 +32,8 @@ import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicProgressBarUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.UIScale;
@@ -78,7 +78,7 @@ public class FlatProgressBarUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( progressBar ) );
applyStyle( FlatStylingSupport.getStyle( progressBar ) );
}
@Override
@@ -133,14 +133,14 @@ public class FlatProgressBarUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -148,7 +148,7 @@ public class FlatProgressBarUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -25,8 +25,8 @@ import javax.swing.JComponent;
import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicRadioButtonMenuItemUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JRadioButtonMenuItem}.
@@ -71,7 +71,7 @@ public class FlatRadioButtonMenuItemUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( menuItem ) );
applyStyle( FlatStylingSupport.getStyle( menuItem ) );
}
@Override
@@ -97,14 +97,14 @@ public class FlatRadioButtonMenuItemUI
@Override
protected PropertyChangeListener createPropertyChangeListener( JComponent c ) {
return FlatStyleSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**

View File

@@ -36,9 +36,9 @@ import javax.swing.plaf.basic.BasicButtonListener;
import javax.swing.plaf.basic.BasicRadioButtonUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.icons.FlatCheckBoxIcon;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -92,7 +92,7 @@ public class FlatRadioButtonUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -159,7 +159,7 @@ public class FlatRadioButtonUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -172,7 +172,7 @@ public class FlatRadioButtonUI
return new UnknownStyleException( key );
if( iconShared ) {
icon = FlatStyleSupport.cloneIcon( icon );
icon = FlatStylingSupport.cloneIcon( icon );
iconShared = false;
}
@@ -180,7 +180,7 @@ public class FlatRadioButtonUI
return ((FlatCheckBoxIcon)icon).applyStyleProperty( key, value );
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -188,7 +188,7 @@ public class FlatRadioButtonUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStyleSupport.getAnnotatedStyleableInfos( this );
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );
if( icon instanceof FlatCheckBoxIcon ) {
for( Map.Entry<String, Class<?>> e : ((FlatCheckBoxIcon)icon).getStyleableInfos().entrySet() )
infos.put( "icon.".concat( e.getKey() ), e.getValue() );

View File

@@ -18,7 +18,7 @@ package com.formdev.flatlaf.ui;
import java.awt.Component;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* Border for various components (e.g. {@link javax.swing.JComboBox}).

View File

@@ -37,8 +37,8 @@ import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicScrollBarUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -115,7 +115,7 @@ public class FlatScrollBarUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -224,7 +224,7 @@ public class FlatScrollBarUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( incrButton instanceof FlatScrollBarButton )
((FlatScrollBarButton)incrButton).updateStyle();
@@ -246,7 +246,7 @@ public class FlatScrollBarUI
case "maximumThumbSize": oldValue = maximumThumbSize; maximumThumbSize = (Dimension) value; return oldValue;
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -260,7 +260,7 @@ public class FlatScrollBarUI
infos.put( "width", int.class );
infos.put( "minimumThumbSize", Dimension.class );
infos.put( "maximumThumbSize", Dimension.class );
FlatStyleSupport.collectAnnotatedStyleableInfos( this, infos );
FlatStylingSupport.collectAnnotatedStyleableInfos( this, infos );
return infos;
}

View File

@@ -48,7 +48,7 @@ import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicScrollPaneUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JScrollPane}.
@@ -87,7 +87,7 @@ public class FlatScrollPaneUI
int focusWidth = UIManager.getInt( "Component.focusWidth" );
LookAndFeel.installProperty( c, "opaque", focusWidth == 0 );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
MigLayoutVisualPadding.install( scrollpane );
}
@@ -305,7 +305,7 @@ public class FlatScrollPaneUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -319,7 +319,7 @@ public class FlatScrollPaneUI
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, scrollpane, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, scrollpane, borderShared );
}
/**
@@ -327,7 +327,7 @@ public class FlatScrollPaneUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, scrollpane.getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, scrollpane.getBorder() );
}
@Override

View File

@@ -29,8 +29,8 @@ import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSeparatorUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JSeparator}.
@@ -82,7 +82,7 @@ public class FlatSeparatorUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -111,7 +111,7 @@ public class FlatSeparatorUI
protected void installListeners( JSeparator s ) {
super.installListeners( s );
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener(
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
s, style -> applyStyle( s, this, style ), null );
s.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -140,14 +140,14 @@ public class FlatSeparatorUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -155,7 +155,7 @@ public class FlatSeparatorUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -36,8 +36,8 @@ import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSliderUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.UIScale;
@@ -119,7 +119,7 @@ public class FlatSliderUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( slider ) );
applyStyle( FlatStylingSupport.getStyle( slider ) );
}
@Override
@@ -186,7 +186,7 @@ public class FlatSliderUI
@Override
protected PropertyChangeListener createPropertyChangeListener( JSlider slider ) {
return FlatStyleSupport.createPropertyChangeListener( slider, this::applyStyle,
return FlatStylingSupport.createPropertyChangeListener( slider, this::applyStyle,
super.createPropertyChangeListener( slider ) );
}
@@ -194,14 +194,14 @@ public class FlatSliderUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -209,7 +209,7 @@ public class FlatSliderUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -45,8 +45,8 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicSpinnerUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JSpinner}.
@@ -114,7 +114,7 @@ public class FlatSpinnerUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( spinner ) );
applyStyle( FlatStylingSupport.getStyle( spinner ) );
}
@Override
@@ -194,7 +194,7 @@ public class FlatSpinnerUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateEditorPadding();
updateArrowButtonsStyle();
}
@@ -205,7 +205,7 @@ public class FlatSpinnerUI
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, spinner, borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, spinner, borderShared );
}
/**
@@ -213,7 +213,7 @@ public class FlatSpinnerUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, spinner.getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, spinner.getBorder() );
}
@Override

View File

@@ -35,9 +35,9 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSplitPaneDivider;
import javax.swing.plaf.basic.BasicSplitPaneUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -90,7 +90,7 @@ public class FlatSplitPaneUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( splitPane ) );
applyStyle( FlatStylingSupport.getStyle( splitPane ) );
}
@Override
@@ -121,7 +121,7 @@ public class FlatSplitPaneUI
protected void installListeners() {
super.installListeners();
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener( splitPane, this::applyStyle, null );
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener( splitPane, this::applyStyle, null );
splitPane.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -142,7 +142,7 @@ public class FlatSplitPaneUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( divider instanceof FlatSplitPaneDivider )
((FlatSplitPaneDivider)divider).updateStyle();
@@ -158,7 +158,7 @@ public class FlatSplitPaneUI
} catch( UnknownStyleException ex ) {
// ignore
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -166,7 +166,7 @@ public class FlatSplitPaneUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStyleSupport.getAnnotatedStyleableInfos( this );
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );
if( divider instanceof FlatSplitPaneDivider )
infos.putAll( ((FlatSplitPaneDivider)divider).getStyleableInfos() );
return infos;
@@ -193,14 +193,14 @@ public class FlatSplitPaneUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since TODO
*/
public Map<String, Class<?>> getStyleableInfos() {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
void updateStyle() {

View File

@@ -45,7 +45,7 @@ import com.formdev.flatlaf.util.SystemInfo;
* @author Karl Tauber
* @since TODO
*/
public class FlatStyleSupport
public class FlatStylingSupport
{
/**
* Indicates that a field is intended to be used by FlatLaf styling support.

View File

@@ -87,9 +87,9 @@ import javax.swing.text.JTextComponent;
import javax.swing.text.View;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.icons.FlatTabbedPaneCloseIcon;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.Animator;
import com.formdev.flatlaf.util.CubicBezierEasing;
import com.formdev.flatlaf.util.JavaCompatibility;
@@ -269,7 +269,7 @@ public class FlatTabbedPaneUI
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -576,7 +576,7 @@ public class FlatTabbedPaneUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
// update buttons
for( Component c : tabPane.getComponents() ) {
@@ -595,7 +595,7 @@ public class FlatTabbedPaneUI
return new UnknownStyleException( key );
if( closeIconShared ) {
closeIcon = FlatStyleSupport.cloneIcon( closeIcon );
closeIcon = FlatStylingSupport.cloneIcon( closeIcon );
closeIconShared = false;
}
@@ -626,7 +626,7 @@ public class FlatTabbedPaneUI
}
}
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -638,7 +638,7 @@ public class FlatTabbedPaneUI
infos.put( "tabInsets", Insets.class );
infos.put( "tabAreaInsets", Insets.class );
infos.put( "textIconGap", int.class );
FlatStyleSupport.collectAnnotatedStyleableInfos( this, infos );
FlatStylingSupport.collectAnnotatedStyleableInfos( this, infos );
if( closeIcon instanceof FlatTabbedPaneCloseIcon )
infos.putAll( ((FlatTabbedPaneCloseIcon)closeIcon).getStyleableInfos() );
return infos;

View File

@@ -38,8 +38,8 @@ import javax.swing.plaf.basic.BasicTableHeaderUI;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -98,7 +98,7 @@ public class FlatTableHeaderUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -123,7 +123,7 @@ public class FlatTableHeaderUI
protected void installListeners() {
super.installListeners();
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener( header, this::applyStyle, null );
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener( header, this::applyStyle, null );
header.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -139,7 +139,7 @@ public class FlatTableHeaderUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
@@ -149,7 +149,7 @@ public class FlatTableHeaderUI
if( key.equals( "sortIconPosition" ) && value instanceof String )
value = parseSortIconPosition( (String) value );
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -157,7 +157,7 @@ public class FlatTableHeaderUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
private static int parseSortIconPosition( String str ) {

View File

@@ -38,8 +38,8 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableUI;
import javax.swing.table.JTableHeader;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -124,7 +124,7 @@ public class FlatTableUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -187,7 +187,7 @@ public class FlatTableUI
protected void installListeners() {
super.installListeners();
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener( table, this::applyStyle, null );
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener( table, this::applyStyle, null );
table.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -229,7 +229,7 @@ public class FlatTableUI
Color oldSelectionInactiveBackground = selectionInactiveBackground;
Color oldSelectionInactiveForeground = selectionInactiveForeground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
// update selection background
if( selectionBackground != oldSelectionBackground ) {
@@ -254,7 +254,7 @@ public class FlatTableUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -262,7 +262,7 @@ public class FlatTableUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**

View File

@@ -29,8 +29,8 @@ import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTextAreaUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
/**
@@ -86,7 +86,7 @@ public class FlatTextAreaUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -153,7 +153,7 @@ public class FlatTextAreaUI
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateBackground();
}
@@ -162,7 +162,7 @@ public class FlatTextAreaUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -170,7 +170,7 @@ public class FlatTextAreaUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
private void updateBackground() {

View File

@@ -18,7 +18,7 @@ package com.formdev.flatlaf.ui;
import java.awt.Component;
import javax.swing.UIManager;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
/**
* Border for various text components (e.g. {@link javax.swing.JTextField}).

View File

@@ -43,8 +43,8 @@ import javax.swing.plaf.basic.BasicTextFieldUI;
import javax.swing.text.Caret;
import javax.swing.text.JTextComponent;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.JavaCompatibility;
import com.formdev.flatlaf.util.UIScale;
@@ -107,7 +107,7 @@ public class FlatTextFieldUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -209,7 +209,7 @@ public class FlatTextFieldUI
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateBackground();
}
@@ -220,7 +220,7 @@ public class FlatTextFieldUI
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStyleSupport.applyToAnnotatedObjectOrBorder( this, key, value, getComponent(), borderShared );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, getComponent(), borderShared );
}
/**
@@ -228,7 +228,7 @@ public class FlatTextFieldUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this, getComponent().getBorder() );
return FlatStylingSupport.getAnnotatedStyleableInfos( this, getComponent().getBorder() );
}
private void updateBackground() {

View File

@@ -29,8 +29,8 @@ import javax.swing.JEditorPane;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTextPaneUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.HiDPIUtils;
/**
@@ -87,7 +87,7 @@ public class FlatTextPaneUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -161,7 +161,7 @@ public class FlatTextPaneUI
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateBackground();
}
@@ -170,7 +170,7 @@ public class FlatTextPaneUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -178,7 +178,7 @@ public class FlatTextPaneUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
private void updateBackground() {

View File

@@ -28,8 +28,8 @@ import javax.swing.JComponent;
import javax.swing.JToggleButton;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.UnknownStyleException;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.UnknownStyleException;
import com.formdev.flatlaf.util.UIScale;
/**

View File

@@ -32,8 +32,8 @@ import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToolBarSeparatorUI;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JToolBar.Separator}.
@@ -76,7 +76,7 @@ public class FlatToolBarSeparatorUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -107,7 +107,7 @@ public class FlatToolBarSeparatorUI
protected void installListeners( JSeparator s ) {
super.installListeners( s );
propertyChangeListener = FlatStyleSupport.createPropertyChangeListener(
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
s, style -> applyStyle( s, this, style ), null );
s.addPropertyChangeListener( FlatClientProperties.STYLE, propertyChangeListener );
}
@@ -136,14 +136,14 @@ public class FlatToolBarSeparatorUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -151,7 +151,7 @@ public class FlatToolBarSeparatorUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
@Override

View File

@@ -29,8 +29,8 @@ import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToolBarUI;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JToolBar}.
@@ -83,7 +83,7 @@ public class FlatToolBarUI
if( !focusableButtons )
setButtonsFocusable( false );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -133,7 +133,7 @@ public class FlatToolBarUI
@Override
protected PropertyChangeListener createPropertyListener() {
return FlatStyleSupport.createPropertyChangeListener( toolBar, this::applyStyle, super.createPropertyListener() );
return FlatStylingSupport.createPropertyChangeListener( toolBar, this::applyStyle, super.createPropertyListener() );
}
/**
@@ -142,7 +142,7 @@ public class FlatToolBarUI
protected void applyStyle( Object style ) {
boolean oldFocusableButtons = focusableButtons;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( focusableButtons != oldFocusableButtons )
setButtonsFocusable( focusableButtons );
@@ -152,7 +152,7 @@ public class FlatToolBarUI
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -160,7 +160,7 @@ public class FlatToolBarUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**

View File

@@ -40,8 +40,8 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTreeUI;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.TreePath;
import com.formdev.flatlaf.ui.FlatStyleSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStyleSupport.StyleableUI;
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -156,7 +156,7 @@ public class FlatTreeUI
public void installUI( JComponent c ) {
super.installUI( c );
applyStyle( FlatStyleSupport.getStyle( c ) );
applyStyle( FlatStylingSupport.getStyle( c ) );
}
@Override
@@ -313,14 +313,14 @@ public class FlatTreeUI
* @since TODO
*/
protected void applyStyle( Object style ) {
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since TODO
*/
protected Object applyStyleProperty( String key, Object value ) {
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
@@ -328,7 +328,7 @@ public class FlatTreeUI
*/
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStyleSupport.getAnnotatedStyleableInfos( this );
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**

View File

@@ -868,7 +868,7 @@ debug*/
* with other components. This is only possible if it does not have styles.
*/
public static boolean canUseSharedUI( JComponent c ) {
return FlatStyleSupport.getStyle( c ) == null;
return FlatStylingSupport.getStyle( c ) == null;
}
//---- class RepaintFocusListener -----------------------------------------

View File

@@ -47,21 +47,21 @@ public class TestFlatStyling
@Test
void parse() {
assertEquals( null, FlatStyleSupport.parse( null ) );
assertEquals( null, FlatStyleSupport.parse( "" ) );
assertEquals( null, FlatStyleSupport.parse( " " ) );
assertEquals( null, FlatStyleSupport.parse( ";" ) );
assertEquals( null, FlatStyleSupport.parse( " ; ; " ) );
assertEquals( null, FlatStylingSupport.parse( null ) );
assertEquals( null, FlatStylingSupport.parse( "" ) );
assertEquals( null, FlatStylingSupport.parse( " " ) );
assertEquals( null, FlatStylingSupport.parse( ";" ) );
assertEquals( null, FlatStylingSupport.parse( " ; ; " ) );
assertEquals(
expectedMap( "background", Color.WHITE ),
FlatStyleSupport.parse( "background: #fff" ) );
FlatStylingSupport.parse( "background: #fff" ) );
assertEquals(
expectedMap( "background", Color.WHITE, "foreground", Color.BLACK ),
FlatStyleSupport.parse( "background: #fff; foreground: #000" ) );
FlatStylingSupport.parse( "background: #fff; foreground: #000" ) );
assertEquals(
expectedMap( "background", Color.WHITE, "foreground", Color.BLACK, "someWidth", 20 ),
FlatStyleSupport.parse( "background: #fff; foreground: #000; someWidth: 20" ) );
FlatStylingSupport.parse( "background: #fff; foreground: #000; someWidth: 20" ) );
}
private Map<Object, Object> expectedMap( Object... keyValuePairs ) {