org.arakhne.neteditor.android.actionmode.base
public class BaseMode extends ActionMode<Figure,DroidViewGraphics2D,Color>
| Mouse Events | Action |
|---|---|
| Move on figures | Change the mouse cursor to indicates if they are resized by the user. |
| Left click on figure | Select the figure. See below for details on the selection behavior. |
| Left click on resizing handler | If selected objects, delegate to ResizeMode. |
| Left click on block figure and drag | Select the block figures if not already, and delegate to MoveMode. |
| Left click on edge control point and drag | Select the edge and delegate to ControlPointMoveMode. |
| Left click on edge, outside control point, and drag | Create a control point and delegate to ControlPointMoveMode. |
| Left click on background | Clear the selection |
| Left click on background and drag | Draw the selection rectangle |
| Left double-click on block figure | Fire action-performed event |
| Right click everywhere | Fire popup-performed event |
| Keys | Action |
|---|
If the parameter isAlwaysRemovingModelObjects, passed as
parameter of the constructors, is
If the parameter isAlwaysRemovingModelObjects, passed as
parameter of the constructors, is
The figure f is deleted from the viewer.
The model object a is removed from the graph model.true; then the
method 2 is run in place of the method 1.
false; then only
the figure f is removed from the viewer. The model object a remains
inside the associated graph model.
Method 2: Inconditional deletion of the figure and its model object
The figure f is associated to the model object a.
cursorChanged| Constructor and Description |
|---|
BaseMode()
Construct a new BaseMode.
|
BaseMode(ActionModeManager modeManager)
Construct a new BaseMode with the given parent.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExit()
Always
false because I never want
to get out of this mode. |
void |
cleanMode() |
SelectionMode |
getSelectionMode()
Replies the current mode of selection.
|
protected void |
onModeActivated() |
void |
paint(DroidViewGraphics2D g) |
void |
pointerDragged(ActionPointerEvent event) |
void |
pointerLongClicked(ActionPointerEvent event) |
void |
pointerPressed(ActionPointerEvent event) |
void |
pointerReleased(ActionPointerEvent event) |
void |
setSelectionMode(SelectionMode mode)
Change the mode of selection.
|
createDelegation, createDelegation, done, forcePointerEvent, getClickPrecision, getInitialCursor, getModeManager, getModeManagerOwner, getPointedFigure, isExclusive, isPersistent, isPointerInFigureShape, keyPressed, keyReleased, keyTyped, onModeDesactivated, pointerClicked, pointerMoved, repaint, repaint, requestFocus, restoreCursor, setCursor, setExclusive, setModeManager, setPersistentpublic BaseMode(ActionModeManager modeManager)
modeManager - a reference to the ModeManager that
contains this Mode.public BaseMode()
ModeManager should be
set before using this object.public void setSelectionMode(SelectionMode mode)
mode - public SelectionMode getSelectionMode()
protected void onModeActivated()
onModeActivated in class ActionMode<Figure,DroidViewGraphics2D,Color>public boolean canExit()
false because I never want
to get out of this mode.canExit in class ActionMode<Figure,DroidViewGraphics2D,Color>true if this mode can be dropped
from the ActionModeManager stack,
otherwise false.public void cleanMode()
cleanMode in class ActionMode<Figure,DroidViewGraphics2D,Color>public void paint(DroidViewGraphics2D g)
paint in class ActionMode<Figure,DroidViewGraphics2D,Color>public void pointerPressed(ActionPointerEvent event)
pointerPressed in class ActionMode<Figure,DroidViewGraphics2D,Color>public void pointerDragged(ActionPointerEvent event)
pointerDragged in class ActionMode<Figure,DroidViewGraphics2D,Color>public void pointerReleased(ActionPointerEvent event)
pointerReleased in class ActionMode<Figure,DroidViewGraphics2D,Color>public void pointerLongClicked(ActionPointerEvent event)
pointerLongClicked in class ActionMode<Figure,DroidViewGraphics2D,Color>Copyright © 2001-2013 NetEditor Developers. 
NetEditor API Documentation by NetEditor Developers is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.arakhne.org/neteditor