public class IlvChartEditPointInteractor extends IlvChartDataInteractor
The IlvChartEditPointInteractor
defines two modes of
interaction whether its opaqueEdit
property is enabled or not.
If the property is enabled, the data set modification is "real time": each
mouseMotion
event is immediately translated to a data set
modification and hence cannot be canceled. If the mode is disabled, the
data set modification will only be performed when the interaction ends
(on a MOUSE_RELEASED
event).
Note that this property is not linked to any ghost concepts.
This interactor is not applicable in treemap views.
The registered name of this interactor is "EditPoint".
IlvChartDataInteractor.DataPicker
ITEM_PICKING, NEARESTITEM_PICKING, NEARESTPOINT_PICKING
INTERNAL_HIGH, INTERNAL_LOW, NORMAL
Constructor and Description |
---|
IlvChartEditPointInteractor()
Creates a new
IlvChartEditPointInteractor object associated
with the BUTTON1_DOWN_MASK mouse button with the
opaqueEdit mode disabled. |
IlvChartEditPointInteractor(int eventMask,
boolean opaqueEdit)
Creates a new
IlvChartEditPointInteractor object associated
with the given mouse button with the specified opaqueEdit
mode. |
IlvChartEditPointInteractor(int yAxisIndex,
int eventMask,
boolean opaqueEdit)
Creates a new
IlvChartEditPointInteractor object associated
with the given mouse button with the specified opaqueEdit
mode linked to the given y-axis. |
Modifier and Type | Method and Description |
---|---|
protected void |
abort()
Called when the interaction has been aborted.
|
protected IlvChartDataPicker |
createDataPicker(MouseEvent event)
Creates a new
IlvChartDataPicker object. |
protected void |
drawGhost(Graphics g)
Draws the ghost.
|
protected void |
endOperation(MouseEvent event)
Called when the interaction ends.
|
protected Cursor |
getCursor()
Returns the cursor used by the interactor.
|
IlvDisplayPoint |
getEditPoint()
Returns the point currently being edited.
|
protected Rectangle |
getGhostBounds()
Returns the ghost bounds.
|
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.
|
void |
interactionStarted(IlvChartInteractor inter,
MouseEvent event)
Called when the given interactor is about to start an interaction
on the given event.
|
boolean |
isHandling(int x,
int y)
Returns whether the mouse event that occurred at the specified
location should be handled by the interactor.
|
boolean |
isOpaqueEdit()
Returns whether the
opaqueEdit mode is enabled. |
boolean |
isXEditAllowed()
Returns whether modification along the x-axis is allowed.
|
boolean |
isYEditAllowed()
Returns whether modification along the y-axis is allowed.
|
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 |
processMouseMovedEvent(MouseEvent event)
Handles a mouse motion event with no button pressed.
|
void |
setOpaqueEdit(boolean opaque)
Sets whether the
opaqueEdit mode is enabled. |
void |
setXEditAllowed(boolean edit)
Sets whether modification along the x-axis is allowed.
|
void |
setYEditAllowed(boolean edit)
Sets whether modification along the y-axis is allowed.
|
protected void |
startOperation(MouseEvent event)
Called when the interaction starts.
|
protected void |
validate(IlvDoublePoints pt,
IlvDisplayPoint dpt)
Called to validate the new position.
|
getPickingMode, pickData, pickData, setPickingMode
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, isAborted, isAllowDrawGhost, isConsumeEvents, isInOperation, isXORGhost, register, removeChartInteractionListener, setAborted, setAllowDrawGhost, setChart, setConsumeEvents, setCursor, setEventMask, setGhostColor, setInOperation, setPriority, setXORColor, setXORGhost, setYAxisIndex, toDisplay
public IlvChartEditPointInteractor()
IlvChartEditPointInteractor
object associated
with the BUTTON1_DOWN_MASK
mouse button with the
opaqueEdit
mode disabled.public IlvChartEditPointInteractor(int eventMask, boolean opaqueEdit)
IlvChartEditPointInteractor
object associated
with the given mouse button with the specified opaqueEdit
mode.public IlvChartEditPointInteractor(int yAxisIndex, int eventMask, boolean opaqueEdit)
IlvChartEditPointInteractor
object associated
with the given mouse button with the specified opaqueEdit
mode linked to the given y-axis.public static String getLocalizedName(Locale locale)
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 data set. If
true
, each mouse event corresponds to an immediate data set
modification. If false
, the modification occurs when the
interaction ends. The default value is false
.public final boolean isXEditAllowed()
public void setXEditAllowed(boolean edit)
false
.public final boolean isYEditAllowed()
public void setYEditAllowed(boolean edit)
true
.protected Cursor getCursor()
protected void drawGhost(Graphics g)
drawGhost
in class IlvChartInteractor
protected Rectangle getGhostBounds()
getGhostBounds
in class IlvChartInteractor
public boolean isHandling(int x, int y)
isHandling
in class IlvChartInteractor
public IlvDisplayPoint getEditPoint()
isOpaqueEdit()
public void processMouseEvent(MouseEvent event)
processMouseEvent
in class IlvChartInteractor
public void processMouseMotionEvent(MouseEvent event)
processMouseMotionEvent
in class IlvChartInteractor
public void processMouseMovedEvent(MouseEvent event)
event
- An event of type MOUSE_MOVED
or
MOUSE_ENTERED
.public void processKeyEvent(KeyEvent event)
processKeyEvent
in class IlvChartInteractor
protected void validate(IlvDoublePoints pt, IlvDisplayPoint dpt)
pt
- The new position to validate (in data coordinate system).dpt
- The display point being modified.public boolean has3DSupport()
has3DSupport
in interface IlvChart3DSupport
has3DSupport
in class IlvChartInteractor
false
.public void interactionStarted(IlvChartInteractor inter, MouseEvent event)
interactionStarted
in class IlvChartInteractor
protected IlvChartDataPicker createDataPicker(MouseEvent event)
IlvChartDataPicker
object.
The IlvChartEditPointInteractor
class uses a data picker that
looks for editable data sets.
createDataPicker
in class IlvChartDataInteractor
IlvDefaultChartDataPicker
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 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.