bibliothek.gui
Interface DockTheme

All Known Implementing Classes:
BasicTheme, BubbleTheme, CBasicTheme, CBubbleTheme, CDockTheme, CEclipseTheme, CFlatTheme, CSmoothTheme, EclipseTheme, FlatTheme, NoStackTheme, SmoothTheme

public interface DockTheme

A theme describes how a DockStation looks like, which DockTitle are selected, and other behavior. A theme needs only to support one DockController at a time.
Most of the methods of this interface should not be called by the client. Instead the ThemeManager and the DockProperties should be used. To request a value from the ThemeManager the method add must be used to install an observer (of type UIValue). The PropertyKeys specified in this interface may be used directly, but clients should bear in mind that the ThemeManager can override resources that are stored in the DockProperties.

Author:
Benjamin Sigg

Field Summary
static PropertyKey<BackgroundPaint> BACKGROUND_PAINT
          A unique identifier for the DockProperties to access the current BackgroundPaint.
static PropertyKey<BorderModifier> BORDER_MODIFIER
          A unique identifier for the DockProperties to access the current BorderModifier.
static PropertyKey<Combiner> COMBINER
          A unique identifier for the DockProperties to access the current Combiner.
static PropertyKey<DisplayerFactory> DISPLAYER_FACTORY
          A unique identifier for the DockProperties to access the current DisplayerFactory.
static PropertyKey<DockableMovingImageFactory> DOCKABLE_MOVING_IMAGE_FACTORY
          Identifier for the DockableMovingImageFactory that is used to show an image during drag and drop operations.
static PropertyKey<DockableSelection> DOCKABLE_SELECTION
          Identifier for the DockableSelection, a panel that is shown to select a Dockable using only the keyboard.
static PropertyKey<StationPaint> STATION_PAINT
          A unique identifier for the DockProperties to access the current StationPaint.
 
Method Summary
 Combiner getCombiner(DockStation station)
          Gets the Combiner for station.
 DisplayerFactory getDisplayFactory(DockStation station)
          Gets a displayer factory for station.
 DockableSelection getDockableSelection(DockController controller)
          Gets a selector for Dockables.
 DockableMovingImageFactory getMovingImageFactory(DockController controller)
          Gets a factory for images which are moved around by the user.
 StationPaint getPaint(DockStation station)
          Gets the paint which is used to draw things onto station.
 DockTitleFactory getTitleFactory(DockController controller)
          Gets the default DockTitleFactory which is used if no other factory is set.
 void install(DockController controller, DockThemeExtension[] extensions)
          Install this theme at controller.
 void uninstall(DockController controller)
          Uninstalls this theme from controller.
 

Field Detail

BACKGROUND_PAINT

static final PropertyKey<BackgroundPaint> BACKGROUND_PAINT
A unique identifier for the DockProperties to access the current BackgroundPaint.


BORDER_MODIFIER

static final PropertyKey<BorderModifier> BORDER_MODIFIER
A unique identifier for the DockProperties to access the current BorderModifier.


COMBINER

static final PropertyKey<Combiner> COMBINER
A unique identifier for the DockProperties to access the current Combiner. The default value will be derived from the current DockTheme.


STATION_PAINT

static final PropertyKey<StationPaint> STATION_PAINT
A unique identifier for the DockProperties to access the current StationPaint. The default value will be derived from the current DockTheme.


DISPLAYER_FACTORY

static final PropertyKey<DisplayerFactory> DISPLAYER_FACTORY
A unique identifier for the DockProperties to access the current DisplayerFactory. The default value will be derived from the current DockTheme.


DOCKABLE_MOVING_IMAGE_FACTORY

static final PropertyKey<DockableMovingImageFactory> DOCKABLE_MOVING_IMAGE_FACTORY
Identifier for the DockableMovingImageFactory that is used to show an image during drag and drop operations.


DOCKABLE_SELECTION

static final PropertyKey<DockableSelection> DOCKABLE_SELECTION
Identifier for the DockableSelection, a panel that is shown to select a Dockable using only the keyboard.

Method Detail

install

void install(DockController controller,
             DockThemeExtension[] extensions)
Install this theme at controller. The theme may change any properties it likes.

Parameters:
controller - the controller
extensions - a set of extensions specifically for this theme

uninstall

void uninstall(DockController controller)
Uninstalls this theme from controller. The theme has to remove all listeners it added.

Parameters:
controller - the controller

getCombiner

@FrameworkOnly
Combiner getCombiner(DockStation station)
Gets the Combiner for station.
This method should not be used directly, instead an UIValue of type StationCombinerValue should be installed at the local ThemeManager to retrieve the value.

Parameters:
station - the station whose combiner is searched
Returns:
a combiner for station

getPaint

@FrameworkOnly
StationPaint getPaint(DockStation station)
Gets the paint which is used to draw things onto station.
This method should not be used directly, instead an UIValue of type DefaultStationPaintValue should be installed at the local ThemeManager to retrieve the value.

Parameters:
station - the station to paint on
Returns:
the paint for station

getDisplayFactory

@FrameworkOnly
DisplayerFactory getDisplayFactory(DockStation station)
Gets a displayer factory for station.
This method should not be used directly, instead an UIValue of type DefaultDisplayerFactoryValue should be installed at the local ThemeManager to retrieve the value.

Parameters:
station - the station on which the created DockableDisplayer is shown
Returns:
the factory to create displayer

getTitleFactory

DockTitleFactory getTitleFactory(DockController controller)
Gets the default DockTitleFactory which is used if no other factory is set.
The result of this method is installed in the DockTitleManager using the key DockTitleManager.THEME_FACTORY_ID and priority Priority.THEME. A theme may use the manager to change the factory at any time.

Parameters:
controller - the controller using this theme
Returns:
the factory

getMovingImageFactory

@FrameworkOnly
DockableMovingImageFactory getMovingImageFactory(DockController controller)
Gets a factory for images which are moved around by the user.
This method should not be invoked directly, instead the property key DOCKABLE_MOVING_IMAGE_FACTORY should be used.

Parameters:
controller - the controller for which the factory is needed
Returns:
a factory

getDockableSelection

@FrameworkOnly
DockableSelection getDockableSelection(DockController controller)
Gets a selector for Dockables. This method should not be invoked directly, instead the property key DOCKABLE_SELECTION should be used.

Parameters:
controller - the controller for which the selector will be used
Returns:
the selector