bibliothek.extension.gui.dock.theme.eclipse.displayer
Class EclipseDisplayerFactory

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.displayer.EclipseDisplayerFactory
All Implemented Interfaces:
DisplayerFactory

public class EclipseDisplayerFactory
extends Object
implements DisplayerFactory

This factory makes use of a EclipseThemeConnector to decide which kind of DockableDisplayer to create. To be more exact: the displayer depends on the EclipseThemeConnector.TitleBar-value returned by EclipseThemeConnector.getTitleBarKind(DockStation, Dockable).

Author:
Janni Kovacs

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.DisplayerFactory
DISPLAYER_EXTENSION, DISPLAYER_EXTENSION_ID
 
Constructor Summary
EclipseDisplayerFactory(EclipseTheme theme)
          Creates a new displayer factory.
 
Method Summary
protected  DockableDisplayer create(DockStation station, Dockable dockable, DockTitle title)
          Creates a new DockableDisplayer for dockable.
protected  BasicDockableDisplayer create(DockStation station, Dockable dockable, DockTitle title, boolean border, EclipseThemeConnector.TitleBar bar)
          Creates a new displayer.
 void request(DisplayerRequest request)
          Creates a new DockableDisplayer, this method needs to call DisplayerRequest.answer(DockableDisplayer) once the new displayer is created.
The new displayer will be shown on DisplayerRequest.getParent(), its content must be DisplayerRequest.getTarget() and DisplayerRequest.getTitle().
If this factory does not want to provide a DockableDisplayer for the given request, it can just return and not call DisplayerRequest.answer(DockableDisplayer).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseDisplayerFactory

public EclipseDisplayerFactory(EclipseTheme theme)
Creates a new displayer factory.

Parameters:
theme - the owner of this factory, not null
Method Detail

request

public void request(DisplayerRequest request)
Description copied from interface: DisplayerFactory
Creates a new DockableDisplayer, this method needs to call DisplayerRequest.answer(DockableDisplayer) once the new displayer is created.
The new displayer will be shown on DisplayerRequest.getParent(), its content must be DisplayerRequest.getTarget() and DisplayerRequest.getTitle().
If this factory does not want to provide a DockableDisplayer for the given request, it can just return and not call DisplayerRequest.answer(DockableDisplayer).

Specified by:
request in interface DisplayerFactory
Parameters:
request - detailed information about who is going to show the displayer, and callback to set the new displayer

create

protected DockableDisplayer create(DockStation station,
                                   Dockable dockable,
                                   DockTitle title)
Creates a new DockableDisplayer for dockable.

Parameters:
station - the station which will show the displayer
dockable - the element which will be shown in the displayer
title - the title of dockable
Returns:
the new displayer or null

create

protected BasicDockableDisplayer create(DockStation station,
                                        Dockable dockable,
                                        DockTitle title,
                                        boolean border,
                                        EclipseThemeConnector.TitleBar bar)
Creates a new displayer.

Parameters:
station - the parent of the displayer
dockable - the content, may be null
title - the title to show, may be null
border - whether to show a border
bar - what kind of titlebar the displayer should use
Returns:
the new displayer