|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DisablingStrategy
An DisablingStrategy
can be used to globaly disable DockElement
s and parts of
DockElement
s like their DockAction
s or their DockTitle
s.
Implementation wise an 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.
This interface was added due to popular request. Developers should be aware that many use cases involving disabling
items are rather dubios. Used in the wrong way, the 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.
Field Summary | |
---|---|
static PropertyKey<DisablingStrategy> |
STRATEGY
The unique identifier for the DockProperties , need to get or set the current DisablingStrategy . |
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final PropertyKey<DisablingStrategy> STRATEGY
DockProperties
, need to get or set the current DisablingStrategy
.
Method Detail |
---|
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 disabled
item
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 disabled
item
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 disabled
item
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |