|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.event.DockAdapter
bibliothek.gui.dock.station.split.FullScreenClickableListener
public class FullScreenClickableListener
A listener which is added to a SplitDockStation
. The listener
observes all children and adds to each DockTitle
or Dockable
a FullScreenClickableListener.FullScreenListener
. The listener is removed when a Dockable
is removed from this station.
Nested Class Summary | |
---|---|
protected class |
FullScreenClickableListener.FullScreenListener
A listener which waits for a double-click-event to change the fullscreen-mode of a Dockable . |
Field Summary | |
---|---|
private java.util.Map<Dockable,FullScreenClickableListener.FullScreenListener> |
dockableListeners
A map that tells which listener was added to which Dockable |
private java.util.Set<DockStation> |
knownStations
A set that tells to which station this listener is added |
private SplitDockStation |
station
The station which is observed by this listener |
private java.util.Map<DockTitle,FullScreenClickableListener.FullScreenListener> |
titleListeners
A map that tells which listener was added to which DockTitle |
Constructor Summary | |
---|---|
FullScreenClickableListener(SplitDockStation station)
Constructs a new listener. |
Method Summary | |
---|---|
private void |
add(Dockable dockable)
Adds a listener to dockable which might change the
fullscreen-mode of dockable or one of its parents. |
private void |
collect(Dockable dockable)
Adds to dockable (if shouldCollect(Dockable) returns true )
and to all its children a listener. |
private void |
collect(DockStation station)
Adds to all children of station a listener. |
void |
destroy()
Deconstructor of this listener, removes all listeners from any known observed object. |
void |
dockableAdded(DockStation station,
Dockable dockable)
Invoked after dockable has been added to station . |
void |
dockableRemoved(DockStation station,
Dockable dockable)
Invoked after dockable has been removed from
station . |
SplitDockStation |
getStation()
Gets the station which is observed by this listener. |
private void |
remove(Dockable dockable)
Removes the listener which was added earlier to dockable . |
protected boolean |
shouldCollect(Dockable dockable)
Determines whether dockable should be observed or not. |
protected boolean |
shouldCollect(Dockable dockable,
DockTitle title)
Determines whether title should be observed or not. |
void |
titleBinded(DockController controller,
DockTitle title,
Dockable dockable)
Called when title was binded
to dockable . |
void |
titleUnbinded(DockController controller,
DockTitle title,
Dockable dockable)
Called when title was unbinded
from dockable . |
private void |
uncollect(Dockable dockable)
Removes any listener that was added to dockable . |
private void |
uncollect(DockStation station)
Removes all listener from station and its
children. |
protected Dockable |
unwrap(Dockable dockable)
Searches a parent of dockable which has the
station as its direct parent. |
Methods inherited from class bibliothek.gui.dock.event.DockAdapter |
---|
dockableAdding, dockableDrag, dockableFocused, dockablePut, dockableRegistered, dockableRegistering, dockableRemoving, dockableUnregistered, dockableVisibiltySet, dockStationRegistered, dockStationRegistering, dockStationUnregistered, titleBinded, titleIconChanged, titleTextChanged, titleUnbinded |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private SplitDockStation station
private java.util.Map<Dockable,FullScreenClickableListener.FullScreenListener> dockableListeners
Dockable
private java.util.Map<DockTitle,FullScreenClickableListener.FullScreenListener> titleListeners
DockTitle
private java.util.Set<DockStation> knownStations
Constructor Detail |
---|
public FullScreenClickableListener(SplitDockStation station)
station
- the station which should be observedMethod Detail |
---|
public SplitDockStation getStation()
private void collect(Dockable dockable)
dockable
(if shouldCollect(Dockable)
returns true
)
and to all its children a listener.
dockable
- the Dockable
which will be observedprivate void collect(DockStation station)
station
a listener.
station
- the station which will be observedprivate void uncollect(Dockable dockable)
dockable
.
dockable
- the Dockable
which will no longer be
observedprivate void uncollect(DockStation station)
station
and its
children.
station
- the station which will no longer be
observedprivate void add(Dockable dockable)
dockable
which might change the
fullscreen-mode of dockable
or one of its parents.
dockable
- the Dockable
which will be observedprivate void remove(Dockable dockable)
dockable
.
dockable
- the Dockable
which will no longer be observedpublic void dockableAdded(DockStation station, Dockable dockable)
DockStationListener
dockable
has been added to station
.
dockableAdded
in interface DockStationListener
dockableAdded
in class DockAdapter
station
- the station where the new child was addeddockable
- the new childpublic void dockableRemoved(DockStation station, Dockable dockable)
DockStationListener
dockable
has been removed from
station
.
dockableRemoved
in interface DockStationListener
dockableRemoved
in class DockAdapter
station
- the station where the old child was removeddockable
- the old childpublic void titleBinded(DockController controller, DockTitle title, Dockable dockable)
DockControllerListener
title
was binded
to dockable
.
This method is called after the DockTitle.bind()
-method
was invoked.
titleBinded
in interface DockControllerListener
titleBinded
in class DockAdapter
controller
- the origin of the eventtitle
- the DockTitle
that was bindeddockable
- the owner of title
public void titleUnbinded(DockController controller, DockTitle title, Dockable dockable)
DockControllerListener
title
was unbinded
from dockable
.
This method is called after the DockTitle.bind()
-method
was invoked.
titleUnbinded
in interface DockControllerListener
titleUnbinded
in class DockAdapter
controller
- the origin of the eventtitle
- the DockTitle
which was unbindeddockable
- the old owner of title
protected Dockable unwrap(Dockable dockable)
dockable
which has the
station
as its direct parent.
dockable
- the root of the search
dockable
, a parent of dockable
or null
protected boolean shouldCollect(Dockable dockable)
dockable
should be observed or not.
dockable
- the dockable
which will be checked
true
if dockable
should have a listener,
false
otherwiseprotected boolean shouldCollect(Dockable dockable, DockTitle title)
title
should be observed or not.
dockable
- the owner of title
title
- the title which will be checked
true
if title
has to be observed,
false
otherwisepublic void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |