public class IlvChartDataIndicatorInteractor extends IlvChartInteractor
IlvDataIndicator
.
The IlvChartDataIndicatorInteractor
class provides the
following facilities to graphically modify the definition of a data
indicator:
The IlvChartDataIndicatorInteractor
defines two modes of
interaction whether its opaqueEdit
property is enabled or not.
If the property is enabled, the indicator modification is "real time": each
mouseMotion
event immediately modifies the indicator values
and hence cannot be canceled. If the mode is disabled, the indicator
modification will only be performed when the interaction ends (on a
MOUSE_RELEASED
event).
The registered name of this interactor is "DataIndicator".
INTERNAL_HIGH, INTERNAL_LOW, NORMAL
Constructor and Description |
---|
IlvChartDataIndicatorInteractor()
Creates a new
IlvChartDataIndicatorInteractor object
associated to the BUTTON1_DOWN_MASK mouse button with the
opaqueEdit mode disabled. |
IlvChartDataIndicatorInteractor(int yAxisIdx,
int buttonOrKeyEventMask,
boolean opaqueEdit)
Creates a new
IlvChartEditPointInteractor object associated
with the given mouse button linked to the given Y-axis. |
Modifier and Type | Method and Description |
---|---|
protected void |
abort()
Called when the interaction has been aborted.
|
protected void |
drawGhost(Graphics g)
Draws the ghost.
|
protected void |
endOperation(MouseEvent event)
Called when the interaction ends.
|
protected Rectangle |
getGhostBounds()
Returns the ghost bounds.
|
protected IlvDataIndicator |
getIndicator()
Returns the indicator that is being dragged.
|
static String |
getLocalizedName(Locale locale)
Returns a localized name for this interactor class.
|
boolean |
has3DSupport()
Indicates whether the interactor can be used with a 3D chart.
|
boolean |
isOpaqueEdit()
Returns whether the
opaqueEdit mode is enabled. |
void |
processKeyEvent(KeyEvent event)
Handles the key event.
|
void |
processMouseEvent(MouseEvent event)
Handles the mouse events.
|
void |
processMouseMotionEvent(MouseEvent event)
Handles the mouse motion events.
|
void |
setOpaqueEdit(boolean opaque)
Sets whether the
opaqueEdit mode is enabled. |
protected void |
startOperation(MouseEvent event)
Called when the interaction starts.
|
protected void |
validate(IlvDoublePoint pt)
Called to validate the new position.
|
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 IlvChartDataIndicatorInteractor()
IlvChartDataIndicatorInteractor
object
associated to the BUTTON1_DOWN_MASK mouse button with the
opaqueEdit
mode disabled.public IlvChartDataIndicatorInteractor(int yAxisIdx, int buttonOrKeyEventMask, boolean opaqueEdit)
IlvChartEditPointInteractor
object associated
with the given mouse button linked to the given Y-axis.public static String getLocalizedName(Locale locale)
protected final IlvDataIndicator getIndicator()
public final boolean isOpaqueEdit()
opaqueEdit
mode is enabled.setOpaqueEdit(boolean)
public void setOpaqueEdit(boolean opaque)
opaqueEdit
mode is enabled. This property
defines how the modifications are propagated to the indicator. If
true
, each mouse event corresponds to an immediate indicator
modification. If false
, the modification occurs when the
interaction ends. The default value is false
.protected void drawGhost(Graphics g)
drawGhost
in class IlvChartInteractor
protected Rectangle getGhostBounds()
getGhostBounds
in class IlvChartInteractor
protected void validate(IlvDoublePoint pt)
pt
- The new position to validate (in data coordinate system).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
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.