bibliothek.gui.dock.station.support
Interface PlaceholderStrategy

All Known Implementing Classes:
CPlaceholderStrategy, RootPlaceholderStrategy

public interface PlaceholderStrategy

This strategy tells which Dockables can leave a placeholder on a DockStation.

Author:
Benjamin Sigg

Field Summary
static PropertyKey<PlaceholderStrategy> PLACEHOLDER_STRATEGY
          Defines for which Dockables which Path is used as placeholder, or which placeholders are no longer valid and to be removed.
 
Method Summary
 void addListener(PlaceholderStrategyListener listener)
          Adds a listener to this strategy.
 Path getPlaceholderFor(Dockable dockable)
          Gets the placeholder which represents dockable.
 void install(DockStation station)
          Informs this strategy that it will from no one be used by station.
 boolean isValidPlaceholder(Path placeholder)
          Tells whether placeholder is associated with any Dockable.
 void removeListener(PlaceholderStrategyListener listener)
          Removes a listener from this strategy.
 void uninstall(DockStation station)
          Informs this strategy that it will no longer be used for station.
 

Field Detail

PLACEHOLDER_STRATEGY

static final PropertyKey<PlaceholderStrategy> PLACEHOLDER_STRATEGY
Defines for which Dockables which Path is used as placeholder, or which placeholders are no longer valid and to be removed.

Method Detail

install

void install(DockStation station)
Informs this strategy that it will from no one be used by station.

Parameters:
station - the station which uses this strategy

uninstall

void uninstall(DockStation station)
Informs this strategy that it will no longer be used for station.

Parameters:
station - the station that is removed

addListener

void addListener(PlaceholderStrategyListener listener)
Adds a listener to this strategy.

Parameters:
listener - the new listener, not null

removeListener

void removeListener(PlaceholderStrategyListener listener)
Removes a listener from this strategy.

Parameters:
listener - the listener to remove

getPlaceholderFor

Path getPlaceholderFor(Dockable dockable)
Gets the placeholder which represents dockable.

Parameters:
dockable - some child of station
Returns:
the placeholder id or null

isValidPlaceholder

boolean isValidPlaceholder(Path placeholder)
Tells whether placeholder is associated with any Dockable.

Parameters:
placeholder - the placeholder in question
Returns:
true if placeholder is still in use