Interface FlatStylingSupport.StyleableObject
- All Known Implementing Classes:
FlatBorder, FlatButtonBorder, FlatCapsLockIcon, FlatCheckBoxIcon, FlatCheckBoxMenuItemIcon, FlatClearIcon, FlatDropShadowBorder, FlatHelpButtonIcon, FlatInternalFrameUI.FlatInternalFrameBorder, FlatMenuArrowIcon, FlatMenuBarBorder, FlatPopupMenuBorder, FlatRadioButtonIcon, FlatRadioButtonMenuItemIcon, FlatRoundBorder, FlatScrollPaneBorder, FlatSearchIcon, FlatSearchWithHistoryIcon, FlatTabbedPaneCloseIcon, FlatTextBorder
- Enclosing class:
FlatStylingSupport
public static interface FlatStylingSupport.StyleableObject
An object that implements this interface is intended to support FlatLaf styling.
- Since:
- 3.7
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectapplyStyleProperty(String key, Object value) Applies the given value to this object.Returns a map of all styleable properties.default ObjectgetStyleableValue(String key) Returns the current value for the given property key.
-
Method Details
-
applyStyleProperty
default Object applyStyleProperty(String key, Object value) throws FlatStylingSupport.UnknownStyleException, IllegalArgumentException Applies the given value to this object.The default implementation invokes
FlatStylingSupport.applyToAnnotatedObject(Object, String, Object).- Parameters:
key- the name of the propertyvalue- the new value- Returns:
- the old value of the property
- Throws:
FlatStylingSupport.UnknownStyleExceptionIllegalArgumentException
-
getStyleableInfos
Returns a map of all styleable properties. The key is the name of the property and the value the type of the property.The default implementation invokes
FlatStylingSupport.getAnnotatedStyleableInfos(Object).- Throws:
IllegalArgumentException
-
getStyleableValue
Returns the current value for the given property key.The default implementation invokes
FlatStylingSupport.getAnnotatedStyleableValue(Object, String).- Parameters:
key- the name of the property- Returns:
- the current value of the property
- Throws:
IllegalArgumentException
-