public class DisplayerCollection extends Object implements Iterable<DockableDisplayer>
DockableDisplayers. Clients may
fetch a new displayer at any time. They
should release a displayer which
is no longer used. The collection ensures that various properties of the
displayers are set in the proper order.| Constructor and Description |
|---|
DisplayerCollection(DockStation station,
DefaultDisplayerFactoryValue factory,
String displayerId)
Creates a new collection
|
DisplayerCollection(DockStation station,
DisplayerFactory factory,
String displayerId)
Creates a new collection
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDockableDisplayerListener(DockableDisplayerListener listener)
Adds
listener to all DockableDisplayers that are
in this collection. |
DockableDisplayer |
fetch(Dockable dockable,
DockTitle title)
Creates a new
DockableDisplayer using the factory
of this collection. |
boolean |
isDisplayerComponent(Component component)
Tells whether
component is the root component of any DockableDisplayer. |
Iterator<DockableDisplayer> |
iterator() |
void |
release(DockableDisplayer displayer)
Releases a displayer that was created by this collection.
|
void |
removeDockableDisplayerListener(DockableDisplayerListener listener)
Removes
listener from all DockableDisplayers
that are in this collection. |
void |
setController(DockController controller)
Sets the current
DockController, that controller will be made
known to all DockableDisplayer created by this collection. |
void |
setFactory(DisplayerFactory factory)
Sets the factory that will create new
DockableDisplayer when
needed. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DisplayerCollection(DockStation station, DisplayerFactory factory, String displayerId)
station - the station for which DockableDisplayer will be createdfactory - the factory that is initially used to create displayersdisplayerId - an identifier depending on station, this identifier is forwarded to
Extensions allowing them an easy solution to filter uninteresting requestspublic DisplayerCollection(DockStation station, DefaultDisplayerFactoryValue factory, String displayerId)
station - the station for which DockableDisplayers will be createdfactory - the factory that is used create displayersdisplayerId - an identifier depending on station, this identifier is forwarded to
Extensions allowing them an easy solution to filter uninteresting requestspublic void addDockableDisplayerListener(DockableDisplayerListener listener)
listener to all DockableDisplayers that are
in this collection.listener - a new listener, not nullpublic void removeDockableDisplayerListener(DockableDisplayerListener listener)
listener from all DockableDisplayers
that are in this collection.listener - the listener to removepublic boolean isDisplayerComponent(Component component)
component is the root component of any DockableDisplayer.component - the component to searchtrue if at least one DockableDisplayer.getComponent() returns componentpublic Iterator<DockableDisplayer> iterator()
iterator in interface Iterable<DockableDisplayer>public DockableDisplayer fetch(Dockable dockable, DockTitle title)
DockableDisplayer using the factory
of this collection. This method also sets the title,
station
and the controller property of
the displayer.releaseddockable - the Dockable which will be shown on the displayer.title - the title which will be shown on the displayer, might be nullpublic void release(DockableDisplayer displayer)
displayer - the displayer to releasepublic void setFactory(DisplayerFactory factory)
DockableDisplayer when
needed.factory - the new factory, not nullpublic void setController(DockController controller)
DockController, that controller will be made
known to all DockableDisplayer created by this collection.controller - the new controller, can be nullCopyright © 2017 Docking Frames. All rights reserved.