Class MultipleCDockablePerspective
java.lang.Object
bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
bibliothek.gui.dock.common.perspective.MultipleCDockablePerspective
- All Implemented Interfaces:
CDockablePerspective,CElementPerspective
Representation of a
MultipleCDockable in a perspective.- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe default representation for aMultipleCDockablePerspective. -
Constructor Summary
ConstructorsConstructorDescriptionMultipleCDockablePerspective(String factoryId, MultipleCDockableLayout layout) Creates a new representation.MultipleCDockablePerspective(String factoryId, String uniqueId, MultipleCDockableLayout layout) Creates a new representation. -
Method Summary
Modifier and TypeMethodDescriptionGetsthisas dockable, if this is a dockable.Getsthisas station, if this is a station.protected CommonElementPerspectivecreate()Called the first timeintern()is called, creates the internal representation of this dockable.Gets the unique identifier of the factory that handles this kind of dockable.Gets the layout which describes the content of this dockable.Gets the unique identifier of this element.intern()Gets the internal representation for this element.
IfCElementPerspective.asDockable()returns a non-nullvalue, thenintern().asDockable()must not returnnulleither.
IfCElementPerspective.asStation()returns a non-nullvalue, thenintern().asStation()must not returnnulleither.voidsetLayout(MultipleCDockableLayout layout) Sets the layout which describes this dockable.voidsetUniqueId(String uniqueId) Sets the unique identifier of this element.Methods inherited from class bibliothek.gui.dock.common.perspective.AbstractCDockablePerspective
getLocationHistory, getParent, getWorkingArea, remove, setWorkingArea
-
Constructor Details
-
MultipleCDockablePerspective
Creates a new representation. The identifier of the factory must match an identifier of aMultipleCDockableFactorythat is registered at aCControlthrough the methodCControl.addMultipleDockableFactory(String, MultipleCDockableFactory).- Parameters:
factoryId- the unique identifier of aMultipleCDockableFactory, notnulllayout- description of the content of this dockable, will be given to theMultipleCDockableFactorythat is accessed throughfactoryId
-
MultipleCDockablePerspective
public MultipleCDockablePerspective(String factoryId, String uniqueId, MultipleCDockableLayout layout) Creates a new representation. The identifier of the factory must match an identifier of aMultipleCDockableFactorythat is registered at aCControlthrough the methodCControl.addMultipleDockableFactory(String, MultipleCDockableFactory).- Parameters:
factoryId- the unique identifier of aMultipleCDockableFactory, notnulluniqueId- a unique identifier for this dockable, can benulllayout- description of the content of this dockable, will be given to theMultipleCDockableFactorythat is accessed throughfactoryId
-
-
Method Details
-
setUniqueId
Sets the unique identifier of this element. The identifier can be used to replace an existingMultipleCDockablewith the dockable that is represented by this. If no identifier is set, then a random identifier will be set when theCPerspectiveis applied.- Parameters:
uniqueId- the unique id ornull
-
getUniqueId
Gets the unique identifier of this element.- Returns:
- the unique identifier, can be
null
-
create
Called the first timeintern()is called, creates the internal representation of this dockable.- Returns:
- the internal representation, not
null
-
intern
Description copied from interface:CElementPerspectiveGets the internal representation for this element.
IfCElementPerspective.asDockable()returns a non-nullvalue, thenintern().asDockable()must not returnnulleither.
IfCElementPerspective.asStation()returns a non-nullvalue, thenintern().asStation()must not returnnulleither.- Returns:
- the internal representation
-
setLayout
Sets the layout which describes this dockable.- Parameters:
layout- the layout, notnull
-
getLayout
Gets the layout which describes the content of this dockable.- Returns:
- the layout, not
null
-
asDockable
Description copied from interface:CElementPerspectiveGetsthisas dockable, if this is a dockable.- Returns:
thisornull
-
asStation
Description copied from interface:CElementPerspectiveGetsthisas station, if this is a station.- Returns:
thisornull
-
getFactoryID
Gets the unique identifier of the factory that handles this kind of dockable.- Returns:
- the factory, not
null
-