bibliothek.gui.dock.themes.basic
Class BasicDisplayerFactory

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.BasicDisplayerFactory
All Implemented Interfaces:
DisplayerFactory

public class BasicDisplayerFactory
extends Object
implements DisplayerFactory

A DisplayerFactory that creates DockableDisplayer with no special settings.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.DisplayerFactory
DISPLAYER_EXTENSION, DISPLAYER_EXTENSION_ID
 
Constructor Summary
BasicDisplayerFactory()
           
 
Method Summary
protected  BasicDockableDisplayer create(DockStation station, Dockable dockable, DockTitle title, DockableDisplayer.Location location)
          Creates a new displayer.
 DockableDisplayer.Location getDockableLocation()
          Gets the location where the DockTitle will be shown on the DockableDisplayer, if a Dockable is used as child.
 DockableDisplayer.Location getStationLocation()
          Gets the location where the DockTitle will be shown on the DockableDisplayer, if a DockStation is used as child.
 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).
 void setDockableLocation(DockableDisplayer.Location dockableLocation)
          Sets the location where the DockTitle will be shown on a DockableDisplayer if a Dockable is used as child.
 void setStationLocation(DockableDisplayer.Location stationLocation)
          Sets the location where the DockTitle will be shown on a DockableDisplayer if a DockStation is used as child.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDisplayerFactory

public BasicDisplayerFactory()
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 BasicDockableDisplayer create(DockStation station,
                                        Dockable dockable,
                                        DockTitle title,
                                        DockableDisplayer.Location location)
Creates a new displayer.

Parameters:
station - the station for which this displayer is needed
dockable - the element that is shown on the displayer
title - the title of the displayer
location - the location of title
Returns:
the new displayer

getDockableLocation

public DockableDisplayer.Location getDockableLocation()
Gets the location where the DockTitle will be shown on the DockableDisplayer, if a Dockable is used as child.

Returns:
the location
See Also:
setDockableLocation(bibliothek.gui.dock.station.DockableDisplayer.Location)

setDockableLocation

public void setDockableLocation(DockableDisplayer.Location dockableLocation)
Sets the location where the DockTitle will be shown on a DockableDisplayer if a Dockable is used as child.

Parameters:
dockableLocation - the location

getStationLocation

public DockableDisplayer.Location getStationLocation()
Gets the location where the DockTitle will be shown on the DockableDisplayer, if a DockStation is used as child.

Returns:
the location
See Also:
setDockableLocation(bibliothek.gui.dock.station.DockableDisplayer.Location)

setStationLocation

public void setStationLocation(DockableDisplayer.Location stationLocation)
Sets the location where the DockTitle will be shown on a DockableDisplayer if a DockStation is used as child.

Parameters:
stationLocation - the location