public abstract class DisplayerRequest extends ResourceRequest<DockableDisplayer>
DisplayerRequest is an object that can create new DockableDisplayers by
calling several factories.| Constructor and Description |
|---|
DisplayerRequest(DockStation parent,
Dockable target,
DisplayerFactory defaultFactory,
String displayerId)
Creates a new request.
|
| Modifier and Type | Method and Description |
|---|---|
void |
answer(DockableDisplayer displayer)
Sets the
DockableDisplayer which should be shown. |
protected void |
executeRequestList()
Asks all sources for a new resource, needs to stop as soon
as one source called
ResourceRequest.answer(Object) (this can be queried
with ResourceRequest.isAnswered()). |
DockController |
getController()
Gets the controller in whose realm this request is issued.
|
DockStation |
getParent()
Gets the
DockStation which is going to show the DockableDisplayer. |
Dockable |
getTarget()
Gets the
Dockable which is going to be shown in the DockableDisplayer. |
DockTitle |
getTitle()
Gets the title that should be shown on the displayer.
|
void |
request(DockTitle title)
Creates a new
DockableDisplayer. |
void |
setController(DockController controller)
Sets the
DockController in whose realm this DisplayerRequest is used. |
protected void |
validate(DockableDisplayer resource)
Called by
ResourceRequest.answer(Object), this method ensure that resource is a valid answer. |
answer, getAnswer, isAnswered, request, requestNullpublic DisplayerRequest(DockStation parent, Dockable target, DisplayerFactory defaultFactory, String displayerId)
parent - the station which is going to show the DockableDisplayer.target - the element which is going to be shown in the displayerdefaultFactory - the default factory, to be used if no other way was found to create the DockableDisplayerdisplayerId - a unique identifier that depends on the type of parent, this identifier will be forwarded to
Extensions allowing them an easy way to filter uninteresting DisplayerRequests, must not be nullpublic void setController(DockController controller)
DockController in whose realm this DisplayerRequest is used. The DockController can
be used to load extensions.controller - the controller, can be nullpublic DockController getController()
nullpublic void request(DockTitle title)
DockableDisplayer.title - the title that should be shown on the displayer, may be nullpublic Dockable getTarget()
Dockable which is going to be shown in the DockableDisplayer.nullpublic DockStation getParent()
DockStation which is going to show the DockableDisplayer.nullpublic DockTitle getTitle()
nullpublic void answer(DockableDisplayer displayer)
DockableDisplayer which should be shown. A valid displayer must meet the following
conditions:
nullDockableDisplayer.getDockable() must be getTarget()answer in class ResourceRequest<DockableDisplayer>displayer - the new resource or nullIllegalStateException - if ResourceRequest.request() was not calledIllegalArgumentException - if displayer is nullprotected void executeRequestList()
ResourceRequestResourceRequest.answer(Object) (this can be queried
with ResourceRequest.isAnswered()).executeRequestList in class ResourceRequest<DockableDisplayer>protected void validate(DockableDisplayer resource)
ResourceRequestResourceRequest.answer(Object), this method ensure that resource is a valid answer. The method
throws an IllegalArgumentException if not.validate in class ResourceRequest<DockableDisplayer>resource - the resource to checkCopyright © 2017 Docking Frames. All rights reserved.