public class StationChildHandle extends Object implements PlaceholderListItem<Dockable>
DockStation
s. This class
creates and handles DockableDisplayer
, DockTitleRequest
and DockTitle
s for
a Dockable
on a specific DockStation
.Constructor and Description |
---|
StationChildHandle(DockStation station,
DisplayerCollection displayers,
Dockable dockable,
DockTitleVersion title)
|
Modifier and Type | Method and Description |
---|---|
Dockable |
asDockable()
Gets the
Dockable that is associated with this item. |
void |
destroy()
Deletes all resources that were acquired by this handler.
|
DockableDisplayer |
getDisplayer()
Gest the current displayer for this handle.
|
Dockable |
getDockable()
Gets the element that is handled by this handler.
|
DockTitle |
getTitle()
Gets the title which is currently displayed.
|
void |
requestTitle()
Requests a new title for this
Dockable |
void |
setTitleRequest(DockTitleVersion version)
The same as
setTitleRequest( version, true ); |
void |
setTitleRequest(DockTitleVersion version,
boolean request)
Updates the
DockTitleRequest associated with this Dockable . |
void |
updateDisplayer()
Discards the current
DockableDisplayer and creates a new one using the same
DockTitle as was used for the old one. |
protected void |
updateTitle(DockTitle title)
Called if the current
DockTitle needs to be exchanged. |
public StationChildHandle(DockStation station, DisplayerCollection displayers, Dockable dockable, DockTitleVersion title)
DockTitleRequest
but no DockableDisplayer
nor a DockTitle
. This
constructor also adds a DockableListener
to dockable
to update the title whenever dockable
requests it.updateDisplayer()
to initialize the remaining fields of this handler.station
- the owner of this handle, the parent of dockable
displayers
- the set of available DockableDisplayer
sdockable
- the element that will be managed by this handletitle
- what kind of title is requestedpublic void destroy()
DockableDisplayer
, the current DockTitle
and the current DockTitleRequest
.public void updateDisplayer()
DockableDisplayer
and creates a new one using the same
DockTitle
as was used for the old one. If there is currently no DockableDisplayer
in use, then a new DockTitle
is created.public DockableDisplayer getDisplayer()
null
public Dockable getDockable()
null
public Dockable asDockable()
PlaceholderListItem
Dockable
that is associated with this item.asDockable
in interface PlaceholderListItem<Dockable>
null
public DockTitle getTitle()
null
public void setTitleRequest(DockTitleVersion version)
setTitleRequest( version, true );
version
- the new title-version, can be null
setTitleRequest(DockTitleVersion, boolean)
public void setTitleRequest(DockTitleVersion version, boolean request)
DockTitleRequest
associated with this Dockable
. The old
title (if there is any) is discarded. If request
is true
, then
a new title is requested. Otherwise a new DockTitleRequest
is installed but
not triggered.version
- the new title-version, can be null
request
- whether to update the current title or notpublic void requestTitle()
Dockable