bibliothek.extension.gui.dock.theme
Class FlatTheme

java.lang.Object
  extended by bibliothek.gui.dock.themes.BasicTheme
      extended by bibliothek.extension.gui.dock.theme.FlatTheme
All Implemented Interfaces:
DockTheme

public class FlatTheme
extends BasicTheme

A theme that uses very few borders.

Author:
Benjamin Sigg

Field Summary
protected  DisplayerFactory splitDisplayFactory
          A special factory for the SplitDockStation
 
Constructor Summary
FlatTheme()
          Creates a new theme
 
Method Summary
protected  MiniButton<BasicButtonModel> createTitleMiniButton(BasicTrigger trigger)
          Creates a MiniButton in a flat look.
 DisplayerFactory getDisplayFactory(DockStation station)
          Gets a displayer factory for station.
 DisplayerFactory getSplitDisplayFactory()
          Gets the special factory for the SplitDockStation.
 void install(DockController controller)
          Install this theme at controller.
 void setSplitDisplayFactory(DisplayerFactory splitDisplayFactory)
          Sets the DisplayerFactory that is used for the SplitDockStation.
 void uninstall(DockController controller)
          Uninstalls this theme from controller.
protected  void updateColors(DockController[] controllers)
          Called when the the colors of the ColorManager have to be updated.
 
Methods inherited from class bibliothek.gui.dock.themes.BasicTheme
getColorScheme, getCombiner, getControllers, getDockableSelection, getMovingImageFactory, getPaint, getTitleFactory, setColorScheme, setCombiner, setDisplayerFactory, setDockableSelection, setMovingImageFactory, setPaint, setStackDockComponentFactory, setTitleFactory, updateColor, updateColorProvider, updateUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

splitDisplayFactory

protected DisplayerFactory splitDisplayFactory
A special factory for the SplitDockStation

Constructor Detail

FlatTheme

public FlatTheme()
Creates a new theme

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
Overrides:
install in class BasicTheme
Parameters:
controller - the controller

createTitleMiniButton

protected MiniButton<BasicButtonModel> createTitleMiniButton(BasicTrigger trigger)
Creates a MiniButton in a flat look.

Parameters:
trigger - the trigger to invoke when the button has been clicked
Returns:
the new button

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
Overrides:
uninstall in class BasicTheme
Parameters:
controller - the controller

updateColors

protected void updateColors(DockController[] controllers)
Description copied from class: BasicTheme
Called when the the colors of the ColorManager have to be updated. Subclasses should override this method and explicitly call updateColor and updateColorProvider for all Colors and ColorProviders that will be used by this theme. Since ColorSchemes can create new colors and providers lazily, just reading out all colors will ensure that all colors and providers exists and are registered at the ColorManagers.

Overrides:
updateColors in class BasicTheme
Parameters:
controllers - the set of controllers whose colors must be updated.

setSplitDisplayFactory

public void setSplitDisplayFactory(DisplayerFactory splitDisplayFactory)
Sets the DisplayerFactory that is used for the SplitDockStation. Normally all displayers do not have any border, but the displayers on a SplitDockStation may need a small border.

Parameters:
splitDisplayFactory - the factory

getSplitDisplayFactory

public DisplayerFactory getSplitDisplayFactory()
Gets the special factory for the SplitDockStation.

Returns:
the factory
See Also:
setSplitDisplayFactory(DisplayerFactory)

getDisplayFactory

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

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