bibliothek.gui.dock.common.perspective
Class SingleCDockablePerspective

java.lang.Object
  extended by bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
      extended by bibliothek.gui.dock.common.perspective.SingleCDockablePerspective
All Implemented Interfaces:
CDockablePerspective, CElementPerspective
Direct Known Subclasses:
CGridPerspective

public class SingleCDockablePerspective
extends AbstractCDockablePerspective

A class that represents a SingleCDockable.

Author:
Benjamin Sigg

Nested Class Summary
protected  class SingleCDockablePerspective.Intern
          The type of object that is created by the default implementation of create()
 
Constructor Summary
SingleCDockablePerspective(String uniqueId)
          Creates a new representation of a SingleCDockable.
 
Method Summary
 CDockablePerspective asDockable()
          Gets this as dockable, if this is a dockable.
 CStationPerspective asStation()
          Gets this as station, if this is a station.
protected  CommonElementPerspective create()
          Called the first time intern() is called, this method creates the intern representation of this SingleCDockablePerspective.
 String getUniqueId()
          Gets the unique identifier that is associated with this element.
 CommonElementPerspective intern()
          Gets the internal representation for this element.
If CElementPerspective.asDockable() returns a non-null value, then intern().asDockable() must not return null either.
If CElementPerspective.asStation() returns a non-null value, then intern().asStation() must not return null either.
 
Methods inherited from class bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
getLocationHistory, getParent, getWorkingArea, remove, setWorkingArea
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleCDockablePerspective

public SingleCDockablePerspective(String uniqueId)
Creates a new representation of a SingleCDockable.

Parameters:
uniqueId - the unique identifier of this dockable, not null
Method Detail

create

protected CommonElementPerspective create()
Called the first time intern() is called, this method creates the intern representation of this SingleCDockablePerspective.

Returns:
the internal representation of this

intern

public CommonElementPerspective intern()
Description copied from interface: CElementPerspective
Gets the internal representation for this element.
If CElementPerspective.asDockable() returns a non-null value, then intern().asDockable() must not return null either.
If CElementPerspective.asStation() returns a non-null value, then intern().asStation() must not return null either.

Returns:
the internal representation

getUniqueId

public String getUniqueId()
Gets the unique identifier that is associated with this element.

Returns:
the unique identifier

asDockable

public CDockablePerspective asDockable()
Description copied from interface: CElementPerspective
Gets this as dockable, if this is a dockable.

Returns:
this or null

asStation

public CStationPerspective asStation()
Description copied from interface: CElementPerspective
Gets this as station, if this is a station.

Returns:
this or null