Class EditingModalGraphMouse<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.visualization.control.PluggableGraphMouse
-
- edu.uci.ics.jung.visualization.control.AbstractModalGraphMouse
-
- edu.uci.ics.jung.visualization.control.EditingModalGraphMouse<V,E>
-
- All Implemented Interfaces:
ModalGraphMouse
,VisualizationViewer.GraphMouse
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.awt.ItemSelectable
,java.util.EventListener
public class EditingModalGraphMouse<V,E> extends AbstractModalGraphMouse implements ModalGraphMouse, java.awt.ItemSelectable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EditingModalGraphMouse.ModeKeyAdapter
-
Nested classes/interfaces inherited from class edu.uci.ics.jung.visualization.control.AbstractModalGraphMouse
AbstractModalGraphMouse.ModeListener
-
Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.control.ModalGraphMouse
ModalGraphMouse.Mode
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotatingGraphMousePlugin<V,E>
annotatingPlugin
protected MultiLayerTransformer
basicTransformer
protected com.google.common.base.Supplier<E>
edgeFactory
protected EditingGraphMousePlugin<V,E>
editingPlugin
protected LabelEditingGraphMousePlugin<V,E>
labelEditingPlugin
protected EditingPopupGraphMousePlugin<V,E>
popupEditingPlugin
protected RenderContext<V,E>
rc
protected com.google.common.base.Supplier<V>
vertexFactory
-
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractModalGraphMouse
animatedPickingPlugin, in, listenerList, mode, modeBox, modeKeyListener, modeListener, modeMenu, out, pickingPlugin, rotatingPlugin, scalingPlugin, shearingPlugin, translatingPlugin
-
Fields inherited from class edu.uci.ics.jung.visualization.control.PluggableGraphMouse
mouseListeners, mouseMotionListeners, mouseMotionPluginList, mousePluginList, mouseWheelListeners, mouseWheelPluginList
-
-
Constructor Summary
Constructors Constructor Description EditingModalGraphMouse(RenderContext<V,E> rc, com.google.common.base.Supplier<V> vertexFactory, com.google.common.base.Supplier<E> edgeFactory)
Creates an instance with the specified rendering context and vertex/edge factories, and with default zoom in/out values of 1.1 and 1/1.1.EditingModalGraphMouse(RenderContext<V,E> rc, com.google.common.base.Supplier<V> vertexFactory, com.google.common.base.Supplier<E> edgeFactory, float in, float out)
Creates an instance with the specified rendering context and vertex/edge factories, and with the specified zoom in/out values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotatingGraphMousePlugin<V,E>
getAnnotatingPlugin()
EditingGraphMousePlugin<V,E>
getEditingPlugin()
LabelEditingGraphMousePlugin<V,E>
getLabelEditingPlugin()
javax.swing.JComboBox<ModalGraphMouse.Mode>
getModeComboBox()
javax.swing.JMenu
getModeMenu()
create (if necessary) and return a menu that will change the modeEditingPopupGraphMousePlugin<V,E>
getPopupEditingPlugin()
protected void
loadPlugins()
create the plugins, and load the plugins for TRANSFORMING modeprotected void
setAnnotatingMode()
protected void
setEditingMode()
void
setMode(ModalGraphMouse.Mode mode)
setter for the Mode.protected void
setPickingMode()
protected void
setTransformingMode()
-
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractModalGraphMouse
addItemListener, fireItemStateChanged, getItemListeners, getModeKeyListener, getModeListener, getSelectedObjects, removeItemListener, setModeKeyListener, setZoomAtMouse
-
Methods inherited from class edu.uci.ics.jung.visualization.control.PluggableGraphMouse
add, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.awt.ItemSelectable
addItemListener, getSelectedObjects, removeItemListener
-
Methods inherited from interface edu.uci.ics.jung.visualization.control.ModalGraphMouse
getModeListener
-
-
-
-
Field Detail
-
vertexFactory
protected com.google.common.base.Supplier<V> vertexFactory
-
edgeFactory
protected com.google.common.base.Supplier<E> edgeFactory
-
editingPlugin
protected EditingGraphMousePlugin<V,E> editingPlugin
-
labelEditingPlugin
protected LabelEditingGraphMousePlugin<V,E> labelEditingPlugin
-
popupEditingPlugin
protected EditingPopupGraphMousePlugin<V,E> popupEditingPlugin
-
annotatingPlugin
protected AnnotatingGraphMousePlugin<V,E> annotatingPlugin
-
basicTransformer
protected MultiLayerTransformer basicTransformer
-
rc
protected RenderContext<V,E> rc
-
-
Constructor Detail
-
EditingModalGraphMouse
public EditingModalGraphMouse(RenderContext<V,E> rc, com.google.common.base.Supplier<V> vertexFactory, com.google.common.base.Supplier<E> edgeFactory)
Creates an instance with the specified rendering context and vertex/edge factories, and with default zoom in/out values of 1.1 and 1/1.1.- Parameters:
rc
- the rendering contextvertexFactory
- used to construct verticesedgeFactory
- used to construct edges
-
EditingModalGraphMouse
public EditingModalGraphMouse(RenderContext<V,E> rc, com.google.common.base.Supplier<V> vertexFactory, com.google.common.base.Supplier<E> edgeFactory, float in, float out)
Creates an instance with the specified rendering context and vertex/edge factories, and with the specified zoom in/out values.- Parameters:
rc
- the rendering contextvertexFactory
- used to construct verticesedgeFactory
- used to construct edgesin
- amount to zoom in by for each actionout
- amount to zoom out by for each action
-
-
Method Detail
-
loadPlugins
protected void loadPlugins()
create the plugins, and load the plugins for TRANSFORMING mode- Specified by:
loadPlugins
in classAbstractModalGraphMouse
-
setMode
public void setMode(ModalGraphMouse.Mode mode)
setter for the Mode.- Specified by:
setMode
in interfaceModalGraphMouse
- Overrides:
setMode
in classAbstractModalGraphMouse
-
setPickingMode
protected void setPickingMode()
- Overrides:
setPickingMode
in classAbstractModalGraphMouse
-
setTransformingMode
protected void setTransformingMode()
- Overrides:
setTransformingMode
in classAbstractModalGraphMouse
-
setEditingMode
protected void setEditingMode()
-
setAnnotatingMode
protected void setAnnotatingMode()
-
getModeComboBox
public javax.swing.JComboBox<ModalGraphMouse.Mode> getModeComboBox()
- Overrides:
getModeComboBox
in classAbstractModalGraphMouse
- Returns:
- the modeBox.
-
getModeMenu
public javax.swing.JMenu getModeMenu()
create (if necessary) and return a menu that will change the mode- Overrides:
getModeMenu
in classAbstractModalGraphMouse
- Returns:
- the menu
-
getAnnotatingPlugin
public AnnotatingGraphMousePlugin<V,E> getAnnotatingPlugin()
- Returns:
- the annotatingPlugin
-
getEditingPlugin
public EditingGraphMousePlugin<V,E> getEditingPlugin()
- Returns:
- the editingPlugin
-
getLabelEditingPlugin
public LabelEditingGraphMousePlugin<V,E> getLabelEditingPlugin()
- Returns:
- the labelEditingPlugin
-
getPopupEditingPlugin
public EditingPopupGraphMousePlugin<V,E> getPopupEditingPlugin()
- Returns:
- the popupEditingPlugin
-
-