bibliothek.gui
Interface DockTheme

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

@Todo(compatibility=COMPATIBLE,
      target=VERSION_1_1_0,
      priority=MAJOR,
      description="Each property of DockTheme gets a PropertyKey: the key is associated with a factory/wrapper that just calls the DockTheme\'s methods. But clients can easily replace the factory/wrapper by their own implementation.")
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.
Warning: this interface will get a big update in version 1.1.0, backwards compatibility will be broken.

Author:
Benjamin Sigg

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.
 

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

Combiner getCombiner(DockStation station)
Gets the Combiner for station.

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

getPaint

StationPaint getPaint(DockStation station)
Gets the paint which is used to draw things onto station.

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

getDisplayFactory

DisplayerFactory getDisplayFactory(DockStation station)
Gets a displayer factory for station.

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

DockableMovingImageFactory getMovingImageFactory(DockController controller)
Gets a factory for images which are moved around by the user.

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

getDockableSelection

DockableSelection getDockableSelection(DockController controller)
Gets a selector for Dockables.

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