|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.util.TypedUIProperties
bibliothek.gui.dock.themes.ThemeManager
public class ThemeManager
The 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class bibliothek.gui.dock.util.TypedUIProperties |
|---|
TypedUIProperties.Type<T> |
| Constructor Summary | |
|---|---|
ThemeManager(DockController controller)
Creates a new object |
|
| Method Summary | ||
|---|---|---|
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 managere, must be called exactly once. |
|
void |
kill()
Destroys this manager and releases resources. |
|
|
link(PropertyKey<A> source,
TypedUIProperties.Type<V> type,
String id)
Creates a link between the property source and the entry id on the
level Priority.THEME. |
|
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)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
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)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
void |
setCombiner(String id,
Combiner value)
Sets a strategy how two Dockables can be merged into a new Dockable. |
|
void |
setCombinerBridge(Path kind,
UIBridge<Combiner,UIValue<Combiner>> bridge)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
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)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
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)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
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)
Sets the UIBridge that will transfer properties to those UIValues whose kind is either
kind or a child of kind. |
|
void |
setTheme(DockTheme theme)
Sets the theme of this manager. |
|
protected UIListener[] |
uiListeners()
Gets all the available UIListeners. |
|
|
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. |
|
| Methods inherited from class bibliothek.gui.dock.util.TypedUIProperties |
|---|
add, clear, get, getScheme, publish, put, registerType, remove, setScheme, unpublish, unpublish |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TypedUIProperties.Type<StationPaint> STATION_PAINT_TYPE
StationPaints.
public static final String STATION_PAINT
StationPaint
public static final TypedUIProperties.Type<Combiner> COMBINER_TYPE
Combiner
public static final String COMBINER
Combiner
public static final TypedUIProperties.Type<DisplayerFactory> DISPLAYER_FACTORY_TYPE
DisplayerFactory
public static final String DISPLAYER_FACTORY
DisplayerFactory
public static final TypedUIProperties.Type<BackgroundPaint> BACKGROUND_PAINT_TYPE
BackgroundPaint
public static final String BACKGROUND_PAINT
BackgroundPaint
public static final TypedUIProperties.Type<BorderModifier> BORDER_MODIFIER_TYPE
BorderModifier
public static final String BORDER_MODIFIER
BorderModifier
public static final TypedUIProperties.Type<SpanFactory> SPAN_FACTORY_TYPE
SpanFactory
public static final String SPAN_FACTORY
SpanFactory
| Constructor Detail |
|---|
public ThemeManager(DockController controller)
controller - the owner of this manager, not null| Method Detail |
|---|
public void init()
@FrameworkOnly public void kill()
public <V,A extends V> void link(PropertyKey<A> source,
TypedUIProperties.Type<V> type,
String id)
source and the entry id on the
level Priority.THEME.
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 write
public <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.
addUIListener(UIListener),
removeUIListener(UIListener)public DockTheme getTheme()
public void setTheme(DockTheme theme)
UIListeners
and ensures that all DockStations receive the update
theme - the new theme
public 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 valluevalue - the new algorithm or null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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_SELECTED
id - the identifier of the items that should use modifiermodifier - the new strategy, can be null
public 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 null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||