|
||||||||||
| 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> |
| Field Summary | |
|---|---|
static java.lang.String |
BACKGROUND_PAINT
unique identifier for the basic BackgroundPaint |
static TypedUIProperties.Type<BackgroundPaint> |
BACKGROUND_PAINT_TYPE
Identifier for the type BackgroundPaint |
static java.lang.String |
BORDER_MODIFIER
unique identifier for the basic BorderModifier |
static TypedUIProperties.Type<BorderModifier> |
BORDER_MODIFIER_TYPE
Identifier for the type BorderModifier |
static java.lang.String |
COMBINER
unique identifier for the basic Combiner |
static TypedUIProperties.Type<Combiner> |
COMBINER_TYPE
Identifier for the type Combiner |
static java.lang.String |
DISPLAYER_FACTORY
unique identifier for the basic DisplayerFactory |
static TypedUIProperties.Type<DisplayerFactory> |
DISPLAYER_FACTORY_TYPE
Identifier for the type DisplayerFactory |
static java.lang.String |
STATION_PAINT
unique identifier for the basic StationPaint |
static TypedUIProperties.Type<StationPaint> |
STATION_PAINT_TYPE
Identifier for a factory that creates StationPaints. |
| 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,
java.lang.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(java.lang.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(java.lang.String id,
BorderModifier modifier)
Sets a strategy that is used to modify the border of various components. |
|
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(java.lang.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(java.lang.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 |
setStationPaint(java.lang.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,
java.lang.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 java.lang.String STATION_PAINT
StationPaint
public static final TypedUIProperties.Type<Combiner> COMBINER_TYPE
Combiner
public static final java.lang.String COMBINER
Combiner
public static final TypedUIProperties.Type<DisplayerFactory> DISPLAYER_FACTORY_TYPE
DisplayerFactory
public static final java.lang.String DISPLAYER_FACTORY
DisplayerFactory
public static final TypedUIProperties.Type<BackgroundPaint> BACKGROUND_PAINT_TYPE
BackgroundPaint
public static final java.lang.String BACKGROUND_PAINT
BackgroundPaint
public static final TypedUIProperties.Type<BorderModifier> BORDER_MODIFIER_TYPE
BorderModifier
public static final java.lang.String BORDER_MODIFIER
BorderModifier
| 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,
java.lang.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,
java.lang.String id)
id.
V - the typetype - the type of the entryid - the identifier of the entry to unlink#link(PropertyKey, 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(java.lang.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(java.lang.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(java.lang.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
@ClientOnly
public void setBackgroundPaint(java.lang.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(java.lang.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 | |||||||||