Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

oracle.dss.graph
Class ToolTipTextCallback

java.lang.Object
  extended by oracle.dss.graph.ToolTipTextCallback

public class ToolTipTextCallback
extends java.lang.Object

The callback that provides tooltips to PFJ to display in the graph. Implements ToolTipCallback interface in PFJ. Application developers should not call the methods in this class.

To change the tooltips that are displayed for the graph, you can call Graph methods that affect the display of tooltips, or you can provide an implementation of the CustomToolTipCallback interface and then register the callback by calling Graph.setCustomToolTipCallback. This class calls the CustomToolTipCallback implementation, if one has been registered with the Graph, to get tool tips.

See Also:
Graph.setGroupTooltipLabelType(int), Graph.setMarkerTooltipType(int), Graph.setSeriesTooltipLabelType(int), Graph.setToolTipDelay(int), Graph.setCustomToolTipCallback(oracle.dss.graph.CustomToolTipCallback)

Nested Class Summary
protected  class ToolTipTextCallback.DimValuePairs
           
 
Field Summary
protected  boolean m_AxisLabelTipDisplayed
           
protected  int m_ColID
           
protected  CommonGraph m_commonGraph
           
protected  boolean m_CumValTip
           
protected  CustomToolTipCallback m_customToolTipCallback
           
protected  DataAccess m_dataAccess
           
protected  int m_DataValuesPerMarker
           
protected  java.lang.String m_DimMemberNameType
           
protected  java.lang.String m_DimNameType
           
protected  boolean m_excelOrDeskTop
           
protected  GraphFormatManager m_fmtMgr
           
protected  boolean m_GraphIsOpenAndClose
           
protected  boolean m_GraphIsPieBar
           
protected  boolean m_GraphIsSingleY
           
protected  boolean m_GraphIsStacked
           
protected  int m_GroupID
           
protected  boolean m_MarkerTipDisplayed
           
protected  int m_MarkerTipType
           
protected  java.lang.String m_markerTooltipTemplate
           
protected  java.lang.String m_measureDim
           
protected  GraphNumberFormatCallback m_numFormatCallback
           
protected  int m_ObjectID
           
protected  boolean m_PercentTip
           
protected  int m_RowID
           
protected  boolean m_SeriesAreRows
           
protected  int m_SeriesID
           
protected  boolean m_ShowColDimName
           
protected  boolean m_ShowGroupLabels
           
protected  boolean m_ShowRowDimName
           
protected  boolean m_ShowSeriesLabels
           
protected  boolean m_TextTip
           
protected  int m_TipGroupLabelType
           
protected  int m_TipSeriesLabelType
           
protected  int m_ValuesPerGroup
           
protected  boolean m_ValueTip
           
protected  java.util.ResourceBundle rBundle
           
 
Constructor Summary
ToolTipTextCallback(CommonGraph graph, GraphNumberFormatCallback numFormatCallback)
          Constructor.
 
Method Summary
protected  void addSliceLabelInfoToTooltip()
          if the graph is in ADA mode, add supplement information to tooltips for pie graph, add information to tooltip from slice label if they are different
protected  int calcDateFreq(java.util.Date date)
           
 java.lang.String convertDateToString(java.lang.Object obj)
           
protected  java.lang.String formatDate(java.util.Date date, int dateFreq)
           
 int getColID(int series, int group)
           
 java.lang.String getColumnLabels(int row, int col)
          Retrieves the label for a column.
protected  java.util.Vector getCommonDimensionsWithNoDuplicats(java.util.Vector QDRDimValuePairs)
           
 CustomToolTipCallback getCustomToolTipCallback()
           
 void getDataAccess()
          Retrieves the current DataAccess for the graph.
 int getDataValuesPerMarker()
           
protected  java.lang.String getDefaultLabels(int row, int col, int edge, boolean showDimName, boolean series)
           
 java.lang.String getDynamicToolTip(oracle.dss.graph.pfj.TDGMouseState aMouseState, boolean UserOrDeveloper)
          Retrieves the text to display in a tooltip.
 java.lang.String getFormattedValue(double dVal, int axis, boolean isPercent, boolean isPieSlice)
          Retrieves a formatted data value.
 int getGroupTooltipLabelType()
          Retrieves the kind of information that is displayed in tooltips for groups.
protected  java.lang.String getLabels(int row, int col, int edge, boolean showDimName, boolean series)
           
 int getMarkerTooltipType()
          Retrieves the kind of information that is displayed in tooltips for data markers.
protected  java.lang.String getReferenceObjectShortDesc(oracle.dss.graph.pfj.draw.IdentObj id)
          Gets the reference object short description
 int getRowID(int series, int group)
           
 java.lang.String getRowLabels(int row, int col)
          Retrieves the label for a row.
 int getSeriesTooltipLabelType()
          Retrieves the kind of information that is displayed in tooltips for series.
 java.lang.String getToolTipTemplate()
           
 double getValue(int row, int col)
          Retrieves a data value.
 java.lang.String getValueMember(int row, int col, int offset)
           
protected  java.lang.String getWrappedText(java.lang.String obj)
           
 boolean isAssignedToY2(int seriesID)
          Indicates whether a series is assigned to the Y2-axis.
 void setAxisLabelTipDisplayed(boolean yesNo)
          Specifies whether to display tooltip text for legend text and axis labels.
protected  void setCustomToolTipCallback(CustomToolTipCallback callback)
           
 void setDataRowShownAsASeries(boolean yesNo)
          Deprecated. There is no replacement method for this. Application developers are responsible to create the relevant data set.
 void setGraphFormatManager(GraphFormatManager m)
          Specifies the format manager that this ToolTipTextCallback uses.
 void setGraphType(int type)
          Specifies the graph type of the graph for which this ToolTipTextCallback handles tool tips.
 void setGroupTooltipLabelType(int type)
          Specifies the kind of information to display in tooltips for groups.
protected  void setMarkerTooltipTemplate(java.lang.String template)
           
 void setMarkerTooltipType(int type)
          Specifies the type of information that this graph displays in tooltips for markers.
 void setSeriesTooltipLabelType(int type)
          Specifies the kind of information to display in tooltips for series.
 void updateResourceBundle()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_GraphIsOpenAndClose

protected boolean m_GraphIsOpenAndClose
For internal use only. Application developers should not use this

m_AxisLabelTipDisplayed

protected boolean m_AxisLabelTipDisplayed
For internal use only. Application developers should not use this

m_GraphIsPieBar

protected boolean m_GraphIsPieBar
For internal use only. Application developers should not use this

m_GraphIsSingleY

protected boolean m_GraphIsSingleY
For internal use only. Application developers should not use this

m_GraphIsStacked

protected boolean m_GraphIsStacked
For internal use only. Application developers should not use this

m_MarkerTipDisplayed

protected boolean m_MarkerTipDisplayed
For internal use only. Application developers should not use this

m_SeriesAreRows

protected boolean m_SeriesAreRows
For internal use only. Application developers should not use this

m_ShowColDimName

protected boolean m_ShowColDimName
For internal use only. Application developers should not use this

m_ShowRowDimName

protected boolean m_ShowRowDimName
For internal use only. Application developers should not use this

m_ShowGroupLabels

protected boolean m_ShowGroupLabels
For internal use only. Application developers should not use this

m_ShowSeriesLabels

protected boolean m_ShowSeriesLabels
For internal use only. Application developers should not use this

m_CumValTip

protected boolean m_CumValTip
For internal use only. Application developers should not use this

m_PercentTip

protected boolean m_PercentTip
For internal use only. Application developers should not use this

m_TextTip

protected boolean m_TextTip
For internal use only. Application developers should not use this

m_ValueTip

protected boolean m_ValueTip
For internal use only. Application developers should not use this

m_ObjectID

protected int m_ObjectID
For internal use only. Application developers should not use this

m_GroupID

protected int m_GroupID
For internal use only. Application developers should not use this

m_SeriesID

protected int m_SeriesID
For internal use only. Application developers should not use this

m_ColID

protected int m_ColID
For internal use only. Application developers should not use this

m_RowID

protected int m_RowID
For internal use only. Application developers should not use this

m_MarkerTipType

protected int m_MarkerTipType
For internal use only. Application developers should not use this

m_TipGroupLabelType

protected int m_TipGroupLabelType
For internal use only. Application developers should not use this

m_TipSeriesLabelType

protected int m_TipSeriesLabelType
For internal use only. Application developers should not use this

m_ValuesPerGroup

protected int m_ValuesPerGroup
For internal use only. Application developers should not use this

m_DataValuesPerMarker

protected int m_DataValuesPerMarker
For internal use only. Application developers should not use this

m_DimNameType

protected java.lang.String m_DimNameType
For internal use only. Application developers should not use this

m_DimMemberNameType

protected java.lang.String m_DimMemberNameType
For internal use only. Application developers should not use this

m_excelOrDeskTop

protected boolean m_excelOrDeskTop
For internal use only. Application developers should not use this

m_commonGraph

protected CommonGraph m_commonGraph
For internal use only. Application developers should not use this

m_dataAccess

protected DataAccess m_dataAccess
For internal use only. Application developers should not use this

m_fmtMgr

protected GraphFormatManager m_fmtMgr
For internal use only. Application developers should not use this

m_numFormatCallback

protected GraphNumberFormatCallback m_numFormatCallback
For internal use only. Application developers should not use this

m_customToolTipCallback

protected CustomToolTipCallback m_customToolTipCallback
For internal use only. Application developers should not use this

m_markerTooltipTemplate

protected java.lang.String m_markerTooltipTemplate
For internal use only. Application developers should not use this

rBundle

protected java.util.ResourceBundle rBundle
For internal use only. Application developers should not use this

m_measureDim

protected java.lang.String m_measureDim
For internal use only. Application developers should not use this
Constructor Detail

ToolTipTextCallback

public ToolTipTextCallback(CommonGraph graph,
                           GraphNumberFormatCallback numFormatCallback)
Constructor. Application developers should never have to construct this method, because the Graph does it automatically.

Parameters:
graph - The Graph for which this ToolTipTextCallback will handle tool tips.
numFormatCallback - The callback that will format numbers for this ToolTipTextCallback.
Method Detail

getDataAccess

public void getDataAccess()
Retrieves the current DataAccess for the graph. The DataAccess provides access to the data that this callback needs to display.


addSliceLabelInfoToTooltip

protected void addSliceLabelInfoToTooltip()
if the graph is in ADA mode, add supplement information to tooltips for pie graph, add information to tooltip from slice label if they are different


getDynamicToolTip

public java.lang.String getDynamicToolTip(oracle.dss.graph.pfj.TDGMouseState aMouseState,
                                          boolean UserOrDeveloper)
Retrieves the text to display in a tooltip. This text contains information about the graph component over which the mouse is positioned. This method is specified in the ToolTipCallback interface in PFJ.

Parameters:
aMouseState - The mouse state information from PFJ.
UserOrDeveloper - true if the Graph is in "developer mode," requiring tooltips with more information, for debugging, false if the Graph is in "user mode," requiring tooltips that are appropriate for end users. The default is false.
Returns:
The text to display in a tooltip.

getReferenceObjectShortDesc

protected java.lang.String getReferenceObjectShortDesc(oracle.dss.graph.pfj.draw.IdentObj id)
Gets the reference object short description


getFormattedValue

public java.lang.String getFormattedValue(double dVal,
                                          int axis,
                                          boolean isPercent,
                                          boolean isPieSlice)
Retrieves a formatted data value.

Parameters:
dVal - The data value to be formatted.
axis - A constant that represents the axis to which the value belongs. Each axis has a different ViewFormat, and so can have different formatting attributes.
isPercent - true if dval is a percentage, false if it is not.
isPieSlice - true if dval is represented as a pie slice in the graph, false if it is not.
Returns:
The formatted data value.

getDataValuesPerMarker

public int getDataValuesPerMarker()
Returns:
For internal use only. Application developers should not use this
Internal helper method

getValueMember

public java.lang.String getValueMember(int row,
                                       int col,
                                       int offset)
Parameters:
row - the row
col - the column
offset - the offset of the current column/row compared to baseCol/baseRow
Returns:
The label string.
For internal use only. Application developers should not use this
Retrieves a label for the value indicator in the tooltip.

getColumnLabels

public java.lang.String getColumnLabels(int row,
                                        int col)
Retrieves the label for a column.

Parameters:
col - The column whose label you want.
Returns:
The label for the specified column.

getRowLabels

public java.lang.String getRowLabels(int row,
                                     int col)
Retrieves the label for a row.

Parameters:
row - The row whose label to get.
Returns:
The label for the specified row.

getLabels

protected java.lang.String getLabels(int row,
                                     int col,
                                     int edge,
                                     boolean showDimName,
                                     boolean series)
Parameters:
col - The column or row whose label to get.
edge - is DataDirector.COLUMN_EDGE for column and DataDirector.ROW_EDGE for row
showDimName - is m_ShowColDimName for columns and m_ShowRowDimName for rows
series - is m_SeriesAreRows for columns and !m_SeriesAreRows for rows
Returns:
The label for the specified column/row.
For internal use only. Application developers should not use this
Retrieves a label for a column or row. This is a helper method for getColumnLabels and getRowLabels.

getCommonDimensionsWithNoDuplicats

protected java.util.Vector getCommonDimensionsWithNoDuplicats(java.util.Vector QDRDimValuePairs)
Parameters:
myQDRs. - A vector of vectors. The top level vector corresponds to each slice QDR (see getColumnLabels and getRowLabels). The second-level vector contains dimValuePairs for each of those QDRs. dimValuePairs contain strings reprensenting dimension names and their corresponding values. QDRDimValuePairs ---------------------------------------- |QDR_1 | dim_1_1 | dim_1_2 ... | | | value_1_1 | value_1_2 ... | ---------------------------------------| |QDR_2 | dim_2_1 | dim_2_2 ... | | | value_2_1 | value_2_2 ... | -------------------------------------- | | . | | | | . | | | | . | | | ---------------------------------------| |QDR_n | dim_n_1 | dim_n_2 ... | | | value_n_1 | value_n_2 ... | ----------------------------------------
Returns:
a vector of dimension names and their corresponding values that are shared by all the QDRs from QDRDimValuePairs vector (and have the same values).
For internal use only. Application developers should not use this
Returns a vector of dimension name/value pairs that are common across all the QDRs passed in. We need this in order to display duplicate dim name/value pairs only once in the tooltip. For now, we are only getting rid of the pairs that are the same across ALL the QDRs, but in the future we might want to come up with some smarter algorithm for the cases when we have the same pair coming up only more than once but not in all the QDRs.

getDefaultLabels

protected java.lang.String getDefaultLabels(int row,
                                            int col,
                                            int edge,
                                            boolean showDimName,
                                            boolean series)
Parameters:
col - The column or row whose label to get. edge is DataDirector.COLUMN_EDGE for column and DataDirector.ROW_EDGE for row showDimName is m_ShowColDimName for columns and m_ShowRowDimName for rows series is m_SeriesAreRows for columns and !m_SeriesAreRows for rows
Returns:
The label for the specified column/row.
For internal use only. Application developers should not use this
Retrieves a default label for a column or a row. This is a helper method for getColumnLabels and getRowLabels.

getValue

public double getValue(int row,
                       int col)
Retrieves a data value. The row and col parameters identify the data value to retrieve. Currently, the data value must be a number value.

Parameters:
row - The row of the data value that you want.
col - The column of the data value that you want.
Returns:
The data value at the specified row and column. Returns 0.0 if the value at the specified row and column is not a number value.

isAssignedToY2

public boolean isAssignedToY2(int seriesID)
Indicates whether a series is assigned to the Y2-axis.

Parameters:
seriesID - The series about which you want information.
Returns:
true if series is assigned to the Y2-axis, false if it is assigned to the Y1-axis.

updateResourceBundle

public void updateResourceBundle()
For internal use only. Application developers should not use this
Update ResourceBundle according to the locale of the graph. Should be used by Graph only.

setAxisLabelTipDisplayed

public void setAxisLabelTipDisplayed(boolean yesNo)
Specifies whether to display tooltip text for legend text and axis labels.

Parameters:
yesNo - true to display tooltips for legend text and axis labels, false to hide tooltips for these labels.

setDataRowShownAsASeries

@Deprecated
public void setDataRowShownAsASeries(boolean yesNo)
Deprecated. There is no replacement method for this. Application developers are responsible to create the relevant data set.

Parameters:
yesNo - true to have data rows shown as PFJ series (and data columns shown as groups), false to have data rows shown as PFJ groups (and data columns shown as series).
See Also:
Graph.setDataRowShownAsASeries(boolean)
For internal use only. Application developers should not use this
Specifies whether data rows appear as series in the graph. The Graph.setDataRowShownAsASeries method class calls this method. Application developers should call the method in the Graph rather than this method.

setGraphFormatManager

public void setGraphFormatManager(GraphFormatManager m)
Specifies the format manager that this ToolTipTextCallback uses. The Graph.setGraphFormatManager method calls this method. Application developers should not need to call this method.

Parameters:
m - The GraphFormatManager to use.
See Also:
Graph.setGraphFormatManager(oracle.dss.graph.GraphFormatManager)

setGraphType

public void setGraphType(int type)
Specifies the graph type of the graph for which this ToolTipTextCallback handles tool tips. The Graph.setGraphType method calls this method as it sets the graph type of the graph. Application developers should not have to call this method.

Parameters:
type - A constant that represents the graph type. Constants are defined in the Graph class.
See Also:
Graph.setGraphType(int)

getRowID

public int getRowID(int series,
                    int group)
Parameters:
series -
group -
Returns:
For internal use only. Application developers should not use this

getColID

public int getColID(int series,
                    int group)
Parameters:
series -
group -
Returns:
For internal use only. Application developers should not use this

setMarkerTooltipTemplate

protected void setMarkerTooltipTemplate(java.lang.String template)
Parameters:
template - the markerTooltipTemplate to use
For internal use only. Application developers should not use this
Updates this ToolTipTextCallback with the new markerTooltipTemplate. This is used to keep the markerTooltipTemplate in sync for renders.

getGroupTooltipLabelType

public int getGroupTooltipLabelType()
Retrieves the kind of information that is displayed in tooltips for groups. The default value is Graph.TLT_MEMBER, so that the group dimension member appears, without a dimension name. Graph.getGroupTooltipLabelType calls this method.

Returns:
A constant that indicates the kind of information that appears in tooltips for groups. The constants are defined in the Graph class, and they begin with TLT_.
See Also:
Graph.getGroupTooltipLabelType()

setGroupTooltipLabelType

public void setGroupTooltipLabelType(int type)
Specifies the kind of information to display in tooltips for groups. The default value for the GroupTooltipLabelType attribute is Graph.TLT_MEMBER, which displays the dimension member only. Graph.setGroupTooltipLabelType calls this method.

Parameters:
type - A constant that specifies the kind of information to display in tooltips for groups. The constants are defined in the Graph class, and they begin with TLT_.
See Also:
Graph.setGroupTooltipLabelType(int)

getMarkerTooltipType

public int getMarkerTooltipType()
Retrieves the kind of information that is displayed in tooltips for data markers. The default value is Graph.MTT_VALUES, which displays the data value that the marker represents. Graph.getMarkerTooltipType calls this method.

Returns:
A constant that indicates the kind of information that appears in tooltips for groups. The constants are defined in the Graph class, and they begin with MTT_.
See Also:
Graph.getMarkerTooltipType()

setMarkerTooltipType

public void setMarkerTooltipType(int type)
Specifies the type of information that this graph displays in tooltips for markers. The information can be the value that the marker represents, the percent value (for pie graphs), the cumulative value (for stacked graphs), text that identifies the group or series, or a combination of information, such as the value, the group, and the series. Constants are defined in the Graph class, and they start with MTT_.

The default value for the MarkerTooltipType property is Graph.MTT_VALUES, which displays the data value that the marker represents. Graph.setMarkerTooltipType calls this method.

Parameters:
type - A constant that represents the type of information that the graph should display for markers. Except for MTT_NONE, the constants can be combined by using a bitwise OR (|).
See Also:
GraphConstants.MTT_TEXT, GraphConstants.MTT_VALUES, GraphConstants.MTT_NONE, GraphConstants.MTT_PERCENT_VAL, GraphConstants.MTT_CUM_VAL, Graph.setGroupTooltipLabelType(int), Graph.setSeriesTooltipLabelType(int), Graph.setMarkerTooltipType(int)

getSeriesTooltipLabelType

public int getSeriesTooltipLabelType()
Retrieves the kind of information that is displayed in tooltips for series. The default value is Graph.TLT_MEMBER, so that the group dimension member appears, without a dimension name. Graph.getSeriesTooltipLabelType calls this method.

Returns:
A constant that indicates the kind of information that appears in tooltips for series. The constants are defined in the Graph class, and they begin with TLT_.
See Also:
Graph.getSeriesTooltipLabelType()

setSeriesTooltipLabelType

public void setSeriesTooltipLabelType(int type)
Specifies the kind of information to display in tooltips for series. The default value for the GroupTooltipLabelType attribute is Graph.TLT_MEMBER, which displays the dimension member only. Graph.setSeriesTooltipLabelType calls this method.

Parameters:
type - A constant that specifies the kind of information to display in tooltips for series. The constants are defined in the Graph class, and they begin with TLT_.
See Also:
Graph.setSeriesTooltipLabelType(int)

calcDateFreq

protected int calcDateFreq(java.util.Date date)
Parameters:
date - date to calculate frequency for
Returns:
frequency of the given date
For internal use only. Application developers should not use this
Calculate the frequency (granularity) of a single date.

convertDateToString

public java.lang.String convertDateToString(java.lang.Object obj)
For internal use only. Application developers should not use this

formatDate

protected java.lang.String formatDate(java.util.Date date,
                                      int dateFreq)
For internal use only. Application developers should not use this

getCustomToolTipCallback

public CustomToolTipCallback getCustomToolTipCallback()
Returns:
CustomToolTipCallback The CustomToolTipCallback used to override the tool tip text we provide.
For internal use only. Application developers should not use this
Retrieves the CustomToolTipCallback used to override the tool tip text we provide.

setCustomToolTipCallback

protected void setCustomToolTipCallback(CustomToolTipCallback callback)
Parameters:
callback - The CustomToolTipCallback that will be used to override the tool tip text we provide.
For internal use only. Application developers should not use this
Set the CustomToolTipCallback to use to override the tool tip text we provide.

getWrappedText

protected java.lang.String getWrappedText(java.lang.String obj)
For internal use only. Application developers should not use this
Since PFJ does not do word wrapping for a long text in the tooltip writing a method that split the text into multiple lines.

getToolTipTemplate

public java.lang.String getToolTipTemplate()
Returns:
For internal use only. Application developers should not use this
Assembles a tooltip template for flash client assembly of tooltips.

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

Copyright © 1997, 2013, Oracle. All rights reserved.