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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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()