gishur.gui2.handler
Class SelectElementContextActor
java.lang.Object
|
+--gishur.gui2.handler.SelectElementContextActor
- All Implemented Interfaces:
- ContextActor
- public class SelectElementContextActor
- extends java.lang.Object
- implements ContextActor
- Version:
- 1.0
- Author:
- Thomas Wolf
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NORMAL
public static final byte NORMAL
SELECT_ONLY_ONE
public static final byte SELECT_ONLY_ONE
DOUBLE_SELECT_UNSELECTS
public static final byte DOUBLE_SELECT_UNSELECTS
SELECT_COMMAND
public static final java.lang.String SELECT_COMMAND
UNSELECT_COMMAND
public static final java.lang.String UNSELECT_COMMAND
CLEARSELECT_COMMAND
public static final java.lang.String CLEARSELECT_COMMAND
SelectElementContextActor
public SelectElementContextActor(int mode)
- Constructs a new
SelectElementContextActor
with the given
mode (a combination of {NORMAL
,SELECT_ONLY_ONE
,
DOUBLE_SELECT_UNSELECTS
}
).
SelectElementContextActor
public SelectElementContextActor()
- Constructs a new
SelectElementContextActor
.
selected
public ListView selected()
- Returns a
ListView
with all selected elements.
- Returns:
- a
ListView
with all selected elements.
selectedFirst
public DisplayInteractiveObject selectedFirst()
- Returns the first element of the selected elements.
- Returns:
- the first element of the selected elements.
select
public void select(DisplayInteractiveObject dob)
- Selects the given
DisplayInteractiveObject
and adds it to
the list of selected elements.
- Parameters:
dob
- the DisplayInteractiveObject
to select
unselect
public void unselect(DisplayInteractiveObject dob)
- Unselects the given
DisplayInteractiveObject
and removes it from
the list of selected elements.
- Parameters:
dob
- the DisplayInteractiveObject
to unselect
doMenuAction
public void doMenuAction(java.lang.String cmd,
DrawAtom context,
java.lang.String context_element)
- Does the action of a special context menu.
- Specified by:
doMenuAction
in interface ContextActor
- Parameters:
cmd
- the command string of the MenuItem
selectedcontext
- the DrawAtom
that is the contextcontext_element
- the actual context element name of the given
context DrawAtom
.