public class VetoManager extends Object
DockFrontend to correctly handle all VetoableDockFrontendEvents.| Constructor and Description |
|---|
VetoManager(DockFrontend frontend) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVetoableListener(VetoableDockFrontendListener listener)
Adds
listener to this frontend. |
boolean |
expectToHide(Collection<Dockable> dockables,
boolean cancelable)
Marks all elements of
dockables to be expected to hide soon. |
boolean |
expectToHide(Dockable dockable,
boolean cancelable)
Marks all elements of the tree with root
dockable to be expected to hide soon. |
boolean |
expectToShow(Collection<Dockable> dockables,
boolean cancelable)
Marks all elements of
dockables to be expected to show soon. |
boolean |
expectToShow(Dockable dockable,
boolean cancelable)
Marks all elements of the tree with root
dockable to be expected to show soon. |
protected void |
fireAllHidden(Collection<Dockable> dockables,
boolean expected)
Invokes the method
VetoableDockFrontendListener.hidden(VetoableDockFrontendEvent)
for all listeners for all elements in dockables. |
protected void |
fireAllHidden(Dockable dockable,
boolean expected)
Invokes the method
VetoableDockFrontendListener.hidden(VetoableDockFrontendEvent)
for all listeners for all elements of the tree with root dockable. |
protected boolean |
fireAllHiding(Collection<Dockable> dockables,
boolean cancelable)
Calls the method
VetoableDockFrontendListener.hiding(VetoableDockFrontendEvent)
for all elements in dockables |
protected boolean |
fireAllHiding(Dockable dockable,
boolean cancelable)
Calls the method
VetoableDockFrontendListener.hiding(VetoableDockFrontendEvent)
for all elements in the tree beginning with dockable. |
protected boolean |
fireAllShowing(Collection<Dockable> dockables,
boolean cancelable)
Calls
VetoableDockFrontendListener.showing(VetoableDockFrontendEvent)
for all elements in dockables. |
protected boolean |
fireAllShowing(Dockable dockable,
boolean cancelable)
Calls
VetoableDockFrontendListener.showing(VetoableDockFrontendEvent)
for all elements in the tree with root dockable. |
protected void |
fireAllShown(Collection<Dockable> dockables,
boolean expected)
Invokes the method
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
for all elements in dockables. |
protected void |
fireAllShown(Dockable dockable,
boolean expected)
Invokes the method
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
for all elements in the tree with root dockable. |
protected void |
fireHidden(Dockable dockable,
boolean expected)
Invokes the method
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
on all listeners. |
protected void |
fireShown(Dockable dockable,
boolean expected)
Invokes the method
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
on all listeners. |
DockFrontend |
getFrontend()
Gets the owner of this manager.
|
void |
removeVetoableListener(VetoableDockFrontendListener listener)
Removes
listener from this frontend. |
protected VetoableDockFrontendListener[] |
vetoableListeners()
Gets an independent array containing all currently registered
VetoableDockFrontendListeners. |
public VetoManager(DockFrontend frontend)
public DockFrontend getFrontend()
public boolean expectToHide(Dockable dockable, boolean cancelable)
dockable to be expected to hide soon.dockable - the root of the elements which will be hiddencancelable - whether the operation can be abortedtrue if the operation completed successful, false
if the operation was abortedpublic boolean expectToHide(Collection<Dockable> dockables, boolean cancelable)
dockables to be expected to hide soon.dockables - the elements which will be hiddencancelable - whether the operation can be abortedtrue if the operation completed successful, false
if the operation was abortedpublic boolean expectToShow(Dockable dockable, boolean cancelable)
dockable to be expected to show soon.dockable - the root of the elementscancelable - whether the operation can be abortedtrue if the operation completed successful, false
if the operation was abortedpublic boolean expectToShow(Collection<Dockable> dockables, boolean cancelable)
dockables to be expected to show soon.dockables - the elements which will be showncancelable - whether the operation can be abortedtrue if the operation completed successful, false
if the operation was abortedpublic void addVetoableListener(VetoableDockFrontendListener listener)
listener to this frontend. The listener will be notified
when a Dockable will be or is closed.listener - the new listenerpublic void removeVetoableListener(VetoableDockFrontendListener listener)
listener from this frontend.listener - the listener to removeprotected VetoableDockFrontendListener[] vetoableListeners()
VetoableDockFrontendListeners.protected boolean fireAllHiding(Dockable dockable, boolean cancelable)
VetoableDockFrontendListener.hiding(VetoableDockFrontendEvent)
for all elements in the tree beginning with dockable.dockable - the root of the tree of elements to removecancelable - whether the operation can be abortedtrue if the operation was aborted, false
if not.protected boolean fireAllHiding(Collection<Dockable> dockables, boolean cancelable)
VetoableDockFrontendListener.hiding(VetoableDockFrontendEvent)
for all elements in dockablesdockables - a list of element which will be closedcancelable - whether the operation can be abortedtrue if the operation was aborted, false
if not.protected void fireAllHidden(Collection<Dockable> dockables, boolean expected)
VetoableDockFrontendListener.hidden(VetoableDockFrontendEvent)
for all listeners for all elements in dockables.dockables - the elements that were hiddenexpected - whether this event was expected or unexpectedprotected void fireHidden(Dockable dockable, boolean expected)
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
on all listeners.dockable - the element that was shownexpected - whether the event was expected or notprotected void fireAllHidden(Dockable dockable, boolean expected)
VetoableDockFrontendListener.hidden(VetoableDockFrontendEvent)
for all listeners for all elements of the tree with root dockable.dockable - the element that was hiddenexpected - whether this event was expected or unexpectedprotected boolean fireAllShowing(Dockable dockable, boolean cancelable)
VetoableDockFrontendListener.showing(VetoableDockFrontendEvent)
for all elements in the tree with root dockable.dockable - the root of the tree that will become visiblecancelable - whether the operation can be canceledtrue if the operation was aborted, false
if the operation can continueprotected boolean fireAllShowing(Collection<Dockable> dockables, boolean cancelable)
VetoableDockFrontendListener.showing(VetoableDockFrontendEvent)
for all elements in dockables.dockables - the element to showcancelable - whether the operation can be canceledtrue if the operation was aborted, false
if the operation can continueprotected void fireAllShown(Dockable dockable, boolean expected)
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
for all elements in the tree with root dockable.dockable - the root of the tree that is shownexpected - whether the event is expected or notprotected void fireAllShown(Collection<Dockable> dockables, boolean expected)
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
for all elements in dockables.dockables - the set of newly shown elementsexpected - whether the event is expected or notprotected void fireShown(Dockable dockable, boolean expected)
VetoableDockFrontendListener.shown(VetoableDockFrontendEvent)
on all listeners.dockable - the element that was shownexpected - whether the event was expected or notCopyright © 2017 Docking Frames. All rights reserved.