Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.visualization.control
Class ScalingGraphMousePlugin

    java.lang.Object
      edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
          edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin

All Implemented Interfaces:
  EventListener, GraphMousePlugin, MouseWheelListener

Direct Known Subclasses:
  SatelliteScalingGraphMousePlugin

public class ScalingGraphMousePlugin
extends AbstractGraphMousePlugin
implements MouseWheelListener

ScalingGraphMouse applies a scaling transformation to the graph layout. The Vertices get closer or farther apart, but do not themselves change size. ScalingGraphMouse uses MouseWheelEvents to apply the scaling.

Author:
  Tom Nelson

Field Summary
`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

Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
`cursor, down, modifiers`

Constructor Summary
`ScalingGraphMousePlugin(ScalingControl scaler, int modifiers)`
`ScalingGraphMousePlugin(ScalingControl scaler, int modifiers, float in, float out)`

Method Summary
`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)`

Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
`getCursor, getModifiers, setCursor, setModifiers`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### in

    protected float in

  the amount to zoom in by

### out

    protected float out

  the amount to zoom out by

### zoomAtMouse

    protected boolean zoomAtMouse

  whether to center the zoom at the current mouse position

### scaler

    protected ScalingControl scaler

  controls scaling operations

Constructor Detail

### ScalingGraphMousePlugin

    public ScalingGraphMousePlugin(ScalingControl scaler,
                                   int modifiers)

### ScalingGraphMousePlugin

    public ScalingGraphMousePlugin(ScalingControl scaler,
                                   int modifiers,
                                   float in,
                                   float out)

Method Detail

### setZoomAtMouse

    public void setZoomAtMouse(boolean zoomAtMouse)

  Parameters:
    `zoomAtMouse` - The zoomAtMouse to set.

### checkModifiers

    public boolean checkModifiers(MouseEvent e)

  Description copied from class: `AbstractGraphMousePlugin`
  check the mouse event modifiers against the instance member modifiers. Default implementation checks equality. Can be overridden to test with a mask

  Specified by:
    `checkModifiers` in interface `GraphMousePlugin`
  Overrides:
    `checkModifiers` in class `AbstractGraphMousePlugin`

### mouseWheelMoved

    public void mouseWheelMoved(MouseWheelEvent e)

  zoom the display in or out, depending on the direction of the mouse wheel motion.

  Specified by:
    `mouseWheelMoved` in interface `MouseWheelListener`

### getIn

    public float getIn()

  Returns:
    Returns the zoom in value.

### setIn

    public void setIn(float in)

  Parameters:
    `in` - The zoom in value to set.

### getOut

    public float getOut()

  Returns:
    Returns the zoom out value.

### setOut

    public void setOut(float out)

  Parameters:
    `out` - The zoom out value to set.

### getScaler

    public ScalingControl getScaler()

### setScaler

    public void setScaler(ScalingControl scaler)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD