bibliothek.gui.dock.themes
Class NoStackTheme

java.lang.Object
  extended by bibliothek.gui.dock.themes.NoStackTheme
All Implemented Interfaces:
DockTheme

public class NoStackTheme
extends java.lang.Object
implements DockTheme

A DockTheme that wraps another theme and ensures that there is no StackDockStation in another StackDockStation. This theme hides some titles for the StackDockStation.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.DockTheme
BACKGROUND_PAINT, BORDER_MODIFIER, COMBINER, DISPLAYER_FACTORY, DOCKABLE_MOVING_IMAGE_FACTORY, DOCKABLE_SELECTION, STATION_PAINT
 
Constructor Summary
NoStackTheme(DockTheme base)
          Creates a new theme
 
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.
static
<T extends DockTheme>
ThemeFactory
getFactory(java.lang.Class<T> theme)
          Creates a ThemeFactory for this theme encapsulating another theme.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoStackTheme

public NoStackTheme(DockTheme base)
Creates a new theme

Parameters:
base - the wrapped theme, it is used as a delegate to get some factories.
Method Detail

getFactory

public static <T extends DockTheme> ThemeFactory getFactory(java.lang.Class<T> theme)
Creates a ThemeFactory for this theme encapsulating another theme.

Type Parameters:
T - the type of the internal DockTheme
Parameters:
theme - the theme to encapsulate
Returns:
the new factory

getCombiner

public Combiner getCombiner(DockStation station)
Description copied from interface: DockTheme
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.

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

getDisplayFactory

public DisplayerFactory getDisplayFactory(DockStation station)
Description copied from interface: DockTheme
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.

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

getPaint

public StationPaint getPaint(DockStation station)
Description copied from interface: DockTheme
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.

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

getTitleFactory

public DockTitleFactory getTitleFactory(DockController controller)
Description copied from interface: DockTheme
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.

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

getMovingImageFactory

public DockableMovingImageFactory getMovingImageFactory(DockController controller)
Description copied from interface: DockTheme
Gets a factory for images which are moved around by the user.
This method should not be invoked directly, instead the property key DockTheme.DOCKABLE_MOVING_IMAGE_FACTORY should be used.

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

getDockableSelection

public DockableSelection getDockableSelection(DockController controller)
Description copied from interface: DockTheme
Gets a selector for Dockables. This method should not be invoked directly, instead the property key DockTheme.DOCKABLE_SELECTION should be used.

Specified by:
getDockableSelection in interface DockTheme
Parameters:
controller - the controller for which the selector will be used
Returns:
the selector

install

public void install(DockController controller,
                    DockThemeExtension[] extensions)
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
extensions - a set of extensions specifically for this theme

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