Class AbstractPreferenceStyler
- java.lang.Object
-
- net.officefloor.gef.ide.preferences.AbstractPreferenceStyler
-
- All Implemented Interfaces:
PreferenceStyler
- Direct Known Subclasses:
ModelPreferenceStyler
,NodePreferenceStyler
public abstract class AbstractPreferenceStyler extends java.lang.Object implements PreferenceStyler
Abstract styler for particular preference.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractPreferenceStyler.PreferenceConfiguration
Preference configuration.
-
Field Summary
Fields Modifier and Type Field Description protected javafx.scene.paint.Color
backgroundColour
BackgroundColor
.protected EnvironmentBridge
envBridge
protected javafx.collections.ObservableMap<java.lang.String,PreferenceValue>
preferencesToChange
Preferences to change.
-
Constructor Summary
Constructors Constructor Description AbstractPreferenceStyler(javafx.collections.ObservableMap<java.lang.String,PreferenceValue> preferencesToChange, EnvironmentBridge envBridge, javafx.scene.paint.Color backgroundColour)
Instantiate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description javafx.scene.layout.Pane
createVisual(java.lang.Runnable close)
Creates a visual for the editing the style.protected java.lang.String
defaultString(java.lang.String value, java.lang.String defaultValue)
Defaults the value if blank.protected abstract AbstractPreferenceStyler.PreferenceConfiguration
init()
Initialises.
-
-
-
Field Detail
-
preferencesToChange
protected final javafx.collections.ObservableMap<java.lang.String,PreferenceValue> preferencesToChange
Preferences to change.
-
envBridge
protected final EnvironmentBridge envBridge
-
backgroundColour
protected final javafx.scene.paint.Color backgroundColour
BackgroundColor
.
-
-
Constructor Detail
-
AbstractPreferenceStyler
public AbstractPreferenceStyler(javafx.collections.ObservableMap<java.lang.String,PreferenceValue> preferencesToChange, EnvironmentBridge envBridge, javafx.scene.paint.Color backgroundColour)
Instantiate.- Parameters:
preferencesToChange
- Loaded with the preferences changes.envBridge
-EnvironmentBridge
.backgroundColour
- BackgroundColor
.
-
-
Method Detail
-
init
protected abstract AbstractPreferenceStyler.PreferenceConfiguration init()
Initialises.- Returns:
AbstractPreferenceStyler.PreferenceConfiguration
to configure preference editing.
-
defaultString
protected java.lang.String defaultString(java.lang.String value, java.lang.String defaultValue)
Defaults the value if blank.- Parameters:
value
- Value to check if blank.defaultValue
- Default value to use if value is blank.- Returns:
- Value if not blank, otherwise default value.
-
createVisual
public javafx.scene.layout.Pane createVisual(java.lang.Runnable close)
Description copied from interface:PreferenceStyler
Creates a visual for the editing the style.- Specified by:
createVisual
in interfacePreferenceStyler
- Parameters:
close
- Removes the view.- Returns:
- Visual for editing the style.
-
-