public class IlvChartInfoViewInteractor extends IlvChartHighlightInteractor
The registered name of this interactor is "InfoView".
IlvChartHighlightInteractor
,
Serialized FormIlvChartDataInteractor.DataPicker
HIGHLIGHT_POINT, HIGHLIGHT_SERIES
ITEM_PICKING, NEARESTITEM_PICKING, NEARESTPOINT_PICKING
INTERNAL_HIGH, INTERNAL_LOW, NORMAL
Constructor and Description |
---|
IlvChartInfoViewInteractor()
Creates a new
IlvChartInfoViewInteractor object linked to
the first Y-axis. |
IlvChartInfoViewInteractor(int yAxisIndex)
Creates a new
IlvChartInfoViewInteractor object linked to
the given Y-axis. |
Modifier and Type | Method and Description |
---|---|
protected Point |
adjustPosition(Point point,
Dimension size,
Rectangle rootBounds)
Adjusts the tooltip location so that it fits into the root component
area.
|
protected Point |
computePosition(Dimension tooltipSize,
int x,
int y)
Computes the tooltip location.
|
protected JToolTip |
createToolTip()
Creates a new
JToolTip instance. |
protected void |
doIt(IlvDisplayPoint highlightedPoint,
boolean isHighlighted,
MouseEvent event)
Called by the
processXXXEvent() method when the highlight
state of the given point has changed. |
protected String |
getInfoText(IlvDisplayPoint pt)
Returns the text to be displayed.
|
protected String |
getInfoTextDescriptionPart(IlvDisplayPoint pt)
Returns the first part of the text to be displayed.
|
protected String |
getInfoTextValuePart(IlvDisplayPoint pt)
Returns the second part of the text to be displayed.
|
static String |
getLocalizedName(Locale locale)
Returns a localized name for this interactor class.
|
protected JToolTip |
getToolTip()
Returns the tooltip used by the
InfoView . |
void |
interactionStarted(IlvChartInteractor inter,
MouseEvent event)
Called when the given interactor is about to start an interaction
on the given event.
|
boolean |
isFollowingMouse()
Returns whether the info view follows the mouse moves.
|
boolean |
isHandling(int x,
int y)
Returns whether the mouse event located at the specified
location should be handled by the interactor.
|
protected IlvDisplayPoint |
pickData(IlvChartDataPicker picker)
Returns a display point depending on the given data picker and the
current picking mode.
|
void |
processMouseMotionEvent(MouseEvent event)
Processes a mouse motion event.
|
void |
setFollowingMouse(boolean follow)
Sets whether the info view follows the mouse moves.
|
getHighlightedPoint, getHighlightMode, processMouseEvent, processMouseMovedEvent, setHighlightedPoint, setHighlightMode
createDataPicker, getPickingMode, pickData, setPickingMode
abort, addChartInteractionListener, chartConnected, create, create, disableEvents, drawGhost, drawGhost, enableEvents, endOperation, fireChartInteractionEvent, getAWTEventMask, getChart, getCoordinateSystem, getData, getData, getEventMask, getEventMaskEx, getGhostBounds, getGhostColor, getInteractorClassByName, getLocalizedName, getPriority, getRegisteredInteractorsByName, getShortName, getXAxis, getXORColor, getYAxis, getYAxisIndex, handleExpose, has3DSupport, initGhostGraphics, isAborted, isAllowDrawGhost, isConsumeEvents, isInOperation, isXORGhost, processKeyEvent, register, removeChartInteractionListener, setAborted, setAllowDrawGhost, setChart, setConsumeEvents, setCursor, setEventMask, setGhostColor, setInOperation, setPriority, setXORColor, setXORGhost, setYAxisIndex, startOperation, toDisplay
public IlvChartInfoViewInteractor()
IlvChartInfoViewInteractor
object linked to
the first Y-axis.public IlvChartInfoViewInteractor(int yAxisIndex)
IlvChartInfoViewInteractor
object linked to
the given Y-axis.public static String getLocalizedName(Locale locale)
public boolean isFollowingMouse()
isFollowingMouse()
public void setFollowingMouse(boolean follow)
false
.protected JToolTip getToolTip()
InfoView
. May return
null
if the InfoView
has not been created yet.public boolean isHandling(int x, int y)
true
.isHandling
in class IlvChartHighlightInteractor
public void processMouseMotionEvent(MouseEvent event)
processMouseMotionEvent
in class IlvChartHighlightInteractor
protected void doIt(IlvDisplayPoint highlightedPoint, boolean isHighlighted, MouseEvent event)
processXXXEvent()
method when the highlight
state of the given point has changed. By default, a
ChartHighlightInteractorEvent
is fired.
This method is overridden to show or hide the infoView
,
depending on the highlight state of the point.doIt
in class IlvChartHighlightInteractor
highlightedPoint
- The display point.isHighlighted
- The type of notification that occurred.event
- The mouseEvent
that leads to this notification.IlvChartInteractor.addChartInteractionListener(ilog.views.chart.event.ChartInteractionListener)
,
ChartInteractionEvent
protected String getInfoText(IlvDisplayPoint pt)
pt
- The highlighted point.getInfoTextDescriptionPart(ilog.views.chart.IlvDisplayPoint)
,
getInfoTextValuePart(ilog.views.chart.IlvDisplayPoint)
protected String getInfoTextDescriptionPart(IlvDisplayPoint pt)
pt
- The highlighted point.null
for omitting this part.getInfoText(ilog.views.chart.IlvDisplayPoint)
,
IlvDataSet.getName()
,
IlvTreemapChartRenderer.computeInfoTextDescriptionPart(ilog.views.chart.IlvDisplayObjectArea)
protected String getInfoTextValuePart(IlvDisplayPoint pt)
pt
- The highlighted point.null
for omitting this part.getInfoText(ilog.views.chart.IlvDisplayPoint)
,
IlvChart.formatXValue(double)
,
IlvChart.formatYValue(int, double)
,
IlvTreemapChartRenderer.computeInfoTextValuePart(ilog.views.chart.IlvDisplayObjectArea)
protected JToolTip createToolTip()
JToolTip
instance. This method is called once
when the InfoView
is created. You may override this
method to instantiate your own JToolTip
subclass.protected Point computePosition(Dimension tooltipSize, int x, int y)
tooltipSize
- The tooltip size.x
- The mouse event x coordinatey
- The mouse event y coordinateprotected Point adjustPosition(Point point, Dimension size, Rectangle rootBounds)
point
- The proposed location of the tooltip, relative to the root
area.size
- The size of the tooltip, in pixels.rootBounds
- The root component bounds.public void interactionStarted(IlvChartInteractor inter, MouseEvent event)
interactionStarted
in class IlvChartInteractor
protected IlvDisplayPoint pickData(IlvChartDataPicker picker)
pickData
in class IlvChartDataInteractor
IlvChartDataPicker
,
IlvChartDataInteractor.setPickingMode(int)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.