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
ItemListener s 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, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
mouseDragged, mouseMoved
mouseWheelMoved
protected 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 ModalGraphMouse
protected void setPickingMode()
protected void setTransformingMode()
public void setZoomAtMouse(boolean zoomAtMouse)
zoomAtMouse
- The zoomAtMouse to set.public ItemListener getModeListener()
getModeListener
in interface ModalGraphMouse
public 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 ItemSelectable
public void removeItemListener(ItemListener aListener)
removeItemListener
in interface ItemSelectable
public ItemListener[] getItemListeners()
ItemListener
s added
to this JComboBox with addItemListener().ItemListener
s added or an empty
array if no listeners have been addedpublic Object[] getSelectedObjects()
getSelectedObjects
in interface ItemSelectable
protected void fireItemStateChanged(ItemEvent e)
e
- the event of interestEventListenerList
Copyright © 2015. All rights reserved.