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
public abstract class AbstractGraphMousePlugin extends java.lang.Object implements GraphMousePlugin
a base class for GraphMousePlugin instances. Holds some members common to all GraphMousePlugins
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphMousePlugin(int modifiers)Creates an instance with the specified mouse event modifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckModifiers(java.awt.event.MouseEvent e)check the mouse event modifiers against the instance member modifiers.java.awt.CursorgetCursor()intgetModifiers()getter for mouse modifiersvoidsetCursor(java.awt.Cursor cursor)voidsetModifiers(int modifiers)setter for mouse modifiers
-
-
-
Method Detail
-
getModifiers
public int getModifiers()
getter for mouse modifiers- Specified by:
getModifiersin interfaceGraphMousePlugin- Returns:
- the mouse event modifiers that will activate this plugin
-
setModifiers
public void setModifiers(int modifiers)
setter for mouse modifiers- Specified by:
setModifiersin interfaceGraphMousePlugin- Parameters:
modifiers- the mouse event modifiers that will activate this plugin
-
checkModifiers
public boolean checkModifiers(java.awt.event.MouseEvent e)
check the mouse event modifiers against the instance member modifiers. Default implementation checks equality. Can be overridden to test with a mask- Specified by:
checkModifiersin interfaceGraphMousePlugin- Parameters:
e- an event to compare to- Returns:
- whether the member modifiers match the event modifiers
-
getCursor
public java.awt.Cursor getCursor()
- Returns:
- Returns the cursor.
-
setCursor
public void setCursor(java.awt.Cursor cursor)
- Parameters:
cursor- The cursor to set.
-
-