bibliothek.gui.dock.station
Interface DockableDisplayer

All Known Implementing Classes:
BasicDockableDisplayer, BubbleDisplayer, EclipseBasicDockableDisplayer, EclipseDockableDisplayer, FlatDockableDisplayer, NoTitleDisplayer

public interface DockableDisplayer

A panel which shows one Dockable and one DockTitle. The location of the DockTitle is at one of the four borders (left, right, top, bottom). The title may be null, in this case only the Dockable is shown.
Clients using a displayer should try to set the controller and the station property.

Author:
Benjamin Sigg
See Also:
DisplayerCollection, DisplayerFactory

Nested Class Summary
static class DockableDisplayer.Location
          The four possible locations of the title
 
Method Summary
 void addDockableDisplayerListener(DockableDisplayerListener listener)
          Adds listener to this displayer.
 Component getComponent()
          Gets the Component which represents this displayer.
 DockController getController()
          Gets the controller for which this displayer is used.
 Dockable getDockable()
          Gets the Dockable which is shown on this displayer.
 Insets getDockableInsets()
          Gets an estimate of the insets around the Dockable of this displayer compared to the whole size of this displayer.
 DockStation getStation()
          Gets the station on which this displayer might be shown.
 DockTitle getTitle()
          Gets the title which is shown on this displayer.
 DockableDisplayer.Location getTitleLocation()
          Gets the location of the title in respect to the Dockable.
 void removeDockableDisplayerListener(DockableDisplayerListener listener)
          Removes listener from this displayer.
 void setController(DockController controller)
          Sets the controller for which this displayer is used.
 void setDockable(Dockable dockable)
          Sets the Dockable which should be shown on this displayer.
 void setStation(DockStation station)
          Sets the station on which this displayer is shown.
 void setTitle(DockTitle title)
          Sets the title of this displayer.
 void setTitleLocation(DockableDisplayer.Location location)
          Sets the location of the title in respect to the Dockable.
 boolean titleContains(int x, int y)
          Tells whether the point x/y is inside the title of this displayer or not.
 

Method Detail

setController

void setController(DockController controller)
Sets the controller for which this displayer is used. That property must be set by the client. Note that there is no guarantee, that a client sets this property.

Parameters:
controller - the controller, can be null

getController

DockController getController()
Gets the controller for which this displayer is used. Note that there is no guarantee, that this property is set.

Returns:
the controller or null

addDockableDisplayerListener

void addDockableDisplayerListener(DockableDisplayerListener listener)
Adds listener to this displayer.

Parameters:
listener - the new listener, not null

removeDockableDisplayerListener

void removeDockableDisplayerListener(DockableDisplayerListener listener)
Removes listener from this displayer.

Parameters:
listener - the listener to remove

setStation

void setStation(DockStation station)
Sets the station on which this displayer is shown. That property must be set by the station itself. Note that there is no guarantee, that a station sets this property.

Parameters:
station - the station or null

getStation

DockStation getStation()
Gets the station on which this displayer might be shown. Note that there is no guarantee, that a parent-station sets this property.

Returns:
the station or null

getDockable

Dockable getDockable()
Gets the Dockable which is shown on this displayer.

Returns:
the child, can be null

setDockable

void setDockable(Dockable dockable)
Sets the Dockable which should be shown on this displayer. A value of null means that no Dockable should be visible at all.

Parameters:
dockable - the child, can be null

getTitleLocation

DockableDisplayer.Location getTitleLocation()
Gets the location of the title in respect to the Dockable.

Returns:
the location

setTitleLocation

void setTitleLocation(DockableDisplayer.Location location)
Sets the location of the title in respect to the Dockable.

Parameters:
location - the location, a value of null is transformed into the default-value

getTitle

DockTitle getTitle()
Gets the title which is shown on this displayer.

Returns:
the title, can be null

setTitle

void setTitle(DockTitle title)
Sets the title of this displayer. If the title is set to null, no title is visible. The displayer will change the orientation of the title.

Parameters:
title - the title or null

titleContains

boolean titleContains(int x,
                      int y)
Tells whether the point x/y is inside the title of this displayer or not.

Parameters:
x - the x-coordinate, relatively to this component
y - the y-coordinate, relatively to this component
Returns:
true if the title contains the point

getDockableInsets

Insets getDockableInsets()
Gets an estimate of the insets around the Dockable of this displayer compared to the whole size of this displayer.

Returns:
the estimate of the insets

getComponent

Component getComponent()
Gets the Component which represents this displayer.

Returns:
the component