Class AbstractGraphMousePlugin
java.lang.Object
edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
- All Implemented Interfaces:
GraphMousePlugin
- Direct Known Subclasses:
AbstractPopupGraphMousePlugin
,AnimatedPickingGraphMousePlugin
,AnnotatingGraphMousePlugin
,EditingGraphMousePlugin
,LabelEditingGraphMousePlugin
,LensMagnificationGraphMousePlugin
,PickingGraphMousePlugin
,RotatingGraphMousePlugin
,ScalingGraphMousePlugin
,ShearingGraphMousePlugin
,TranslatingGraphMousePlugin
,ViewTranslatingGraphMousePlugin
a base class for GraphMousePlugin instances. Holds some members
common to all GraphMousePlugins
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGraphMousePlugin
(int modifiers) Creates an instance with the specified mouse event modifiers. -
Method Summary
Modifier and TypeMethodDescriptionboolean
check the mouse event modifiers against the instance member modifiers.int
getter for mouse modifiersvoid
void
setModifiers
(int modifiers) setter for mouse modifiers
-
Field Details
-
modifiers
protected int modifiersmodifiers to compare against mouse event modifiers -
down
the location in the View where the mouse was pressed -
cursor
the special cursor that plugins may display
-
-
Constructor Details
-
AbstractGraphMousePlugin
public AbstractGraphMousePlugin(int modifiers) Creates an instance with the specified mouse event modifiers.- Parameters:
modifiers
- the mouse event modifiers to use
-
-
Method Details
-
getModifiers
public int getModifiers()getter for mouse modifiers- Specified by:
getModifiers
in interfaceGraphMousePlugin
- Returns:
- the mouse event modifiers that will activate this plugin
-
setModifiers
public void setModifiers(int modifiers) setter for mouse modifiers- Specified by:
setModifiers
in interfaceGraphMousePlugin
- Parameters:
modifiers
- the mouse event modifiers that will activate this plugin
-
checkModifiers
check the mouse event modifiers against the instance member modifiers. Default implementation checks equality. Can be overridden to test with a mask- Specified by:
checkModifiers
in interfaceGraphMousePlugin
- Parameters:
e
- an event to compare to- Returns:
- whether the member modifiers match the event modifiers
-
getCursor
- Returns:
- Returns the cursor.
-
setCursor
- Parameters:
cursor
- The cursor to set.
-