public class StationChildHandle extends Object implements PlaceholderListItem<Dockable>
DockStations. This class
creates and handles DockableDisplayer, DockTitleRequest and DockTitles 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 dockabledisplayers - the set of available DockableDisplayersdockable - 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()
nullpublic Dockable getDockable()
nullpublic Dockable asDockable()
PlaceholderListItemDockable that is associated with this item.asDockable in interface PlaceholderListItem<Dockable>nullpublic DockTitle getTitle()
nullpublic void setTitleRequest(DockTitleVersion version)
setTitleRequest( version, true );version - the new title-version, can be nullsetTitleRequest(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 nullrequest - whether to update the current title or notpublic void requestTitle()
DockableCopyright © 2017 Docking Frames. All rights reserved.