Class ZoomHandler
- java.lang.Object
-
- adams.gui.visualization.core.axis.ZoomHandler
-
- All Implemented Interfaces:
CloneHandler<ZoomHandler>
,Serializable
public class ZoomHandler extends Object implements Serializable, CloneHandler<ZoomHandler>
Class for handling zooms.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ZoomHandler()
Initializes the handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all zooms.ZoomHandler
getClone()
Returns an exact copy of itself.boolean
isZoomed()
Returns true if at least one zoom is stored.Zoom
peek()
Peeks the topmost zoom.Zoom
pop()
Pops the topmost zoom.void
push(double min, double max)
Adds the zoom to its internal list and updates the axis.void
push(Zoom zoom)
Adds the zoom to its internal list and updates the axis.String
toString()
Returns a string representation of the handler.
-
-
-
Method Detail
-
getClone
public ZoomHandler getClone()
Returns an exact copy of itself.- Specified by:
getClone
in interfaceCloneHandler<ZoomHandler>
- Returns:
- copy of itself
-
push
public void push(double min, double max)
Adds the zoom to its internal list and updates the axis.- Parameters:
min
- the minimum of the zoommax
- the maximum of the zoom
-
push
public void push(Zoom zoom)
Adds the zoom to its internal list and updates the axis.- Parameters:
zoom
- the zoom to add
-
peek
public Zoom peek()
Peeks the topmost zoom.- Returns:
- the topmost zoom
-
pop
public Zoom pop()
Pops the topmost zoom.- Returns:
- the topmost zoom
-
clear
public void clear()
Removes all zooms.
-
isZoomed
public boolean isZoomed()
Returns true if at least one zoom is stored.- Returns:
- true if a zoom is in place
-
-