bibliothek.gui.dock.station.flap
Interface FlapLayoutManager

All Known Implementing Classes:
AbstractFlapLayoutManager, CFlapLayoutManager, DefaultFlapLayoutManager

public interface FlapLayoutManager

A FlapLayoutManager stores properties of FlapDockStations and can influence the behavior of a FlapDockStation.
An implementation might be interested in these methods:

Author:
Benjamin Sigg

Method Summary
 void addListener(FlapLayoutManagerListener listener)
          Adds an observer to this manager, the observer is to be informed if an important property changes.
 int getSize(FlapDockStation station, Dockable dockable)
          Called when dockable is about to open and station has to find out which size dockable should have.
 void install(FlapDockStation station)
          Called before this manager is used.
 boolean isHold(FlapDockStation station, Dockable dockable)
          Called when dockable is added to station and station does not know whether dockable should be hold open even when it is not focused.
 boolean isHoldSwitchable(FlapDockStation station, Dockable dockable)
          Tells whether the user is supposed to switch the hold property.
 void removeListener(FlapLayoutManagerListener listener)
          Removes the observer listener from this manager.
 void setHold(FlapDockStation station, Dockable dockable, boolean hold)
          Called when the user changes the hold property of dockable.
 void setSize(FlapDockStation station, Dockable dockable, int size)
          Called when the user changes the size of dockable.
 void uninstall(FlapDockStation station)
          Called when this manager is no longer used.
 

Method Detail

install

void install(FlapDockStation station)
Called before this manager is used.

Parameters:
station - the station that will use this manager

uninstall

void uninstall(FlapDockStation station)
Called when this manager is no longer used.

Parameters:
station - the station that will no longer use this manager

addListener

void addListener(FlapLayoutManagerListener listener)
Adds an observer to this manager, the observer is to be informed if an important property changes.

Parameters:
listener - the new observer, not null

removeListener

void removeListener(FlapLayoutManagerListener listener)
Removes the observer listener from this manager.

Parameters:
listener - the observer to remove

isHold

boolean isHold(FlapDockStation station,
               Dockable dockable)
Called when dockable is added to station and station does not know whether dockable should be hold open even when it is not focused.

Parameters:
station - the caller
dockable - the new element on station
Returns:
the initial value of the hold property

setHold

void setHold(FlapDockStation station,
             Dockable dockable,
             boolean hold)
Called when the user changes the hold property of dockable.

Parameters:
station - the caller
dockable - the child of station whose property has changed
hold - the new value

isHoldSwitchable

boolean isHoldSwitchable(FlapDockStation station,
                         Dockable dockable)
Tells whether the user is supposed to switch the hold property.

Parameters:
station - the caller
dockable - the child of station whose property is asked
Returns:
true if the hold property can be changed, false if the user should not be presented with a button to change the property

getSize

int getSize(FlapDockStation station,
            Dockable dockable)
Called when dockable is about to open and station has to find out which size dockable should have.

Parameters:
station - the caller
dockable - the child of station that is going to be shown.
Returns:
the size of dockable

setSize

void setSize(FlapDockStation station,
             Dockable dockable,
             int size)
Called when the user changes the size of dockable.

Parameters:
station - the caller
dockable - the element whose size has been changed
size - the new size