public class ScalingGraphMousePlugin extends AbstractGraphMousePlugin implements MouseWheelListener
Modifier and Type | Field and Description |
---|---|
protected float |
in
the amount to zoom in by
|
protected float |
out
the amount to zoom out by
|
protected ScalingControl |
scaler
controls scaling operations
|
protected boolean |
zoomAtMouse
whether to center the zoom at the current mouse position
|
cursor, down, modifiers
Constructor and Description |
---|
ScalingGraphMousePlugin(ScalingControl scaler,
int modifiers) |
ScalingGraphMousePlugin(ScalingControl scaler,
int modifiers,
float in,
float out) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkModifiers(MouseEvent e)
check the mouse event modifiers against the
instance member modifiers.
|
float |
getIn() |
float |
getOut() |
ScalingControl |
getScaler() |
void |
mouseWheelMoved(MouseWheelEvent e)
zoom the display in or out, depending on the direction of the
mouse wheel motion.
|
void |
setIn(float in) |
void |
setOut(float out) |
void |
setScaler(ScalingControl scaler) |
void |
setZoomAtMouse(boolean zoomAtMouse) |
getCursor, getModifiers, setCursor, setModifiers
protected float in
protected float out
protected boolean zoomAtMouse
protected ScalingControl scaler
public ScalingGraphMousePlugin(ScalingControl scaler, int modifiers)
public ScalingGraphMousePlugin(ScalingControl scaler, int modifiers, float in, float out)
public void setZoomAtMouse(boolean zoomAtMouse)
zoomAtMouse
- The zoomAtMouse to set.public boolean checkModifiers(MouseEvent e)
AbstractGraphMousePlugin
checkModifiers
in interface GraphMousePlugin
checkModifiers
in class AbstractGraphMousePlugin
e
- an event to compare topublic void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved
in interface MouseWheelListener
public float getIn()
public void setIn(float in)
in
- The zoom in value to set.public float getOut()
public void setOut(float out)
out
- The zoom out value to set.public ScalingControl getScaler()
public void setScaler(ScalingControl scaler)
Copyright © 2015. All rights reserved.