|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.plugins.AbstractChartPlugin<AbstractChart<?,?>>
lt.monarch.chart.plugins.BoxZoomer
public class BoxZoomer extends AbstractChartPlugin<AbstractChart<?,?>> implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Plug-in for rubber-band zooming. Performs zooming for both x and y axis.
| Constructor and Description |
|---|
BoxZoomer(AbstractAxisMapper xMapper,
AbstractAxisMapper yMapper)
Constructs a box zoomer plug-in. |
BoxZoomer(AbstractAxisMapper xMapper,
AbstractAxisMapper[] yMappers)
Constructs a box zoomer plug-in. |
BoxZoomer(Axis2D axisX,
Axis2D axisY)
Constructs a box zoomer plug-in. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the plug-in. |
void |
deactivate()
Deactivates the plug-in. |
void |
drawZoomRectangle(AbstractGraphics g,
Point2D from,
Point2D to)
Draws a zoom frame with specified left-top and right-bottom corners in the specified Graphics context. |
void |
enableDigitization(Axis2D axisX,
Axis2D axisY)
Enables digitization for the specified axis. |
double |
getZoomMaxScale()
Returns maximum zoom scale in percents. |
boolean |
isBoxProportionable()
Checks if zooming box bounds are kept proportional to chart plotting area. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a chart. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a chart and then dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a chart. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a chart. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a chart (with no buttons no down). |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a chart. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a chart. |
void |
paint(AbstractGraphics g)
If needed paints zoom frame. |
void |
setBoxProportionable(boolean proportionable)
Sets if zooming box bounds should be kept proportional to chart plotting area. |
void |
setZoomMaxScale(double zoomMaxScale)
Sets maximum zoom scale in percents. |
| Methods inherited from class lt.monarch.chart.plugins.AbstractChartPlugin |
|---|
adjustChart, chart, getChart, install, isActivated, uninstall |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BoxZoomer(Axis2D axisX,
Axis2D axisY)
ScrollableAxisMapper mappers installed
for the zoomer to work correctly.
Zooming digitization is enabled for both axis.
axisX - x axis objectaxisY - y axis object
public BoxZoomer(AbstractAxisMapper xMapper,
AbstractAxisMapper yMapper)
xMapper - x axis mapper objectyMapper - y axis mapper object
public BoxZoomer(AbstractAxisMapper xMapper,
AbstractAxisMapper[] yMappers)
xMapper - x axis mapper objectyMappers - y axis mapper object array| Method Detail |
|---|
public void enableDigitization(Axis2D axisX,
Axis2D axisY)
axisX - x axis objectaxisY - y axis objectpublic void activate()
activate in class AbstractChartPlugin<AbstractChart<?,?>>public void deactivate()
deactivate in class AbstractChartPlugin<AbstractChart<?,?>>public void setZoomMaxScale(double zoomMaxScale)
zoomMaxScale - maximum zoom scale value.public double getZoomMaxScale()
public void setBoxProportionable(boolean proportionable)
proportionable - true if zooming box bounds should be kept proportional to chart plotting
area, false otherwisepublic boolean isBoxProportionable()
public void mouseClicked(java.awt.event.MouseEvent e)
"zoomModifiers" flag in the chart
stylesheet the chart is unzoomed.
mouseClicked in interface java.awt.event.MouseListenere - the mouse eventpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenere - the mouse eventpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenere - the mouse eventpublic void mousePressed(java.awt.event.MouseEvent e)
"zoomModifiers" flag in the chart
stylesheet prepares to draw zoom frame.
mousePressed in interface java.awt.event.MouseListenere - the mouse eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenere - the mouse eventpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenere - the mouse eventpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenere - the mouse event
public void drawZoomRectangle(AbstractGraphics g,
Point2D from,
Point2D to)
g - the Graphics context in which to paint zoom framefrom - left-top corner of the frameto - right-bottom corner of the framepublic void paint(AbstractGraphics g)
paint in interface ChartPlugin<AbstractChart<?,?>>paint in class AbstractChartPlugin<AbstractChart<?,?>>g - the Graphics context in which to paint zoom frameChartPlugin.paint(lt.monarch.chart.engine.AbstractGraphics)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||