public class IlvChartZoomInteractor extends IlvChartInteractor
The registered name of this interactor is "Zoom".
IlvChartInteractor
,
Serialized FormINTERNAL_HIGH, INTERNAL_LOW, NORMAL
Constructor and Description |
---|
IlvChartZoomInteractor()
Creates a new
IlvChartZoomInteractor object with the zoom
interaction associated with the BUTTON1 mouse button and the
zoomOut modifier set on the SHIFT modifier and linked to
the first Y-axis. |
IlvChartZoomInteractor(int zoomInEventMask,
int zoomOutEventMask)
Creates a new
IlvChartZoomInteractor object linked to the
first y-axis. |
IlvChartZoomInteractor(int yAxisIndex,
int zoomInEventMask,
int zoomOutEventMask)
Creates a new
IlvChartZoomInteractor object. |
Modifier and Type | Method and Description |
---|---|
protected void |
abort()
Called when the interaction has been aborted.
|
protected void |
doIt()
Called when the interaction ends to perform the zoom.
|
protected void |
drawGhost(Graphics g)
Draws the ghost.
|
protected void |
endOperation(MouseEvent event)
Called when the interaction ends.
|
int |
getAnimationStep()
Returns the number of animation step.
|
protected IlvDataWindow |
getDraggedWindow()
Returns the current dragged data window.
|
protected Rectangle |
getGhostBounds()
Returns the ghost bounds.
|
static String |
getLocalizedName(Locale locale)
Returns a localized name for this interactor class.
|
protected IlvDataWindow |
getZoomedDataWindow()
Returns the current zoomed data window.
|
protected Cursor |
getZoomInCursor()
Returns the
zoomIn mouse cursor. |
int |
getZoomInEventMask()
Returns the zoom in event mask.
|
int |
getZoomInEventMaskEx()
Returns the zoom in event mask, according to the conventions of
java.awt.event.InputEvent.getModifiersEx() . |
protected Cursor |
getZoomOutCursor()
Returns the
zoomOut mouse cursor. |
int |
getZoomOutEventMask()
Returns the zoom out event mask.
|
int |
getZoomOutEventMaskEx()
Returns the zoom out event mask, according to the conventions of
java.awt.event.InputEvent.getModifiersEx() . |
boolean |
has3DSupport()
Indicates whether the interactor can be used with a 3D chart.
|
protected boolean |
isValid(MouseEvent event)
Returns whether the given event is valid to start the interaction.
|
protected boolean |
isValidStartPoint(double x,
double y)
Returns whether the given point is a valid point to handle.
|
boolean |
isXZoomAllowed()
Returns whether zooming along the X-axis is allowed.
|
boolean |
isYZoomAllowed()
Returns whether zooming along the Y-axis is allowed.
|
protected boolean |
isZoomingOut()
Returns whether the interactor is in a
zoomOut process. |
boolean |
isZoomOutAllowed()
Returns whether zooming out is allowed.
|
void |
processKeyEvent(KeyEvent event)
Handles the key events.
|
void |
processMouseEvent(MouseEvent event)
Handles the mouse events.
|
void |
processMouseMotionEvent(MouseEvent event)
Handles the mouse motion events.
|
void |
setAnimationStep(int step)
Sets the number of animation step.
|
void |
setXZoomAllowed(boolean allow)
Sets whether zooming along the X-axis is allowed.
|
void |
setYZoomAllowed(boolean allow)
Sets whether zooming along the Y-axis is allowed.
|
void |
setZoomInEventMask(int zoomInEventMask)
Sets the zoom in event mask.
|
void |
setZoomOutAllowed(boolean allow)
Sets whether zooming out is allowed.
|
void |
setZoomOutEventMask(int zoomOutEventMask)
Sets the zoom out event mask.
|
protected void |
startOperation(MouseEvent event)
Called when the interaction starts.
|
protected void |
validate(IlvDataWindow draggedDataWindow)
Called to validate the current dragged
dataWindow . |
addChartInteractionListener, chartConnected, create, create, disableEvents, drawGhost, enableEvents, fireChartInteractionEvent, getAWTEventMask, getChart, getCoordinateSystem, getData, getData, getEventMask, getEventMaskEx, getGhostColor, getInteractorClassByName, getLocalizedName, getPriority, getRegisteredInteractorsByName, getShortName, getXAxis, getXORColor, getYAxis, getYAxisIndex, handleExpose, initGhostGraphics, interactionStarted, isAborted, isAllowDrawGhost, isConsumeEvents, isHandling, isInOperation, isXORGhost, register, removeChartInteractionListener, setAborted, setAllowDrawGhost, setChart, setConsumeEvents, setCursor, setEventMask, setGhostColor, setInOperation, setPriority, setXORColor, setXORGhost, setYAxisIndex, toDisplay
public IlvChartZoomInteractor()
IlvChartZoomInteractor
object with the zoom
interaction associated with the BUTTON1 mouse button and the
zoomOut
modifier set on the SHIFT modifier and linked to
the first Y-axis.public IlvChartZoomInteractor(int zoomInEventMask, int zoomOutEventMask)
IlvChartZoomInteractor
object linked to the
first y-axis.zoomInEventMask
- The event mask used to zoom in.zoomOutEventMask
- The event mask used to zoom out.public IlvChartZoomInteractor(int yAxisIndex, int zoomInEventMask, int zoomOutEventMask)
IlvChartZoomInteractor
object.yAxisIndex
- The y-axis index.zoomInEventMask
- The event mask used to zoom in.zoomOutEventMask
- The event mask used to zoom out.public static String getLocalizedName(Locale locale)
public final int getZoomOutEventMask()
setZoomOutEventMask(int)
,
getZoomOutEventMaskEx()
public final int getZoomOutEventMaskEx()
java.awt.event.InputEvent.getModifiersEx()
. This mask
is computed from getZoomOutEventMask()
.getZoomOutEventMask()
,
setZoomOutEventMask(int)
public void setZoomOutEventMask(int zoomOutEventMask)
Note: In the mask,
InputEvent.BUTTON2_DOWN_MASK
should be used instead of InputEvent.BUTTON2_MASK
, and
InputEvent.BUTTON3_DOWN_MASK
should be used instead of InputEvent.BUTTON3_MASK
,
because the values of ALT_MASK/BUTTON2_MASK
and
META_MASK/BUTTON3_MASK
overlap.
getZoomOutEventMask()
public int getZoomInEventMask()
setZoomInEventMask(int)
,
getZoomInEventMaskEx()
public int getZoomInEventMaskEx()
java.awt.event.InputEvent.getModifiersEx()
. This mask
is computed from getZoomOutEventMask()
.getZoomInEventMask()
,
setZoomInEventMask(int)
public void setZoomInEventMask(int zoomInEventMask)
Note: In the mask,
InputEvent.BUTTON2_DOWN_MASK
should be used instead of InputEvent.BUTTON2_MASK
, and
InputEvent.BUTTON3_DOWN_MASK
should be used instead of InputEvent.BUTTON3_MASK
,
because the values of ALT_MASK/BUTTON2_MASK
and
META_MASK/BUTTON3_MASK
overlap.
getZoomInEventMask()
public final int getAnimationStep()
public void setAnimationStep(int step)
zero
disables
the animation. The default value is 10.public final boolean isXZoomAllowed()
public void setXZoomAllowed(boolean allow)
true
.public final boolean isYZoomAllowed()
public void setYZoomAllowed(boolean allow)
false
.public boolean isZoomOutAllowed()
setZoomOutAllowed(boolean)
public void setZoomOutAllowed(boolean allow)
true
.protected boolean isZoomingOut()
zoomOut
process.protected final IlvDataWindow getDraggedWindow()
protected IlvDataWindow getZoomedDataWindow()
protected Cursor getZoomInCursor()
zoomIn
mouse cursor.protected Cursor getZoomOutCursor()
zoomOut
mouse cursor.protected void drawGhost(Graphics g)
drawGhost
in class IlvChartInteractor
protected Rectangle getGhostBounds()
getGhostBounds
in class IlvChartInteractor
protected boolean isValid(MouseEvent event)
event
- A MouseEvent
of type MOUSE_PRESSED
.public void processMouseEvent(MouseEvent event)
processMouseEvent
in class IlvChartInteractor
public void processMouseMotionEvent(MouseEvent event)
processMouseMotionEvent
in class IlvChartInteractor
public void processKeyEvent(KeyEvent event)
processKeyEvent
in class IlvChartInteractor
protected boolean isValidStartPoint(double x, double y)
true
.protected void validate(IlvDataWindow draggedDataWindow)
dataWindow
. The default
implementation does nothing.protected void doIt()
public boolean has3DSupport()
has3DSupport
in interface IlvChart3DSupport
has3DSupport
in class IlvChartInteractor
false
.protected void startOperation(MouseEvent event)
startOperation
in class IlvChartInteractor
event
- The event that starts the interaction.IlvChartInteractor.interactionStarted(ilog.views.chart.IlvChartInteractor, java.awt.event.MouseEvent)
protected void endOperation(MouseEvent event)
endOperation
in class IlvChartInteractor
event
- The event that ends the interaction.protected void abort()
abort
in class IlvChartInteractor
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.