bibliothek.gui.dock.themes
Class BasicTheme

java.lang.Object
  extended by bibliothek.gui.dock.themes.BasicTheme
All Implemented Interfaces:
DockTheme
Direct Known Subclasses:
BubbleTheme, FlatTheme, SmoothTheme

public class BasicTheme
extends java.lang.Object
implements DockTheme

A theme that does not install anything and uses the default-implementations off all factories. It is possible to replace any of the factories.

Author:
Benjamin Sigg

Field Summary
private  Combiner combiner
          combines several Dockables
private  DisplayerFactory displayerFactory
          creates panels for Dockables
private  StationPaint paint
          paints on stations
private  DockTitleFactory titleFactory
          creates titles Dockables
private  MovingTitleGetter titleGetter
          selects the title which should be displayed when moving a dockable
 
Constructor Summary
BasicTheme()
          Creates a new BasicTheme.
 
Method Summary
 Combiner getCombiner(DockStation station)
          Gets the Combiner for station.
 DisplayerFactory getDisplayFactory(DockStation station)
          Gets a displayer factory for station.
 MovingTitleGetter getMovingTitleGetter(DockController controller)
          Gets a pseudo factory for titles 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.
To replace all factories, the method DockTitleManager.registerTheme(String, DockTitleFactory) should be used.
 void install(DockController controller)
          Install this theme at controller.
 void setCombiner(Combiner combiner)
          Sets the Combiner of this theme.
 void setDisplayerFactory(DisplayerFactory factory)
          Sets the DisplayerFactory of this theme.
 void setMovingTitleGetter(MovingTitleGetter titleGetter)
          Sets the titleGetter-property.
 void setPaint(StationPaint paint)
          Sets the StationPaint of this theme.
 void setTitleFactory(DockTitleFactory titleFactory)
          Sets the DockTitleFactory of this station.
 void uninstall(DockController controller)
          Uninstalls this theme from controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

combiner

private Combiner combiner
combines several Dockables


paint

private StationPaint paint
paints on stations


displayerFactory

private DisplayerFactory displayerFactory
creates panels for Dockables


titleFactory

private DockTitleFactory titleFactory
creates titles Dockables


titleGetter

private MovingTitleGetter titleGetter
selects the title which should be displayed when moving a dockable

Constructor Detail

BasicTheme

public BasicTheme()
Creates a new BasicTheme.

Method Detail

install

public void install(DockController controller)
Description copied from interface: DockTheme
Install this theme at controller. The theme may change any properties it likes.

Specified by:
install in interface DockTheme
Parameters:
controller - the controller

uninstall

public void uninstall(DockController controller)
Description copied from interface: DockTheme
Uninstalls this theme from controller. The theme has to remove all listeners it added.

Specified by:
uninstall in interface DockTheme
Parameters:
controller - the controller

setMovingTitleGetter

public void setMovingTitleGetter(MovingTitleGetter titleGetter)
Sets the titleGetter-property. The titlegetter is needed to show a title when the user grabs a Dockable

Parameters:
titleGetter - the new getter, not null

setCombiner

public void setCombiner(Combiner combiner)
Sets the Combiner of this theme. The combiner is used to merge two Dockables.

Parameters:
combiner - the combiner, not null

setPaint

public void setPaint(StationPaint paint)
Sets the StationPaint of this theme. The paint is used to draw markings on stations.

Parameters:
paint - the paint, not null

setDisplayerFactory

public void setDisplayerFactory(DisplayerFactory factory)
Sets the DisplayerFactory of this theme. The factory is needed to create DockableDisplayer.

Parameters:
factory - the factory, not null

setTitleFactory

public void setTitleFactory(DockTitleFactory titleFactory)
Sets the DockTitleFactory of this station. The factory is used to create DockTitles for some Dockables.

Parameters:
titleFactory - the factory, not null

getMovingTitleGetter

public MovingTitleGetter getMovingTitleGetter(DockController controller)
Description copied from interface: DockTheme
Gets a pseudo factory for titles which are moved around by the user.

Specified by:
getMovingTitleGetter in interface DockTheme
Parameters:
controller - the controller for which the factory is needed
Returns:
a pseudo factory

getCombiner

public Combiner getCombiner(DockStation station)
Description copied from interface: DockTheme
Gets the Combiner for station.

Specified by:
getCombiner in interface DockTheme
Parameters:
station - the station whose combiner is searched
Returns:
a combiner for station

getPaint

public StationPaint getPaint(DockStation station)
Description copied from interface: DockTheme
Gets the paint which is used to draw things onto station.

Specified by:
getPaint in interface DockTheme
Parameters:
station - the station to paint on
Returns:
the paint for station

getDisplayFactory

public DisplayerFactory getDisplayFactory(DockStation station)
Description copied from interface: DockTheme
Gets a displayer factory for station.

Specified by:
getDisplayFactory in interface DockTheme
Parameters:
station - the station on which the created DockableDisplayer is shown
Returns:
the factory to create displayer

getTitleFactory

public DockTitleFactory getTitleFactory(DockController controller)
Description copied from interface: DockTheme
Gets the default DockTitleFactory which is used if no other factory is set.
To replace all factories, the method DockTitleManager.registerTheme(String, DockTitleFactory) should be used.

Specified by:
getTitleFactory in interface DockTheme
Parameters:
controller - the controller using this theme
Returns:
the factory