bibliothek.gui.dock.themes
Class NoStackTheme

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

public class NoStackTheme
extends 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

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(Class<T> theme, ResourceBundle bundle, DockUI ui)
          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(Class<T> theme,
                                                            ResourceBundle bundle,
                                                            DockUI ui)
Creates a ThemeFactory for this theme encapsulating another theme.

Type Parameters:
T - the type of the internal DockTheme
Parameters:
theme - the theme to encapsulate
bundle - the bundle to read strings for the other theme, can be null if the bundle of ui should be used.
ui - the DockUI from which values should be read, can be null if the default-DockUI should be used.
Returns:
the new 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

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

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

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.

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.

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