edu.uci.ics.jung.visualization.annotations
Class AnnotatingGraphMousePlugin<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
-
- edu.uci.ics.jung.visualization.annotations.AnnotatingGraphMousePlugin<V,E>
-
- All Implemented Interfaces:
- GraphMousePlugin, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
public class AnnotatingGraphMousePlugin<V,E> extends AbstractGraphMousePlugin implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
AnnotatingGraphMousePlugin can create Shape and Text annotations in a layer of the graph visualization.
-
-
Constructor Summary
Constructors Constructor and Description AnnotatingGraphMousePlugin(RenderContext<V,E> rc)Create an instance with defaults for primary (button 1) and secondary (button 1 + shift) selection.AnnotatingGraphMousePlugin(RenderContext<V,E> rc, int selectionModifiers, int additionalModifiers)Create an instance with the specified primary and secondary selection mechanisms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.ColorgetAnnotationColor()Annotation.LayergetLayer()java.awt.geom.RectangularShapegetRectangularShape()booleanisFill()voidmouseClicked(java.awt.event.MouseEvent e)voidmouseDragged(java.awt.event.MouseEvent e)Draws the transient Paintable that will become a Shape annotation when the mouse button is releasedvoidmouseEntered(java.awt.event.MouseEvent e)voidmouseExited(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)Sets the location for an Annotation.voidmouseReleased(java.awt.event.MouseEvent e)Completes the process of adding a Shape annotation and removed the transient paintablevoidsetAnnotationColor(java.awt.Color lensColor)voidsetFill(boolean fill)voidsetLayer(Annotation.Layer layer)voidsetRectangularShape(java.awt.geom.RectangularShape rect)-
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
checkModifiers, getCursor, getModifiers, setCursor, setModifiers
-
-
-
-
Constructor Detail
-
AnnotatingGraphMousePlugin
public AnnotatingGraphMousePlugin(RenderContext<V,E> rc)
Create an instance with defaults for primary (button 1) and secondary (button 1 + shift) selection.- Parameters:
rc- the RenderContext for which this plugin will be used
-
AnnotatingGraphMousePlugin
public AnnotatingGraphMousePlugin(RenderContext<V,E> rc, int selectionModifiers, int additionalModifiers)
Create an instance with the specified primary and secondary selection mechanisms.- Parameters:
rc- the RenderContext for which this plugin will be usedselectionModifiers- for primary selectionadditionalModifiers- for additional selection
-
-
Method Detail
-
getAnnotationColor
public java.awt.Color getAnnotationColor()
- Returns:
- Returns the lensColor.
-
setAnnotationColor
public void setAnnotationColor(java.awt.Color lensColor)
- Parameters:
lensColor- The lensColor to set.
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Sets the location for an Annotation. Will either pop up a dialog to prompt for text input for a text annotation, or begin the process of drawing a Shape annotation- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Parameters:
e- the event
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Completes the process of adding a Shape annotation and removed the transient paintable- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Draws the transient Paintable that will become a Shape annotation when the mouse button is released- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener
-
getRectangularShape
public java.awt.geom.RectangularShape getRectangularShape()
- Returns:
- the rect
-
setRectangularShape
public void setRectangularShape(java.awt.geom.RectangularShape rect)
- Parameters:
rect- the rect to set
-
getLayer
public Annotation.Layer getLayer()
- Returns:
- the layer
-
setLayer
public void setLayer(Annotation.Layer layer)
- Parameters:
layer- the layer to set
-
isFill
public boolean isFill()
- Returns:
- the fill
-
setFill
public void setFill(boolean fill)
- Parameters:
fill- the fill to set
-
-
DataMelt 3.0 © DataMelt by jWork.ORG