Selection List Methods

get/setSelection()

The getSelection() method returns a Vector of "selection objects" (class SelectionObj). This list represents everything that is selected at the time this method is called.

The setSelection() method can be used to select part of a chart at the API level without using the mouse. For example, you could select the frame by using:

getSelection (getFrame());

In some cases, this will require providing a series, group, or both as shown in the following example:

getSelection (getBarRiser (s, g));

SYNTAX:

Vector getSelection();
void setSelection (IdentObj id);
void setSelection (IdentObj id, boolean bAdd);
void setSelection (IdentObj id, boolean bAdd, boolean bSelectRelatedObjects); 
void setSelection (java.util.Vector vList);

INPUT:

id; Object ID returned by a getObjectID() method (eg., getX1Axis())

bAdd; true = add object to the selection list, false = do not add object

bSelectRelatedObject; true = select related objects, false = do not select

RETURN:

Vector; Selection list

EXAMPLE:

setSelection (getBarRiser (0, 0));
setFillColor (new Color (0, 0, 0));
setDepthRadius (0);

ALSO SEE:

getSelectionID(), setNoSelection()

getSelectionBorderColor()

This method returns the border color of the first item in the selection list.

SYNTAX:

Color getSelectionBorderColor();

INPUT:

None

RETURN:

Color; the border color of the first item in the selection list.

ALSO SEE:

get/setBorderColor(), get/setTransparentBorderColor(), isSelectionBorderColorTransparent()

getSelectionFillColor()

This method returns the fill color of the first item in the selection list.

SYNTAX:

Color getSelectionFillColor();

INPUT:

None

RETURN:

Color; the fill color of the first item in the selection list.

ALSO SEE:

get/setFillColor(), get/setTransparentFillColor(), isSelectionFillColorTransparent()

getSelectionLineWidth()

This method returns the width of the first item in the selection list if the item is a line object.

SYNTAX:

int getSelectionLineWidth();

INPUT:

None

RETURN:

int; A value greater than zero indicates the first item in the selection list is a line object and identifies the width of the line. A value of zero indicates the first item in the selection list is not a line object.

ALSO SEE:

getSelectionID(), getSelectionSize(),

getSelectionSize()

This method returns the size of the first item in the selection list.

SYNTAX:

int getSelectionSize();

INPUT:

None

RETURN:

int; The size of the first item in the selection list (if any)

ALSO SEE:

getSelectionID(), getSelectionBorderColor(), getSelectionFillColor(), getSelectionLineWidth()

getSelGroup()

This method returns the number of the group that is currently selected (if any).

SYNTAX:

int getSelGroup();

INPUT:

None

RETURN:

int; The number of the group that is currently selected

ALSO SEE:

getSelSeries()

getSelSeries()

This method returns the number of the series currently selected (if any) in a chart.

SYNTAX:

int getSelSeries();

INPUT:

None

RETURN:

int; The number of the series that is currently selected

ALSO SEE:

getSeries(), getSeriesGroup()

isSelection()

This method can be used to determine whether or not there are any items in the selection list.

SYNTAX:

boolean isSelection();

INPUT:

None

RETURN:

boolean; true = there are one or more items in the selection list, false = no items in selection list.

ALSO SEE:

isSelectionBorderColorTransparent(), isSelectionCube(), isSelectionDataLabel(), isSelectionFillColorTransparent(), isSelectionGridLine(), isSelectionLine(), isSelectionRiser(), isSelectionSeriesRelated(), isSelectionText()

isSelectionBorderColorTransparent()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list has a transparent border color.

SYNTAX:

boolean isSelectionBorderColorTransparent();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a transparent border color, false = the first item in the selection list is not a transparent border color

ALSO SEE:

isSelection(), isSelectionFillColorTransparent()

isSelectionCube()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a 3D cube.

SYNTAX:

boolean isSelectionCube();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a 3D cube, false = the first item in the selection list is not a 3D cube

ALSO SEE:

isSelection()

isSelectionDataLabel()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a data label object.

SYNTAX:

boolean isSelectionDataLabel();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a data label object, false = the first item in the selection list is not a data label object

ALSO SEE:

isSelection()

isSelectionFillColorTransparent()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a transparent fill color.

SYNTAX:

boolean isSelectionFillColorTransparent();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a transparent fill color, false = the first item in the selection list is not a transparent fill color

ALSO SEE:

isSelection(), isSelectionBorderColorTransparent()

isSelectionGridLine()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a grid line object.

SYNTAX:

boolean isSelectionGridLine();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a grid line object, false = the first item in the selection list is not a grid line object

ALSO SEE:

isSelection()

isSelectionLegend()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is the legend area.

SYNTAX:

boolean isSelectionLegend();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is the legend area, false = the first item in the selection list is not the legend area

ALSO SEE:

isSelection()

isSelectionLine()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a line object.

SYNTAX:

boolean isSelectionLine();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a line object, false = the first item in the selection list is not a line object

ALSO SEE:

isSelection()

isSelectionRiser()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a riser object.

SYNTAX:

boolean isSelectionRiser();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a riser object, false = the first item in the selection list is not a riser object

ALSO SEE:

isSelection()

isSelectionSeriesRelated()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is associated with a series.

SYNTAX:

boolean isSelectionSeriesRelated();

INPUT:

None

RETURN:

boolean; true = first item in selection is series related, false = item is not associated with a series.

ALSO SEE:

isSelection()

isSelectionText()

If isSelection() returns true, this method can be used to determine whether or not the first item in the selection list is a text object (i.e., an object with valid font properties).

SYNTAX:

boolean isSelectionText();

INPUT:

None

RETURN:

boolean; true = the first item in the selection list is a text object, false = the first item in the selection list is not a text object

ALSO SEE:

isSelection()

setNoSelection()

This method de-selects all objects in the selection list.

SYNTAX:

void setNoSelection()

INPUT:

None

RETURN:

void;

ALSO SEE:

getSelection()