public abstract class FullscreenActionSource extends AbstractDockActionSource
DockActionSource
that adds or removes a DockAction
depending on the result
of the ScreenDockFullscreenFilter
s that are currently registered at a
ScreenDockStation
.listeners
Constructor and Description |
---|
FullscreenActionSource(DockAction action,
LocationHint hint)
Creates a new source.
|
Modifier and Type | Method and Description |
---|---|
void |
addDockActionSourceListener(DockActionSourceListener listener)
Adds a listener to this source.
|
DockAction |
getDockAction(int index)
Gets the index'th
DockAction of this source. |
int |
getDockActionCount()
Gets the number of
DockActions which are
provided by this source. |
LocationHint |
getLocationHint()
Gets a hint where to put this source in relation to other sources.
|
protected abstract boolean |
isFullscreenEnabled()
Tells whether the action should be shown or not.
|
Iterator<DockAction> |
iterator() |
protected abstract void |
listen(boolean listening)
Tells whether this
DockActionSource has listeners or not. |
void |
removeDockActionSourceListener(DockActionSourceListener listener)
Removes an earlier added listener.
|
void |
update()
Checks whether the action should be shown or not, and fires
events if the value changed since the last update.
|
fireAdded, fireRemoved, hasListeners, indexOf
public FullscreenActionSource(DockAction action, LocationHint hint)
action
- the action to showhint
- tells where to show this sourcepublic LocationHint getLocationHint()
DockActionSource
ActionOffer
can choose to ignore these hints, or interpret
them in an unexpected way.public void addDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
DockActionSourceListener
should
be informed whenever some DockActions
are added or
removed from this source.addDockActionSourceListener
in interface DockActionSource
addDockActionSourceListener
in class AbstractDockActionSource
listener
- The listenerpublic void removeDockActionSourceListener(DockActionSourceListener listener)
DockActionSource
removeDockActionSourceListener
in interface DockActionSource
removeDockActionSourceListener
in class AbstractDockActionSource
listener
- The listener to removeDockActionSource.addDockActionSourceListener(DockActionSourceListener)
public void update()
public int getDockActionCount()
DockActionSource
DockActions
which are
provided by this source.DockActions
public DockAction getDockAction(int index)
DockActionSource
DockAction
of this source.index
- The index of the actionpublic Iterator<DockAction> iterator()
protected abstract boolean isFullscreenEnabled()
true
if the action should be shownprotected abstract void listen(boolean listening)
DockActionSource
has listeners or not.listening
- whether there are listeners or not