Callback-Related Methods

getDataGridCallback()

This method returns the TDGDataGrid interface defined by the setDataFromDataGrid() method.

SYNTAX:

TDGDataGrid getDataGridCallback();

INPUT:

None

RETURN:

TDGDataGrid; TDGDataGrid interface

ALSO SEE:

setDataFromDataGrid()

get/setNumberFormatCallBack()

The getNumberFormatCallback() method can be used to determine if a number format callback object has been assigned with setNumberFormatCallBack(). The setNumberFormatCallback() method registers a "number format callback" object. The assigned object will be called by Perspective's custom number formatting code.

SYNTAX:

NumberFormatCallBack getNumberFormatCallBack();
void setNumberFormatCallBack (NumberFormatCallBack numberFormattingObject);

INPUT:

numberFormattingObject: a number format call back object

RETURN:

NumberFormatCallBack; Non-Zero = number format callback assigned by setNumberFormatCallBack(), Null = None assigned.

ALSO SEE:

CustomNumberFormatting.Java, TestNumberFormatCallBack.Java

get/setO1LabelCallback()

If your application uses nested labels on the group axis, getO1LabelCallback() can be used to determine if a callback method has been assigned. setO1LabelCallBack() is used to assign a call back function to handle the nested label functions that are enabled by the NestedLabels property. This function must implement all of the abstract methods in TDGNestedLabel.Java. They are:

abstract int getNumLevels();
abstract int getNumLabelsOnLevel (int nLevel);
abstract Vector getAllLabels (int nLevel);
abstract String getLabel (int nGroup, int nLevel);
abstract int getLabelGrouping (int nGroup, int nLevel);

SYNTAX:

TDGNestedLabel getO1LabelCallBack();
void setO1LabelCallback (TDGNestedLabel cb);

INPUT:

cb: a nested labels call back object

RETURN:

TDGNestedLabel; Non-Zero = the O1 Label Call Back object assigned with setO1LabelCallBack(), Null = none assigned

ALSO SEE:

NestedLabels

get/setToolTipCallBack()

The setToolTipCallBack() method can be used to register a "tooltip callback" object. This object will be called by the Perspective tool tip code. In order to use this feature, you must implement the ToolTipCallBack interface (see ToolTipCallBack.Java). The getToolTipCallBack() method can be used to determine if a tool tip call back object has been assigned with setToolTipCallBack().

SYNTAX:

ToolTipCallBack getToolTipCallBack();
void setToolTipCallBack (ToolTipCallBack toolTipObject);

INPUT:

toolTipObject; a tooltip callback object

RETURN:

ToolTipCallBack; A tool tip call back object

isNumberFormatCallBack()

This method can be used to determine if a number format callback object has been assigned with the setNumberFormatCallBack() method. It returns true if the number format callback has been registered. Perspective uses it to determine whether to ask the number format callback for formatting, or to do it using the standard (non-custom) formatting.

SYNTAX:

boolean isNumberFormatCallBack();

INPUT:

None

RETURN:

boolean: true = a valid number format callback object has been assigned with setNumberFormatCallback(), false = a number format callback object has not been assigned.

ALSO SEE:

get/setNumberFormatCallBack()

isToolTipCallBack()

This method can be used to determine if a tool tip callback object has been assigned with the setToolTipCallBack() method. It returns true if the tool tip callback has been registered. Perspective uses it to determine whether to ask the number tool tip callback for formatting, or to do it using the standard (non-custom) formatting.

SYNTAX:

boolean isToolTipCallBack();

INPUT:

None

RETURN:

boolean: true = a tool tip call back object has been assigned, false = a tool tip call back is not present

ALSO SEE:

get/setToolTipCallBack()

setDataFromCallBack()

This method enables the chart data to be slaved to an arbitrary Java Object that implements the TDGDataGrid Interface. When a "callback" is in effect and the chart needs to redraw (e.g., after a property is changed), the chart will query the isDirty() method of the Java Object. If true, Perspective will call several other methods on the Java Object to gather all data required to draw. The Java Object may be a remote object through Remote Method Invocation (RMI) or may obtain data through JDBC or any other means as long as it implements the TDGDataGrid Interface.

SYNTAX:

void setDataFromCallBack (TDGDataGrid grid);

INPUT:

grid; This parameter should identify an interface that represents an abstract data model. The data model defines a way of preparing data for graphing.

RETURN:

void

ALSO SEE:

setDataFromDataGrid()