|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object 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 abstract void |
answer(DockTitle previous,
DockTitle title)
Called whenever a new title should be shown. |
protected void |
executeRequestList()
Asks all sources for a DockTitle , stops as soon
as one source called answer(DockTitle) . |
DockTitle |
getAnswer()
Gets the last answer made to this request. |
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. |
protected boolean |
isAnswered()
Tells whether answer(DockTitle) was called since the last request() . |
boolean |
isInstalled()
Tells whether this request is currently installed on its version . |
void |
request()
Asks for a new title and may trigger answer(DockTitle, DockTitle) . |
void |
requestDockTitle(DockTitleRequest request)
May answer a request for a title. |
void |
requestNull()
Asks this request to simulate a call to request() which is
answered with null |
void |
uninstall()
Makes this request inactive, calls to answer(DockTitle, DockTitle) will no longer happen. |
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 install()
answer(DockTitle, DockTitle)
may
be called anytimes. Please note that installing does not automatically trigger a call
to request()
.
public void uninstall()
answer(DockTitle, DockTitle)
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 abstract void answer(DockTitle previous, DockTitle title)
previous
- the title that was used previously, can be null
title
- the new title, may be null
public void request()
answer(DockTitle, DockTitle)
.
This method may be called from anyone, not just the owner of this request.
protected boolean isAnswered()
answer(DockTitle)
was called since the last request()
.
true
if there is an answerprotected void executeRequestList()
DockTitle
, stops as soon
as one source called answer(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 requestNull()
request()
which is
answered with null
public 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
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 executingpublic DockTitle getAnswer()
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |