public interface DisablingStrategy
DisablingStrategy
can be used to globally disable DockElement
s and parts of
DockElement
s like their DockAction
s or their DockTitle
s.DisablingStrategy
only offers a hint, each item has to decide on its own
whether it should heed the hint. All the default items of the framework do however heed the hint.DisablingStrategy
can break a lot functionality of
the framework. E.g. it can prevent the user from closing a Dockable
he just does not need right now.Modifier and Type | Field and Description |
---|---|
static PropertyKey<DisablingStrategy> |
STRATEGY
The unique identifier for the
DockProperties , need to get or set the current DisablingStrategy . |
Modifier and Type | Method and Description |
---|---|
void |
addDisablingStrategyListener(DisablingStrategyListener listener)
Adds
listener to this object, the listener will be informed when the state of this
DisablingStrategy changes. |
boolean |
isDisabled(Dockable dockable,
DockAction item)
Tells whether the action
item , which is shown together with dockable , is disabled. |
boolean |
isDisabled(Dockable dockable,
DockTitle item)
Tells whether the title
item , which is shown together with dockable , is disabled. |
boolean |
isDisabled(DockElement item)
Tells whether the item
DockElement is disabled in general. |
boolean |
isTabDisabled(Dockable dockable)
Assuming
dockable is shown with some tabs (e.g. |
void |
removeDisablingStrategyListener(DisablingStrategyListener listener)
Removes
listener from this object. |
static final PropertyKey<DisablingStrategy> STRATEGY
DockProperties
, need to get or set the current DisablingStrategy
.void addDisablingStrategyListener(DisablingStrategyListener listener)
listener
to this object, the listener will be informed when the state of this
DisablingStrategy
changes.listener
- the listener to add, not null
void removeDisablingStrategyListener(DisablingStrategyListener listener)
listener
from this object.listener
- the listener to removeboolean isDisabled(DockElement item)
DockElement
is disabled in general. The exact effects of being disabled are
not defined, but when using the default implementation developers can expect that item
will not
participate in any kind of drag and drop operation.item
- the item which may be disableditem
is disabledboolean isDisabled(Dockable dockable, DockAction item)
item
, which is shown together with dockable
, is disabled.dockable
- the dockable which shows item
item
- the action that might be disableditem
is disabledboolean isDisabled(Dockable dockable, DockTitle item)
item
, which is shown together with dockable
, is disabled.dockable
- the dockable which shows item
item
- the title that might be disableditem
is disabledboolean isTabDisabled(Dockable dockable)
dockable
is shown with some tabs (e.g. some EclipseTab
s), this method decides
whether the tabs are disabled.dockable
- the dockable which is shown together with some tab