public class ThemeManager extends TypedUIProperties
ThemeManager is responsible for collecting properties of the current DockTheme and redistribute them. The
ThemeManager provides facilities for clients to modify and override properties of a theme without the need
to access or change the DockTheme itself.TypedUIProperties.Type<T>| Constructor and Description |
|---|
ThemeManager(DockController controller)
Creates a new object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUIListener(UIListener listener)
Adds an
UIListener to this manager, the listener gets
notified when the graphical user interface needs an update because
the LookAndFeel changed. |
DockTheme |
getTheme()
Gets the current theme
|
void |
init()
Initializes this manager, must be called exactly once.
|
void |
kill()
Destroys this manager and releases resources.
|
<V,A extends V> |
link(PropertyKey<A> source,
TypedUIProperties.Type<V> type,
String id)
|
void |
removeUIListener(UIListener listener)
Removes a listener from this manager.
|
void |
setBackgroundPaint(String id,
BackgroundPaint value)
Sets an algorithm that is used to paint the background of items which register an
UIValue with
an identifier of id. |
void |
setBackgroundPaintBridge(Path kind,
UIBridge<BackgroundPaint,UIValue<BackgroundPaint>> bridge)
|
void |
setBorderModifier(String id,
BorderModifier modifier)
Sets a strategy that is used to modify the border of various components.
Valid identifiers can be, but are not restricted to: MiniButton.BORDER_KEY_NORMAL
MiniButton.BORDER_KEY_NORMAL_SELECTED
MiniButton.BORDER_KEY_MOUSE_OVER
MiniButton.BORDER_KEY_MOUSE_OVER_SELECTED
MiniButton.BORDER_KEY_MOUSE_PRESSED
MiniButton.BORDER_KEY_MOUSE_PRESSED_SELECTED
"dock.border".displayer.basic.base
"dock.border".displayer.basic.content
"dock.border".displayer.bubble
"dock.border".displayer.eclipse.no_title.out
"dock.border".displayer.eclipse.no_title.in
"dock.border".displayer.eclipse
"dock.border".displayer.eclipse.content
"dock.border".screen.window
"dock.border".stack.eclipse
"dock.border".stack.eclipse.content
"dock.border".title.button
"dock.border".title.button.flat
"dock.border".title.button.flat.hover
"dock.border".title.button.flat.pressed
"dock.border".title.button.flat.selected
"dock.border".title.button.flat.selected.hover
"dock.border".title.button.flat.selected.pressed
"dock.border".title.button.selected
"dock.border".title.button.pressed
"dock.border".title.button.selected.pressed
"dock.border".title.eclipse.button.flat
"dock.border".title.flat
"dock.border".title.station.basic
"dock.border".title.tab
|
void |
setBorderModifierBridge(Path kind,
UIBridge<BorderModifier,UIValue<BorderModifier>> bridge)
|
void |
setCombiner(String id,
Combiner value)
|
void |
setCombinerBridge(Path kind,
UIBridge<Combiner,UIValue<Combiner>> bridge)
|
void |
setDisplayerFactory(String id,
DisplayerFactory value)
Sets a strategy how to display
Dockables on a DockStation. |
void |
setDisplayerFactoryBridge(Path kind,
UIBridge<DisplayerFactory,UIValue<DisplayerFactory>> bridge)
|
void |
setSpanFactory(String id,
SpanFactory value)
Sets a strategy to tell how to animate empty spaces when drag and dropping a
Dockable. |
void |
setSpanFactoryBridge(Path kind,
UIBridge<SpanFactory,UIValue<SpanFactory>> bridge)
|
void |
setStationPaint(String id,
StationPaint value)
Sets an algorithm to paint in the overlay panel of
DockStations. |
void |
setStationPaintBridge(Path kind,
UIBridge<StationPaint,UIValue<StationPaint>> bridge)
|
void |
setTheme(DockTheme theme)
Sets the theme of this manager.
|
protected UIListener[] |
uiListeners()
Gets all the available
UIListeners. |
<V> void |
unlink(TypedUIProperties.Type<V> type,
String id)
Disables a link between a property and the entry
id. |
void |
updateUI()
Informs all registered
UIListeners that the user interface
needs an update because the LookAndFeel changed. |
public static final TypedUIProperties.Type<StationPaint> STATION_PAINT_TYPE
StationPaints.public static final String STATION_PAINT
StationPaintpublic static final TypedUIProperties.Type<Combiner> COMBINER_TYPE
Combinerpublic static final String COMBINER
Combinerpublic static final TypedUIProperties.Type<DisplayerFactory> DISPLAYER_FACTORY_TYPE
DisplayerFactorypublic static final String DISPLAYER_FACTORY
DisplayerFactorypublic static final TypedUIProperties.Type<BackgroundPaint> BACKGROUND_PAINT_TYPE
BackgroundPaintpublic static final String BACKGROUND_PAINT
BackgroundPaintpublic static final TypedUIProperties.Type<BorderModifier> BORDER_MODIFIER_TYPE
BorderModifierpublic static final String BORDER_MODIFIER
BorderModifierpublic static final TypedUIProperties.Type<SpanFactory> SPAN_FACTORY_TYPE
SpanFactorypublic static final String SPAN_FACTORY
SpanFactorypublic ThemeManager(DockController controller)
controller - the owner of this manager, not nullpublic void init()
@FrameworkOnly public void kill()
public <V,A extends V> void link(PropertyKey<A> source, TypedUIProperties.Type<V> type, String id)
V - the kind of property to readA - the kind of entry to writesource - the key of the property to readtype - the type of the entry to writeid - the identifier of the entry to writepublic <V> void unlink(TypedUIProperties.Type<V> type, String id)
id.V - the typetype - the type of the entryid - the identifier of the entry to unlinklink(PropertyKey, TypedUIProperties.Type, String)public void addUIListener(UIListener listener)
UIListener to this manager, the listener gets
notified when the graphical user interface needs an update because
the LookAndFeel changed.listener - the new listenerpublic void removeUIListener(UIListener listener)
listener - the listener to removeprotected UIListener[] uiListeners()
UIListeners.public void updateUI()
UIListeners that the user interface
needs an update because the LookAndFeel changed.public DockTheme getTheme()
public void setTheme(DockTheme theme)
UIListeners
and ensures that all DockStations receive the updatetheme - the new themepublic void setStationPaint(String id, StationPaint value)
DockStations. Possible
identifiers can be, but are not restricted to:
id - the identifier of the stations that should use valuevalue - the new algorithm or nullpublic void setStationPaintBridge(Path kind, UIBridge<StationPaint,UIValue<StationPaint>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or nullpublic void setCombiner(String id, Combiner value)
Dockables can be merged into a new Dockable.
Valid identifiers may be, but are not restricted to:
id - the identifier of the item that uses valuevalue - the new strategy, can be nullpublic void setCombinerBridge(Path kind, UIBridge<Combiner,UIValue<Combiner>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or nullpublic void setDisplayerFactory(String id, DisplayerFactory value)
Dockables on a DockStation. Valid
identifiers can be, but are not restricted to:
id - the identifier of the item that uses valuevalue - the new strategy, can be nullpublic void setDisplayerFactoryBridge(Path kind, UIBridge<DisplayerFactory,UIValue<DisplayerFactory>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or nullpublic void setSpanFactory(String id, SpanFactory value)
Dockable.
Valid identifiers can be, but are not restricted to:
id - the identifier of the item that uses valuevalue - the new strategy, can be nullpublic void setSpanFactoryBridge(Path kind, UIBridge<SpanFactory,UIValue<SpanFactory>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or null@ClientOnly public void setBackgroundPaint(String id, BackgroundPaint value)
UIValue with
an identifier of id. Valid identifier can be, but are not restricted to:
id - the identifier of the items that should use valuevalue - the new background algorithm, can be nullpublic void setBackgroundPaintBridge(Path kind, UIBridge<BackgroundPaint,UIValue<BackgroundPaint>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or nullpublic void setBorderModifier(String id, BorderModifier modifier)
MiniButton.BORDER_KEY_NORMALMiniButton.BORDER_KEY_NORMAL_SELECTEDMiniButton.BORDER_KEY_MOUSE_OVERMiniButton.BORDER_KEY_MOUSE_OVER_SELECTEDMiniButton.BORDER_KEY_MOUSE_PRESSEDMiniButton.BORDER_KEY_MOUSE_PRESSED_SELECTEDid - the identifier of the items that should use modifiermodifier - the new strategy, can be nullpublic void setBorderModifierBridge(Path kind, UIBridge<BorderModifier,UIValue<BorderModifier>> bridge)
UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind.kind - the kind of UIValue bridge will handlebridge - the new bridge or nullCopyright © 2017 Docking Frames. All rights reserved.