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

## avrora.gui
Class TimeScale

    java.lang.Object
      avrora.gui.TimeScale

public class TimeScale
extends java.lang.Object

The `TimeScale` class handles the conversion of time scales in displaying timing windows within the GUI simulation. It has an internal notion of the scale and the start time. It has methods to render a scale bar and to convert a time scale value (in cycles) to an X coordinate in the drawing rectangle.

Method Summary
`void` | `drawScale(java.awt.Dimension dim, java.awt.Graphics g)`
`int` | `getExtent(int width, long maxtime)`
`int` | `getMaxZoom()`
`int` | `getPosition()`
`double` | `getScale()`
`int` | `getScrollBarSize(long maxtime)`
`long` | `getStartTime()`
`int` | `getX(long time)`
`int` | `getZoom()`
`void` | `setPosition(int np)`
`void` | `setZoom(int nzoom)`
`void` | `zoomin()`
`void` | `zoomout()`

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

Method Detail

### getMaxZoom

    public int getMaxZoom()

### drawScale

    public void drawScale(java.awt.Dimension dim,
                          java.awt.Graphics g)

### getZoom

    public int getZoom()

### getX

    public int getX(long time)

### setZoom

    public void setZoom(int nzoom)

### zoomin

    public void zoomin()

### zoomout

    public void zoomout()

### getExtent

    public int getExtent(int width,
                         long maxtime)

### getScrollBarSize

    public int getScrollBarSize(long maxtime)

### setPosition

    public void setPosition(int np)

### getPosition

    public int getPosition()

### getStartTime

    public long getStartTime()

### getScale

    public double getScale()

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