public class EditingModalGraphMouse extends PluggableGraphMouse implements ModalGraphMouse, java.awt.ItemSelectable
ModalGraphMouse.Mode
Modifier and Type | Field and Description |
---|---|
protected GraphMousePlugin |
animatedPickingPlugin |
protected GraphMousePlugin |
editingPlugin |
protected float |
in
used by the scaling plugins for zoom in
|
protected javax.swing.event.EventListenerList |
listenerList
listeners for mode changes
|
protected ModalGraphMouse.Mode |
mode
the current mode
|
protected javax.swing.JComboBox |
modeBox
a JComboBox control available to set the mode
|
protected java.awt.event.ItemListener |
modeListener
a listener for mode changes
|
protected javax.swing.JMenu |
modeMenu
a menu available to set the mode
|
protected float |
out
used by the scaling plugins for zoom out
|
protected GraphMousePlugin |
pickingPlugin |
protected GraphMousePlugin |
rotatingPlugin |
protected GraphMousePlugin |
scalingPlugin |
protected GraphMousePlugin |
shearingPlugin |
protected GraphMousePlugin |
translatingPlugin |
Constructor and Description |
---|
EditingModalGraphMouse()
create an instance with default values
|
EditingModalGraphMouse(float in,
float out)
create an instance with passed values
|
Modifier and Type | Method and Description |
---|---|
void |
addItemListener(java.awt.event.ItemListener aListener)
add a listener for mode changes
|
protected void |
fireItemStateChanged(java.awt.event.ItemEvent e)
Notifies all listeners that have registered interest for
notification on this event type.
|
java.awt.event.ItemListener[] |
getItemListeners()
Returns an array of all the
ItemListener s added
to this JComboBox with addItemListener(). |
javax.swing.JComboBox |
getModeComboBox() |
java.awt.event.ItemListener |
getModeListener() |
javax.swing.JMenu |
getModeMenu()
create (if necessary) and return a menu that will change
the mode
|
java.lang.Object[] |
getSelectedObjects() |
protected void |
loadPlugins()
create the plugins, and load the plugins for TRANSFORMING mode
|
void |
removeItemListener(java.awt.event.ItemListener aListener)
remove a listener for mode changes
|
protected void |
setEditingMode() |
void |
setMode(ModalGraphMouse.Mode mode)
setter for the Mode.
|
protected void |
setPickingMode() |
protected void |
setTransformingMode() |
void |
setVertexLocations(SettableVertexLocationFunction vertexLocations) |
void |
setZoomAtMouse(boolean zoomAtMouse) |
add, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected float in
protected float out
protected java.awt.event.ItemListener modeListener
protected javax.swing.JComboBox modeBox
protected javax.swing.JMenu modeMenu
protected ModalGraphMouse.Mode mode
protected javax.swing.event.EventListenerList listenerList
protected GraphMousePlugin pickingPlugin
protected GraphMousePlugin translatingPlugin
protected GraphMousePlugin animatedPickingPlugin
protected GraphMousePlugin scalingPlugin
protected GraphMousePlugin rotatingPlugin
protected GraphMousePlugin shearingPlugin
protected GraphMousePlugin editingPlugin
public EditingModalGraphMouse()
public EditingModalGraphMouse(float in, float out)
in
- override value for scale inout
- override value for scale outprotected void loadPlugins()
public void setVertexLocations(SettableVertexLocationFunction vertexLocations)
public void setMode(ModalGraphMouse.Mode mode)
setMode
in interface ModalGraphMouse
protected void setPickingMode()
protected void setTransformingMode()
protected void setEditingMode()
public void setZoomAtMouse(boolean zoomAtMouse)
zoomAtMouse
- The zoomAtMouse to set.public java.awt.event.ItemListener getModeListener()
getModeListener
in interface ModalGraphMouse
public javax.swing.JComboBox getModeComboBox()
public javax.swing.JMenu getModeMenu()
public void addItemListener(java.awt.event.ItemListener aListener)
addItemListener
in interface java.awt.ItemSelectable
public void removeItemListener(java.awt.event.ItemListener aListener)
removeItemListener
in interface java.awt.ItemSelectable
public java.awt.event.ItemListener[] getItemListeners()
ItemListener
s added
to this JComboBox with addItemListener().ItemListener
s added or an empty
array if no listeners have been addedpublic java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
protected void fireItemStateChanged(java.awt.event.ItemEvent e)
e
- the event of interestEventListenerList