|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.util.ResourceRequest<DockTitle> bibliothek.gui.dock.title.DockTitleRequest
public abstract class DockTitleRequest
Set of information and callback used to obtain a DockTitle
from a DockTitleFactory
.
Constructor Summary | |
---|---|
DockTitleRequest(DockStation parent,
Dockable target,
DockTitleVersion version)
Creates a new request. |
Method Summary | |
---|---|
void |
answer(DockTitle title)
Informs this request that title should be shown. |
protected void |
executeRequestList()
Asks all sources for a DockTitle , stops as soon
as one source called answer(DockTitle) . |
DockStation |
getParent()
Gets the station that will show the title. |
Dockable |
getTarget()
Gets the Dockable for which the title is requested. |
DockTitleVersion |
getVersion()
Gets the usage of the new title. |
void |
install()
Makes this request active. |
boolean |
isInstalled()
Tells whether this request is currently installed on its version . |
void |
request()
Asks for a new resource and may trigger ResourceRequest.answer(Object, Object) . |
void |
requestDockTitle(DockTitleRequest request)
May answer a request for a title. |
void |
uninstall()
Makes this request inactive, calls to ResourceRequest.answer(Object, Object) will no longer happen. |
protected void |
validate(DockTitle resource)
Called by ResourceRequest.answer(Object) , this method ensure that resource is a valid answer. |
Methods inherited from class bibliothek.gui.dock.util.ResourceRequest |
---|
answer, getAnswer, isAnswered, requestNull |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockTitleRequest(DockStation parent, Dockable target, DockTitleVersion version)
parent
- the element which will show the title, can be null
target
- the element for which the title will be shown, not null
version
- what kind of title is requested, not null
Method Detail |
---|
public void request()
ResourceRequest
ResourceRequest.answer(Object, Object)
. This method
is made protected, subclasses can expose it, or write another method requiering additional
parameters, that calls this method.
request
in class ResourceRequest<DockTitle>
public void install()
ResourceRequest.answer(Object,Object)
may
be called anytimes. Please note that installing does not automatically trigger a call
to request()
.
public void uninstall()
ResourceRequest.answer(Object, Object)
will no longer happen.
public boolean isInstalled()
version
.
true
if this request is activepublic Dockable getTarget()
Dockable
for which the title is requested.
public DockStation getParent()
null
if the title is shown outside any station.
getTarget()
or null
public DockTitleVersion getVersion()
null
protected void executeRequestList()
DockTitle
, stops as soon
as one source called answer(DockTitle)
.
executeRequestList
in class ResourceRequest<DockTitle>
public void requestDockTitle(DockTitleRequest request)
request
will be this
, but subclasses may forward the request
to other DockTitleRequest
. The default behavior of this
method is to do nothing.
request
- the request to answerpublic void answer(DockTitle title)
title
should be shown. This method
can be called more than once to show different titles.target
of this request must be the same Dockable
as DockTitle.getDockable()
.version
must match the origin
of the title.Dockable.bind(DockTitle)
-method of the target Dockable
before using the title. Note that a client must not call the
bind-method of DockTitle
Dockable.unbind(DockTitle)
-method when he no
longer needs the title. Note that the client must not call the
unbind-method of DockTitle
answer
in class ResourceRequest<DockTitle>
title
- the new title or null
to show no title at all
IllegalArgumentException
- if the title does not met the specifications described above
IllegalStateException
- if request()
is not currently executingprotected void validate(DockTitle resource)
ResourceRequest
ResourceRequest.answer(Object)
, this method ensure that resource
is a valid answer. The method
throws an IllegalArgumentException
if not.
validate
in class ResourceRequest<DockTitle>
resource
- the resource to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |