bibliothek.gui.dock.station.support
Class PlaceholderList.Item

java.lang.Object
  extended by bibliothek.gui.dock.station.support.PlaceholderMetaMap
      extended by bibliothek.gui.dock.station.support.PlaceholderList.Item
Enclosing class:
PlaceholderList<D,S,P extends PlaceholderListItem<D>>

public class PlaceholderList.Item
extends PlaceholderMetaMap

A single item in a PlaceholderList

Author:
Benjamin Sigg

Constructor Summary
PlaceholderList.Item(P dockable)
          Creates a new item.
PlaceholderList.Item(P dockable, Set<Path> placeholderSet, PlaceholderMap placeholderMap)
          Creates a new item.
PlaceholderList.Item(Set<Path> placeholders)
          Creates a new item.
 
Method Summary
 void add(Path placeholder)
          Adds placeholder to the set of placeholders of this entry.
 P getDockable()
          Returns the value of this dockable item.
 PlaceholderMap getPlaceholderMap()
          Gets the placeholder information of a child DockStation.
 Set<Path> getPlaceholderSet()
          Returns the value of this placeholder.
 boolean hasPlaceholder(Path placeholder)
          Tells whether placeholder is known to this item or not.
 boolean hasPlaceholders()
          Tells whether this entry contains at least one placeholder
 boolean isPlaceholder()
          Tells whether this item is a pure placeholder or not.
 void remove(Path placeholder)
          Removes placeholder from this entry.
 void removeAll(Set<Path> placeholders)
          Removes all placeholders that are in placeholders.
 void setDockable(P dockable)
          Sets the value of this item.
protected  void setOwner(bibliothek.gui.dock.station.support.PlaceholderList.Entry owner)
          Sets the owner of this list.
 void setPlaceholderMap(PlaceholderMap placeholders)
          Assuming this item represents a Dockable that is a DockStation, sets the placeholder information of that DockStation.
 void setPlaceholderSet(Set<Path> placeholderSet)
          Sets the set of placeholders that are associated with this entry.
 void setStrategy(PlaceholderStrategy strategy)
          Forwards strategy to the current PlaceholderMap.
 String toString()
           
 
Methods inherited from class bibliothek.gui.dock.station.support.PlaceholderMetaMap
contains, get, getBoolean, getDouble, getInt, getLong, getString, keys, put, putBoolean, putInt, putLong, putString, putValue, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlaceholderList.Item

public PlaceholderList.Item(P dockable)
Creates a new item.

Parameters:
dockable - the value of this item, not null

PlaceholderList.Item

public PlaceholderList.Item(P dockable,
                            Set<Path> placeholderSet,
                            PlaceholderMap placeholderMap)
Creates a new item.

Parameters:
dockable - the value of this item, not null
placeholderSet - the placeholders of this item, can be null
placeholderMap - the childrens placeholder info, can be null

PlaceholderList.Item

public PlaceholderList.Item(Set<Path> placeholders)
Creates a new item.

Parameters:
placeholders - the value of this item, not null
Method Detail

setStrategy

public void setStrategy(PlaceholderStrategy strategy)
Forwards strategy to the current PlaceholderMap.

Parameters:
strategy - the new strategy, can be null

setOwner

protected void setOwner(bibliothek.gui.dock.station.support.PlaceholderList.Entry owner)
Sets the owner of this list.

Parameters:
owner - the new owner, can be null

isPlaceholder

public boolean isPlaceholder()
Tells whether this item is a pure placeholder or not.

Returns:
true if this item is only a placeholder, false if this item is a Dockable.

getPlaceholderSet

public Set<Path> getPlaceholderSet()
Returns the value of this placeholder.

Returns:
the placeholder or null if this has no a placeholders
See Also:
isPlaceholder()

setPlaceholderSet

public void setPlaceholderSet(Set<Path> placeholderSet)
Sets the set of placeholders that are associated with this entry.

Parameters:
placeholderSet - the placeholders, can be null

removeAll

public void removeAll(Set<Path> placeholders)
Removes all placeholders that are in placeholders.

Parameters:
placeholders - the paths to remove

remove

public void remove(Path placeholder)
Removes placeholder from this entry.

Parameters:
placeholder - the placeholder to remove

add

public void add(Path placeholder)
Adds placeholder to the set of placeholders of this entry.

Parameters:
placeholder - the new placeholder

hasPlaceholders

public boolean hasPlaceholders()
Tells whether this entry contains at least one placeholder

Returns:
true if there is at least one placeholder stored in this entry

hasPlaceholder

public boolean hasPlaceholder(Path placeholder)
Tells whether placeholder is known to this item or not.

Parameters:
placeholder - some placeholder to search
Returns:
true if this item stores placeholder

getDockable

public P getDockable()
Returns the value of this dockable item.

Returns:
the dockable or null if this is a placeholder
See Also:
isPlaceholder()

setDockable

public void setDockable(P dockable)
Sets the value of this item.

Parameters:
dockable - the new value, can be null

setPlaceholderMap

public void setPlaceholderMap(PlaceholderMap placeholders)
Assuming this item represents a Dockable that is a DockStation, sets the placeholder information of that DockStation.

Parameters:
placeholders - the placeholders, may be null

getPlaceholderMap

public PlaceholderMap getPlaceholderMap()
Gets the placeholder information of a child DockStation.

Returns:
the placeholder information or null

toString

public String toString()
Overrides:
toString in class Object