Module org.jhotdraw8.fxbase
Package org.jhotdraw8.fxbase.styleable
Class AbstractStyleablePropertyBean
java.lang.Object
org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
- All Implemented Interfaces:
PropertyBean,StyleableBean,StyleablePropertyBean
AbstractStyleablePropertyBean.
- Author:
- Werner Randelshofer
-
Property Summary
Properties inherited from interface org.jhotdraw8.fxbase.styleable.StyleableBean
id -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcallObservers(javafx.css.StyleOrigin origin, boolean willChange, javafx.collections.MapChangeListener.Change<Key<?>, Object> change) This method is invoked just before listeners are notified.<T> booleancontainsMapAccessor(javafx.css.StyleOrigin origin, MapAccessor<T> key) Returns if a key is present for that style origin.Creates a key map for theSimpleStyleableMapthat is used to store the properties of this object.Returns the user properties.protected StyleableMap<Key<?>, Object> <T> TgetStyled(@Nullable javafx.css.StyleOrigin origin, MapAccessor<T> key) Returns the styled value.<T> @Nullable TgetStyled(MapAccessor<T> key) Returns the style value.protected <T> voidonPropertyChanged(Key<T> key, T oldValue, T newValue, boolean wasAdded, boolean wasRemoved) This method is invoked just before listeners are notified.<T> @Nullable Tremove(javafx.css.StyleOrigin origin, MapAccessor<T> key) Removes a value.voidremoveAll(javafx.css.StyleOrigin origin) Removes all values of that style origin.voidRemoves all styled values on all origins except on the USER origin.<T> @Nullable TsetStyled(javafx.css.StyleOrigin origin, MapAccessor<T> key, T newValue) Sets the style value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperty, put, remove, set, setNonNull, valueAtMethods inherited from interface org.jhotdraw8.fxbase.styleable.StyleableBean
getId, getPseudoClassStates, getStyle, getStyleableParent, getStyleClasses, getTypeSelector, idPropertyMethods inherited from interface org.jhotdraw8.fxbase.styleable.StyleablePropertyBean
getStyledNonNull
-
Field Details
-
keyMaps
-
properties
-
-
Constructor Details
-
AbstractStyleablePropertyBean
public AbstractStyleablePropertyBean()
-
-
Method Details
-
createKeyMap
Creates a key map for theSimpleStyleableMapthat is used to store the properties of this object.This implementation creates one key map for this class, and shares it with all instances of this class.
- Returns:
- a new map
-
getProperties
Returns the user properties.- Specified by:
getPropertiesin interfacePropertyBean- Returns:
- the map
-
getStyleableMap
-
getStyled
Returns the style value.- Specified by:
getStyledin interfaceStyleablePropertyBean- Type Parameters:
T- The value type- Parameters:
key- The property key- Returns:
- The styled value.
-
getStyled
Description copied from interface:StyleablePropertyBeanReturns the styled value.- Specified by:
getStyledin interfaceStyleablePropertyBean- Type Parameters:
T- The value type- Parameters:
origin- The style originkey- The property key- Returns:
- The styled value.
-
containsMapAccessor
Description copied from interface:StyleablePropertyBeanReturns if a key is present for that style origin.- Specified by:
containsMapAccessorin interfaceStyleablePropertyBean- Type Parameters:
T- The value type- Parameters:
origin- The style originkey- The property key- Returns:
- True if a value is present.
-
setStyled
Sets the style value.- Specified by:
setStyledin interfaceStyleablePropertyBean- Type Parameters:
T- The value type- Parameters:
origin- The style originkey- The property keynewValue- The new value- Returns:
- The old value of that origin
-
remove
Description copied from interface:StyleablePropertyBeanRemoves a value.- Specified by:
removein interfaceStyleablePropertyBean- Type Parameters:
T- The value type- Parameters:
origin- The origin.key- The property key.- Returns:
- The removed value.
-
removeAll
public void removeAll(javafx.css.StyleOrigin origin) Description copied from interface:StyleablePropertyBeanRemoves all values of that style origin.- Specified by:
removeAllin interfaceStyleablePropertyBean- Parameters:
origin- The origin.
-
onPropertyChanged
protected <T> void onPropertyChanged(Key<T> key, T oldValue, T newValue, boolean wasAdded, boolean wasRemoved) This method is invoked just before listeners are notified. This implementation is empty.- Type Parameters:
T- the type- Parameters:
key- the changed keyoldValue- the old valuenewValue- the new valuewasAdded-wasRemoved-
-
callObservers
protected void callObservers(javafx.css.StyleOrigin origin, boolean willChange, javafx.collections.MapChangeListener.Change<Key<?>, Object> change) This method is invoked just before listeners are notified. This implementation is empty.- Parameters:
origin- the style originwillChange- true if the change is about to be performed, false if the change happenedchange- the change
-
resetStyledValues
public void resetStyledValues()Description copied from interface:StyleablePropertyBeanRemoves all styled values on all origins except on the USER origin.- Specified by:
resetStyledValuesin interfaceStyleablePropertyBean
-