public class ClickZoomWireListener extends java.lang.Object implements WindowFrame.ElectricEventListener, java.awt.event.ActionListener
The Left Mouse Button handles Selection and Moving
The Right Mouse Button handles Zooming and Wiring
The Mouse Wheel handles panning User: gainsley
Modifier and Type | Field and Description |
---|---|
static ClickZoomWireListener |
theOne |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Select object or Wire to object, depending upon popup menu used
|
void |
clearSpecialSelect()
Set ClickZoomWireListener to exclude hard to select objects
|
void |
databaseChanged(DatabaseChangeEvent e)
Invoked in the java AWT Event thread when the database state changes.
|
long |
getCancelMoveDelayMillis() |
static long |
getFactoryCancelMoveDelayMillis() |
java.awt.geom.Point2D |
getLastMouse()
Return the last known location of the mouse.
|
boolean |
getStickyMove()
Returns state of 'stickyMove'.
|
boolean |
getStickyWiring()
Returns state of 'stickyWiring'.
|
long |
getZoomInDelayMillis() |
static boolean |
isMiddleMouse(java.awt.event.InputEvent evt)
See if event is a middle mouse click.
|
static boolean |
isRightMouse(java.awt.event.InputEvent evt)
See if event is a right mouse click.
|
void |
keyPressed(java.awt.event.KeyEvent evt)
Key pressed event
Delete or Move selected objects
|
void |
keyReleased(java.awt.event.KeyEvent evt) |
void |
keyTyped(java.awt.event.KeyEvent evt) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent evt)
Handle mouse dragged event.
|
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent evt)
Use to track sticky move of objects
|
void |
mousePressed(java.awt.event.MouseEvent evt)
Handle mouse press events.
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
Handle mouse released event
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
Mouse Wheel Events are used for panning
Wheel Forward: scroll up
Wheel Back: scroll down
SHIFT + Wheel Forward: scroll right
SHIFT + Wheel Back: scroll left
|
static void |
moveSelected(double dX,
double dY,
boolean scaleMove,
boolean scaleMove2)
Move selected object(s) via keystroke.
|
void |
readPrefs()
Re-cached Preferences after change
|
javax.swing.JPopupMenu |
selectPopupMenu(java.util.List<Highlight> objects)
Popup menu when user is cycling through objects under pointer
|
void |
setCancelMoveDelayMillis(long delay) |
void |
setRouter(InteractiveRouter router) |
void |
setSpecialSelect()
Set ClickZoomWireListener to include hard to select objects
|
void |
setZoomInDelayMillis(long delay) |
void |
switchWiringTarget() |
void |
wireDownUp(boolean down)
Wire up or down a layer
|
void |
wireTo(int layerNumber)
Wire to a layer.
|
void |
zoomBoxSingleShot(WindowFrame.ElectricEventListener oldListener)
Sets the mode to zoom box for the next right click only.
|
public static ClickZoomWireListener theOne
public void setSpecialSelect()
public void clearSpecialSelect()
public boolean getStickyMove()
public void setRouter(InteractiveRouter router)
public boolean getStickyWiring()
public java.awt.geom.Point2D getLastMouse()
public void zoomBoxSingleShot(WindowFrame.ElectricEventListener oldListener)
public static boolean isRightMouse(java.awt.event.InputEvent evt)
public static boolean isMiddleMouse(java.awt.event.InputEvent evt)
public void mousePressed(java.awt.event.MouseEvent evt)
Left Mouse Click: Select
Left Mouse Drag: Move Objects (or select area if not on object)
Left Mouse Double-Click: Get Info
CTRL + Left Mouse Click: Cycle through select
SHIFT + Left Mouse Click: invert selection
Right Mouse Click/Drag: Connect wire
SHIFT + Right Mouse Click: zoom out
SHIFT + Right Mouse Drag: zoom in
CTRL + SHIFT + Right Mouse Click: draw box
mousePressed
in interface java.awt.event.MouseListener
evt
- the MouseEventpublic void mouseDragged(java.awt.event.MouseEvent evt)
Left Mouse Drag: Move Objects (or select area if not on object)
Right Mouse Click/Drag: Connect wire
Right Mouse Drag + (later) CTRL: Connect wire in space (ignore objects)
SHIFT + Right Mouse Drag: zoom box
CTRL + Right Mouse Drag: draw box
mouseDragged
in interface java.awt.event.MouseMotionListener
evt
- the MouseEventpublic void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
evt
- the MouseEventpublic void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved
in interface java.awt.event.MouseMotionListener
evt
- the MouseEventpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
evt
- the MouseWheelEventpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
evt
- the KeyEventpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent evt)
keyTyped
in interface java.awt.event.KeyListener
public void databaseChanged(DatabaseChangeEvent e)
DatabaseChangeListener
databaseChanged
in interface DatabaseChangeListener
e
- database change event.public static void moveSelected(double dX, double dY, boolean scaleMove, boolean scaleMove2)
dX
- amount to move in X in lambdadY
- amount to move in Y in lambdascaleMove
- scales move up if truescaleMove2
- scales move up if true (stacks with scaleMove)public void switchWiringTarget()
public void wireTo(int layerNumber)
layerNumber
- public void wireDownUp(boolean down)
down
- true to wire down a layer, otherwise wire up a layerpublic javax.swing.JPopupMenu selectPopupMenu(java.util.List<Highlight> objects)
objects
- list of objects to put in menupublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void readPrefs()
public long getCancelMoveDelayMillis()
public static long getFactoryCancelMoveDelayMillis()
public void setCancelMoveDelayMillis(long delay)
public long getZoomInDelayMillis()
public void setZoomInDelayMillis(long delay)