|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.event.MouseWheelZoomer
public class MouseWheelZoomer
Used for controlling zooming on a Chart component using the mouse wheel.
Field Summary | |
---|---|
static String |
PROPERTY_HORIZONTAL_ZOOM
|
static String |
PROPERTY_MAX_X_RANGE_SIZE
|
static String |
PROPERTY_MAX_Y_RANGE_SIZE
|
static String |
PROPERTY_MIN_X_RANGE_SIZE
|
static String |
PROPERTY_MIN_Y_RANGE_SIZE
|
static String |
PROPERTY_VERTICAL_ZOOM
|
static String |
PROPERTY_X_LIMITS
|
static String |
PROPERTY_Y_LIMITS
|
static String |
PROPERTY_ZOOM_LOCATION
|
Constructor Summary | |
---|---|
MouseWheelZoomer(Chart chart)
Create a zooming facility and apply it to both the X and Y axes of the supplied Chart component. |
|
MouseWheelZoomer(Chart chart,
boolean zoomHorizontally,
boolean zoomVertically)
Use of this constructor allows you to specify a zoom that is on just one of the two axes. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Registers an object that is interested in property changes on this instance |
void |
addZoomListener(ZoomListener listener)
Register an object that is interested in zoom events |
protected void |
fireZoom(ChartSelectionEvent zoomEvent)
|
protected void |
fireZoom(Point zoomPoint,
ZoomDirection direction)
Fire a zoom event to inform listeners of a zoom |
protected void |
fireZoom(Point zoomPoint,
ZoomDirection direction,
double zoomFactor)
Fire a zoom event to inform listeners of a zoom |
Double |
getMaxXRangeSize()
Returns the maximum range size for user coordinates in the x direction |
Double |
getMaxYRangeSize()
Returns the maximum range size for user coordinates in the y direction |
Double |
getMinXRangeSize()
Returns the minimum range size for user coordinates in the x direction |
Double |
getMinYRangeSize()
Returns the minimum range size for user coordinates in the y direction |
Range<?> |
getXLimits()
Returns the current outer limits for the x axis under zooming |
Range<?> |
getYLimits()
Returns the current outer limits of the y axis under zooming |
Point2D |
getZoomFrom()
|
ZoomLocation |
getZoomLocation()
Returns the location used as the origin of a zoom |
boolean |
isHandled()
Indicates whether an event that was received by this listener was handled |
boolean |
isHorizontalZoom()
Returns a boolean to indicate whether zoom is being supported in the horizontal direction |
boolean |
isVerticalZoom()
Returns a boolean to indicate whether zoom is being supported in the vertical direction |
void |
mouseClicked(MouseEvent e)
One of the methods of the MouseHandler interface |
void |
mouseDragged(MouseEvent event)
One of the methods of the MouseHandler interface |
void |
mouseEntered(MouseEvent e)
One of the methods of the MouseHandler interface |
void |
mouseExited(MouseEvent e)
One of the methods of the MouseHandler interface |
void |
mouseMoved(MouseEvent event)
One of the methods of the MouseHandler interface |
void |
mousePressed(MouseEvent e)
One of the methods of the MouseHandler interface |
void |
mouseReleased(MouseEvent e)
One of the methods of the MouseHandler interface |
void |
mouseWheelMoved(MouseWheelEvent event)
An important method that handles the behaviour when the mouse wheel moved. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
De-registers an object that is no longer interested in property changes on this instance |
void |
removeZoomListener(ZoomListener listener)
Remove an object that is registered to receive zoom events |
void |
setHandled(boolean handled)
Specify whether an event that was received by this listener was handled |
void |
setHorizontalZoom(boolean horizontalZoom)
Specify whether the horizontal zoom is active |
void |
setMaxXRangeSize(Double maxXRangeSize)
Specifies the maximum range size for user coordinates in the x direction Used to prevent zooming out too far on a chart |
void |
setMaxYRangeSize(Double maxYRangeSize)
Specifies the maximum range size for user coordinates in the y direction. |
void |
setMinXRangeSize(Double minXRangeSize)
Specifies the minimum range size for user coordinates in the x direction. |
void |
setMinYRangeSize(Double minYRangeSize)
Specifies the minimum range size for user coordinates in the y direction. |
void |
setVerticalZoom(boolean verticalZoom)
Specify whether the vertical zoom is active |
void |
setXLimits(Range<?> xOuterLimits)
Specify the outer limits of the x axis under zooming |
void |
setYLimits(Range<?> yOuterLimits)
Specifies the outer limits of the y axis under zooming |
void |
setZoomFrom(Point2D zoomFrom)
|
void |
setZoomLocation(ZoomLocation zoomLocation)
Specify the location that will be the origin of a zoom. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_HORIZONTAL_ZOOM
public static final String PROPERTY_VERTICAL_ZOOM
public static final String PROPERTY_ZOOM_LOCATION
public static final String PROPERTY_X_LIMITS
public static final String PROPERTY_MIN_X_RANGE_SIZE
public static final String PROPERTY_MAX_X_RANGE_SIZE
public static final String PROPERTY_Y_LIMITS
public static final String PROPERTY_MIN_Y_RANGE_SIZE
public static final String PROPERTY_MAX_Y_RANGE_SIZE
Constructor Detail |
---|
public MouseWheelZoomer(Chart chart)
chart
- the chart to which the zoomer correspondspublic MouseWheelZoomer(Chart chart, boolean zoomHorizontally, boolean zoomVertically)
chart
- the Chart instance to which the zoomer should be addedzoomHorizontally
- whether horizontal zooming should be allowedzoomVertically
- whether vertical zooming should be allowedMethod Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the object to be notified of changespublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the object that is no longer interested in property changespublic boolean isHorizontalZoom()
public void setHorizontalZoom(boolean horizontalZoom)
horizontalZoom
- a boolean to indicate whether a zoom should occur on the
horizontal axispublic boolean isVerticalZoom()
public void setVerticalZoom(boolean verticalZoom)
verticalZoom
- a boolean to indicate whether a zoom should occur on the
vertical axispublic ZoomLocation getZoomLocation()
public void setZoomLocation(ZoomLocation zoomLocation)
zoomLocation
- the origin of a zoompublic Point2D getZoomFrom()
public void setZoomFrom(Point2D zoomFrom)
public Range<?> getXLimits()
public void setXLimits(Range<?> xOuterLimits)
xOuterLimits
- the outer limits of the x axispublic Double getMinXRangeSize()
public void setMinXRangeSize(Double minXRangeSize)
public Range<?> getYLimits()
public void setYLimits(Range<?> yOuterLimits)
yOuterLimits
- the outer limits of the y axispublic Double getMinYRangeSize()
public void setMinYRangeSize(Double minYRangeSize)
public Double getMaxXRangeSize()
public void setMaxXRangeSize(Double maxXRangeSize)
maxXRangeSize
- the maximum size of the x rangepublic Double getMaxYRangeSize()
public void setMaxYRangeSize(Double maxYRangeSize)
maxYRangeSize
- the maximum size of the y rangepublic void addZoomListener(ZoomListener listener)
listener
- the object to be notified of zoom eventspublic void removeZoomListener(ZoomListener listener)
listener
- the listener to removeprotected void fireZoom(Point zoomPoint, ZoomDirection direction)
zoomPoint
- the point at which the zoom occurreddirection
- the direction of the zoomprotected void fireZoom(Point zoomPoint, ZoomDirection direction, double zoomFactor)
zoomPoint
- the point at which the zoom occurreddirection
- the direction of the zoomzoomFactor
- the multiplication factor applied for the zoomprotected void fireZoom(ChartSelectionEvent zoomEvent)
public void mouseDragged(MouseEvent event)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent event)
mouseMoved
in interface MouseMotionListener
public void mouseWheelMoved(MouseWheelEvent event)
mouseWheelMoved
in interface MouseWheelListener
public boolean isHandled()
isHandled
in interface MouseHandler
public void setHandled(boolean handled)
setHandled
in interface MouseHandler
handled
- whether the event was handledpublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |