public class IlvChartAreaSelectionManager extends Object implements Serializable
The rendering of the selection can be done in three ways:
IlvDataRenderingHint
.IlvChartCycleSelectInteractor
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
SHOW_HANDLES
The rendering mode that shows handles around the selected element.
|
static int |
SHOW_HIGHLIGHT
The rendering mode that shows the selected element through a rendering hint,
such as with a brighter color.
|
static int |
USE_CSS
The rendering mode that shows the selected elements according to CSS rules
with a given CSS pseudo-class.
|
Constructor and Description |
---|
IlvChartAreaSelectionManager()
Creates a selection manager.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(IlvChart chart)
Attaches this selection manager to a chart.
|
void |
detach()
Detaches this selection manager from its chart.
|
void |
dispose()
Detaches this selection manager from the chart and cleans it up, to
help garbage collection.
|
IlvChart |
getChart()
Returns the chart to which this selection manager is currently connected
to, or
null for none. |
IlvHandlesSelectionStyle |
getHandlesSelectionStyle()
Returns the graphic style parameters used for drawing a selection using
handles.
|
IlvDataRenderingHint |
getRenderingHint()
Returns the rendering hint through which the selection is displayed.
|
int |
getRenderingMode()
Returns the rendering mode for the selection.
|
String |
getRenderingPseudoClass()
Returns the CSS pseudo-class through which the selection is displayed.
|
IlvChartAreaAccessible |
getSelection()
Returns the currently selected element, or
null for none. |
void |
setHandlesSelectionStyle(IlvHandlesSelectionStyle style)
Sets the graphic style parameters used for drawing a selection using
handles.
|
protected void |
setRenderingAsSelected(IlvChartAreaAccessible elem,
boolean enable)
Enables or disables the rendering of the given element as selected.
|
void |
setRenderingHint(IlvDataRenderingHint hint)
Sets the rendering hint through which the selection is displayed.
|
void |
setRenderingMode(int mode)
Specifies the rendering mode for the selection.
|
void |
setRenderingPseudoClass(String pseudoClass)
Sets the CSS pseudo-class through which the selection is displayed.
|
void |
setSelection(IlvChartAreaAccessible selection)
Determines which element shall be selected.
|
public static final int SHOW_HANDLES
setRenderingMode(int)
,
Constant Field Valuespublic static final int SHOW_HIGHLIGHT
Note: The visual impression of a highlighted color depends on the area filled with that color. Therefore this rendering mode is more suitable for area charts, pie charts, and treemap charts, than for polyline charts.
setRenderingMode(int)
,
Constant Field Valuespublic static final int USE_CSS
setRenderingMode(int)
,
Constant Field Valuespublic IlvChartAreaSelectionManager()
public final IlvChart getChart()
null
for none.public void attach(IlvChart chart)
public void detach()
public int getRenderingMode()
SHOW_HANDLES
, SHOW_HIGHLIGHT
,
USE_CSS
.getRenderingHint()
,
getRenderingPseudoClass()
public void setRenderingMode(int mode)
When you call setRenderingMode(USE_CSS)
, you also need to
call setRenderingPseudoClass(String)
and provide a CSS style sheet
that contains rules that are specific to that pseudo-class.
mode
- One of SHOW_HANDLES
, SHOW_HIGHLIGHT
,
USE_CSS
.setHandlesSelectionStyle(IlvHandlesSelectionStyle)
,
setRenderingHint(IlvDataRenderingHint)
,
setRenderingPseudoClass(String)
public IlvHandlesSelectionStyle getHandlesSelectionStyle()
public void setHandlesSelectionStyle(IlvHandlesSelectionStyle style)
Note: This method has no effect as long as
getRenderingMode()
returns a value different from
SHOW_HANDLES
.
getHandlesSelectionStyle()
,
setRenderingMode(int)
public IlvDataRenderingHint getRenderingHint()
setRenderingHint(IlvDataRenderingHint)
public void setRenderingHint(IlvDataRenderingHint hint)
Note: This method has no effect as long as
getRenderingMode()
returns a value different from
SHOW_HIGHLIGHT
.
getRenderingHint()
,
setRenderingMode(int)
public String getRenderingPseudoClass()
setRenderingPseudoClass(String)
public void setRenderingPseudoClass(String pseudoClass)
Note: This method has no effect as long as
getRenderingMode()
returns a value different from
USE_CSS
.
getRenderingPseudoClass()
,
setRenderingMode(int)
protected void setRenderingAsSelected(IlvChartAreaAccessible elem, boolean enable)
public IlvChartAreaAccessible getSelection()
null
for none.public void setSelection(IlvChartAreaAccessible selection)
selection
- An element, or null
to deselect the previous
selection.public void dispose()
Note: After calling this function, this selection manager is no longer functional.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.