public abstract class AbstractModalGraphMouse extends PluggableGraphMouse implements ModalGraphMouse, ItemSelectable
ModalGraphMouse.Mode| Modifier and Type | Field and Description |
|---|---|
protected GraphMousePlugin |
animatedPickingPlugin |
protected float |
in
used by the scaling plugins for zoom in
|
protected EventListenerList |
listenerList
listeners for mode changes
|
protected ModalGraphMouse.Mode |
mode
the current mode
|
protected JComboBox<ModalGraphMouse.Mode> |
modeBox
a JComboBox control available to set the mode
|
protected KeyListener |
modeKeyListener |
protected ItemListener |
modeListener
a listener for mode changes
|
protected 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 |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractModalGraphMouse(float in,
float out) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItemListener(ItemListener aListener)
add a listener for mode changes
|
protected void |
fireItemStateChanged(ItemEvent e)
Notifies all listeners that have registered interest for
notification on this event type.
|
ItemListener[] |
getItemListeners()
Returns an array of all the
ItemListeners added
to this JComboBox with addItemListener(). |
JComboBox<ModalGraphMouse.Mode> |
getModeComboBox() |
KeyListener |
getModeKeyListener() |
ItemListener |
getModeListener() |
JMenu |
getModeMenu()
create (if necessary) and return a menu that will change
the mode
|
Object[] |
getSelectedObjects() |
protected abstract void |
loadPlugins()
create the plugins, and load the plugins for TRANSFORMING mode
|
void |
removeItemListener(ItemListener aListener)
remove a listener for mode changes
|
void |
setMode(ModalGraphMouse.Mode mode)
setter for the Mode.
|
void |
setModeKeyListener(KeyListener modeKeyListener) |
protected void |
setPickingMode() |
protected void |
setTransformingMode() |
void |
setZoomAtMouse(boolean zoomAtMouse) |
add, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasedmouseDragged, mouseMovedmouseWheelMovedprotected float in
protected float out
protected ItemListener modeListener
protected JComboBox<ModalGraphMouse.Mode> modeBox
protected JMenu modeMenu
protected ModalGraphMouse.Mode mode
protected EventListenerList listenerList
protected GraphMousePlugin pickingPlugin
protected GraphMousePlugin translatingPlugin
protected GraphMousePlugin animatedPickingPlugin
protected GraphMousePlugin scalingPlugin
protected GraphMousePlugin rotatingPlugin
protected GraphMousePlugin shearingPlugin
protected KeyListener modeKeyListener
protected abstract void loadPlugins()
public void setMode(ModalGraphMouse.Mode mode)
setMode in interface ModalGraphMouseprotected void setPickingMode()
protected void setTransformingMode()
public void setZoomAtMouse(boolean zoomAtMouse)
zoomAtMouse - The zoomAtMouse to set.public ItemListener getModeListener()
getModeListener in interface ModalGraphMousepublic KeyListener getModeKeyListener()
public void setModeKeyListener(KeyListener modeKeyListener)
modeKeyListener - the modeKeyListener to setpublic JComboBox<ModalGraphMouse.Mode> getModeComboBox()
public JMenu getModeMenu()
public void addItemListener(ItemListener aListener)
addItemListener in interface ItemSelectablepublic void removeItemListener(ItemListener aListener)
removeItemListener in interface ItemSelectablepublic ItemListener[] getItemListeners()
ItemListeners added
to this JComboBox with addItemListener().ItemListeners added or an empty
array if no listeners have been addedpublic Object[] getSelectedObjects()
getSelectedObjects in interface ItemSelectableprotected void fireItemStateChanged(ItemEvent e)
e - the event of interestEventListenerListCopyright © 2016. All rights reserved.