public abstract class IlvChartDecoration extends IlvChartOwnedDrawable implements Serializable
IlvChart
.
You can control the drawing order of the decoration with the setDrawOrder(int)
method, which lets you specify whether the decoration must be drawn above or below
the chart representations.IlvChart.addDecoration(ilog.views.chart.IlvChartDecoration)
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
IlvChartDecoration()
Initializes a new chart decoration with a drawing order set to
IlvChart.DRAW_BELOW . |
Modifier and Type | Method and Description |
---|---|
void |
afterDraw(Graphics g)
Invoked after the
draw method of all the drawables that
have the same drawing order. |
protected void |
baseTextDirectionChanged()
This method is invoked when the effective base text direction of the chart
has changed.
|
void |
beforeDraw(Graphics g)
Invoked before the
draw method of all the drawables that
have the same drawing order. |
protected void |
chartConnected(IlvChart oldChart,
IlvChart newChart)
Called when the decoration is added to or removed from a chart.
|
protected void |
componentOrientationChanged(ComponentOrientation oldOrientation,
ComponentOrientation newOrientation)
This method is invoked when the component orientation of the chart has
changed.
|
abstract void |
draw(Graphics g)
Draws the decoration into the specified
Graphics context. |
Rectangle2D |
getBounds(Rectangle2D retBounds)
Returns the bounds of this decoration.
|
IlvChart |
getChart()
Returns the chart that displays this decoration.
|
int |
getDrawOrder()
Returns the drawing order of this decoration.
|
boolean |
has3DSupport()
Indicates whether this decoration supports three-dimensional drawing.
|
boolean |
isVisible()
Indicates whether this decoration is visible.
|
void |
repaint()
Requests a repaint of the decoration.
|
void |
setDrawOrder(int drawOrder)
Sets the drawing order of this decoration.
|
void |
setVisible(boolean visible)
Toggles the visibility of this decoration.
|
protected void |
updateBoundsCache()
Updates the bounds cache of this decoration.
|
protected IlvChartDecoration()
IlvChart.DRAW_BELOW
.public boolean has3DSupport()
false
.has3DSupport
in interface IlvChart3DSupport
has3DSupport
in interface IlvChartDrawable
public void beforeDraw(Graphics g)
draw
method of all the drawables that
have the same drawing order. This method can, for example, draw a
filled background.public abstract void draw(Graphics g)
Graphics
context.draw
in interface IlvChartDrawable
public void afterDraw(Graphics g)
draw
method of all the drawables that
have the same drawing order. This method can, for example, draw a kind
of cross cursor.public Rectangle2D getBounds(Rectangle2D retBounds)
getBounds
in interface IlvChartDrawable
retBounds
- A rectangle used to store the result. If this parameter
is null
, a new Rectangle2D
is allocated.protected void updateBoundsCache()
getChart() && isVisible()
is true, or when
getChart() && isVisible()
becomes true.protected void componentOrientationChanged(ComponentOrientation oldOrientation, ComponentOrientation newOrientation)
oldOrientation
- The component orientation before the change.newOrientation
- The component orientation after the change.Component.getComponentOrientation()
protected void baseTextDirectionChanged()
chart.getResolvedBaseTextDirection()
has changed, orchart.getComponentOrientation()
has
changed and the value of
chart.getResolvedBaseTextDirection()
is
IlvBidiUtil.CONTEXTUAL_DIRECTION
.IlvChart.getResolvedBaseTextDirection()
,
Component.getComponentOrientation()
public IlvChart getChart()
null
until the decoration has been
added to a chart with the IlvChart.addDecoration(ilog.views.chart.IlvChartDecoration)
method.getChart
in class IlvChartOwnedDrawable
protected void chartConnected(IlvChart oldChart, IlvChart newChart)
chartConnected
in class IlvChartOwnedDrawable
oldChart
- The chart with which the decoration was associated, or
null
if the decoration is added to a new chart.newChart
- The chart to which the decoration is added, or
null
if the decoration is removed from its current chart.IlvChartOwnedDrawable.getChart()
public void repaint()
public boolean isVisible()
isVisible
in interface IlvChartDrawable
setVisible(boolean)
public void setVisible(boolean visible)
isVisible()
public final int getDrawOrder()
getDrawOrder
in interface IlvChartDrawable
IlvChartDrawable
objects are drawn in ascending drawing
order. The drawing order also specifies whether the object is drawn above
(positive values) or below (negative values) the graphical representations
of the chart data.setDrawOrder(int)
public void setDrawOrder(int drawOrder)
IlvChart.DRAW_ABOVE
,
IlvChart.DRAW_BELOW
,
getDrawOrder()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.