public class AnnotatingGraphMousePlugin<V,E> extends AbstractGraphMousePlugin implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
added
set to true when the AnnotationPaintable has been
added to the view component
|
protected int |
additionalModifiers
additional modifiers for the action of adding to an existing
selection
|
protected java.awt.Color |
annotationColor
color for annotations
|
protected AnnotationManager |
annotationManager
a Paintable to store all Annotations
|
protected MultiLayerTransformer |
basicTransformer
holds rendering transforms
|
protected boolean |
fill |
protected Annotation.Layer |
layer
layer for annotations
|
protected VisualizationServer.Paintable |
lensPaintable
the Paintable for the Shape annotation
|
protected RenderContext<V,E> |
rc
holds rendering settings
|
protected java.awt.geom.RectangularShape |
rectangularShape
used to draw a Shape annotation
|
cursor, down, modifiers| Constructor and Description |
|---|
AnnotatingGraphMousePlugin(RenderContext<V,E> rc)
create an instance with default settings
|
AnnotatingGraphMousePlugin(RenderContext<V,E> rc,
int selectionModifiers,
int additionalModifiers)
create an instance with overides
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getAnnotationColor() |
Annotation.Layer |
getLayer() |
java.awt.geom.RectangularShape |
getRectangularShape() |
boolean |
isFill() |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e)
Draws the transient Paintable that will become
a Shape annotation when the mouse button is
released
|
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
Sets the location for an Annotation.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Completes the process of adding a Shape annotation
and removed the transient paintable
|
void |
setAnnotationColor(java.awt.Color lensColor) |
void |
setFill(boolean fill) |
void |
setLayer(Annotation.Layer layer) |
void |
setRectangularShape(java.awt.geom.RectangularShape rect) |
checkModifiers, getCursor, getModifiers, setCursor, setModifiersprotected int additionalModifiers
protected java.awt.geom.RectangularShape rectangularShape
protected VisualizationServer.Paintable lensPaintable
protected AnnotationManager annotationManager
protected java.awt.Color annotationColor
protected Annotation.Layer layer
protected boolean fill
protected MultiLayerTransformer basicTransformer
protected RenderContext<V,E> rc
protected boolean added
public AnnotatingGraphMousePlugin(RenderContext<V,E> rc)
public AnnotatingGraphMousePlugin(RenderContext<V,E> rc, int selectionModifiers, int additionalModifiers)
selectionModifiers - for primary selectionadditionalModifiers - for additional selectionpublic java.awt.Color getAnnotationColor()
public void setAnnotationColor(java.awt.Color lensColor)
lensColor - The lensColor to set.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - the eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic java.awt.geom.RectangularShape getRectangularShape()
public void setRectangularShape(java.awt.geom.RectangularShape rect)
rect - the rect to setpublic Annotation.Layer getLayer()
public void setLayer(Annotation.Layer layer)
layer - the layer to setpublic boolean isFill()
public void setFill(boolean fill)
fill - the fill to set