public class ToolTipTextCallback
extends java.lang.Object
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.
Modifier and Type | Class and Description |
---|---|
protected class |
ToolTipTextCallback.DimValuePairs |
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ToolTipTextCallback(CommonGraph graph,
GraphNumberFormatCallback numFormatCallback)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
@Concealed protected boolean m_GraphIsOpenAndClose
@Concealed protected boolean m_AxisLabelTipDisplayed
@Concealed protected boolean m_GraphIsPieBar
@Concealed protected boolean m_GraphIsSingleY
@Concealed protected boolean m_GraphIsStacked
@Concealed protected boolean m_MarkerTipDisplayed
@Concealed protected boolean m_SeriesAreRows
@Concealed protected boolean m_ShowColDimName
@Concealed protected boolean m_ShowRowDimName
@Concealed protected boolean m_ShowGroupLabels
@Concealed protected boolean m_ShowSeriesLabels
@Concealed protected boolean m_CumValTip
@Concealed protected boolean m_PercentTip
@Concealed protected boolean m_TextTip
@Concealed protected boolean m_ValueTip
@Concealed protected int m_ObjectID
@Concealed protected int m_GroupID
@Concealed protected int m_SeriesID
@Concealed protected int m_ColID
@Concealed protected int m_RowID
@Concealed protected int m_MarkerTipType
@Concealed protected int m_TipGroupLabelType
@Concealed protected int m_TipSeriesLabelType
@Concealed protected int m_ValuesPerGroup
@Concealed protected int m_DataValuesPerMarker
@Concealed protected java.lang.String m_DimNameType
@Concealed protected java.lang.String m_DimMemberNameType
@Concealed protected boolean m_excelOrDeskTop
@Concealed protected CommonGraph m_commonGraph
@Concealed protected DataAccess m_dataAccess
@Concealed protected GraphFormatManager m_fmtMgr
@Concealed protected GraphNumberFormatCallback m_numFormatCallback
@Concealed protected CustomToolTipCallback m_customToolTipCallback
@Concealed protected java.lang.String m_markerTooltipTemplate
@Concealed protected java.util.ResourceBundle rBundle
@Concealed protected java.lang.String m_measureDim
public ToolTipTextCallback(CommonGraph graph, GraphNumberFormatCallback numFormatCallback)
Graph
does it automatically.graph
- The Graph
for which this
ToolTipTextCallback
will handle tool tips.numFormatCallback
- The callback that will format numbers for this
ToolTipTextCallback
.public void getDataAccess()
DataAccess
for the graph.
The DataAccess
provides access to the data that this
callback needs to display.protected void addSliceLabelInfoToTooltip()
public java.lang.String getDynamicToolTip(oracle.dss.graph.pfj.TDGMouseState aMouseState, boolean UserOrDeveloper)
ToolTipCallback
interface
in PFJ.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
.protected java.lang.String getReferenceObjectShortDesc(oracle.dss.graph.pfj.draw.IdentObj id)
public java.lang.String getFormattedValue(double dVal, int axis, boolean isPercent, boolean isPieSlice)
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.@Concealed public int getDataValuesPerMarker()
@Concealed public java.lang.String getValueMember(int row, int col, int offset)
row
- the rowcol
- the columnoffset
- the offset of the current column/row compared to baseCol/baseRowpublic java.lang.String getColumnLabels(int row, int col)
col
- The column whose label you want.public java.lang.String getRowLabels(int row, int col)
row
- The row whose label to get.@Concealed protected java.lang.String getLabels(int row, int col, int edge, boolean showDimName, boolean series)
col
- The column or row whose label to get.edge
- is DataDirector.COLUMN_EDGE for column and
DataDirector.ROW_EDGE for rowshowDimName
- is m_ShowColDimName for columns and
m_ShowRowDimName for rowsseries
- is m_SeriesAreRows for columns and
!m_SeriesAreRows for rows@Concealed protected java.util.Vector getCommonDimensionsWithNoDuplicats(java.util.Vector QDRDimValuePairs)
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 ... |
----------------------------------------@Concealed protected java.lang.String getDefaultLabels(int row, int col, int edge, boolean showDimName, boolean series)
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 rowspublic double getValue(int row, int col)
row
and col
parameters identify the
data value to retrieve.
Currently, the data value must be a number value.row
- The row of the data value that you want.col
- The column of the data value that you want.public boolean isAssignedToY2(int seriesID)
seriesID
- The series about which you want information.true
if series
is assigned to the
Y2-axis,
false
if it is assigned to the Y1-axis.@Concealed public void updateResourceBundle()
public void setAxisLabelTipDisplayed(boolean yesNo)
yesNo
- true
to display tooltips for legend text
and axis labels,
false
to hide tooltips for these labels.@Deprecated @Concealed public void setDataRowShownAsASeries(boolean yesNo)
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).Graph.setDataRowShownAsASeries(boolean)
Graph.setDataRowShownAsASeries
method
class calls this method.
Application developers should call the method in the Graph
rather than this method.public void setGraphFormatManager(GraphFormatManager m)
ToolTipTextCallback
uses.
The Graph.setGraphFormatManager
method calls this method.
Application developers should not need to call this method.m
- The GraphFormatManager
to use.Graph.setGraphFormatManager(oracle.dss.graph.GraphFormatManager)
public void setGraphType(int type)
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.type
- A constant that represents the graph type. Constants
are defined in the Graph
class.Graph.setGraphType(int)
@Concealed public int getRowID(int series, int group)
series
- group
- @Concealed public int getColID(int series, int group)
series
- group
- @Concealed protected void setMarkerTooltipTemplate(java.lang.String template)
template
- the markerTooltipTemplate to usepublic int getGroupTooltipLabelType()
Graph.TLT_MEMBER
, so that the
group dimension member appears, without a dimension name.
Graph.getGroupTooltipLabelType
calls this method.Graph
class, and they begin with TLT_.Graph.getGroupTooltipLabelType()
public void setGroupTooltipLabelType(int type)
GroupTooltipLabelType
attribute
is Graph.TLT_MEMBER
, which displays the dimension member
only.
Graph.setGroupTooltipLabelType
calls this method.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_.Graph.setGroupTooltipLabelType(int)
public int getMarkerTooltipType()
Graph.MTT_VALUES
, which displays
the data value that the marker represents.
Graph.getMarkerTooltipType
calls this method.Graph
class, and they begin with MTT_.Graph.getMarkerTooltipType()
public void setMarkerTooltipType(int type)
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.
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 (|).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)
public int getSeriesTooltipLabelType()
Graph.TLT_MEMBER
, so that the
group dimension member appears, without a dimension name.
Graph.getSeriesTooltipLabelType
calls this method.Graph
class, and they begin with TLT_.Graph.getSeriesTooltipLabelType()
public void setSeriesTooltipLabelType(int type)
GroupTooltipLabelType
attribute
is Graph.TLT_MEMBER
, which displays the dimension member
only.
Graph.setSeriesTooltipLabelType
calls this method.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_.Graph.setSeriesTooltipLabelType(int)
@Concealed protected int calcDateFreq(java.util.Date date)
date
- date to calculate frequency for@Concealed public java.lang.String convertDateToString(java.lang.Object obj)
@Concealed protected java.lang.String formatDate(java.util.Date date, int dateFreq)
@Concealed public CustomToolTipCallback getCustomToolTipCallback()
CustomToolTipCallback
used to override the tool tip text we provide.CustomToolTipCallback
used to override the
tool tip text we provide.@Concealed protected void setCustomToolTipCallback(CustomToolTipCallback callback)
callback
- The CustomToolTipCallback
that will be used
to override the tool tip text we provide.CustomToolTipCallback
to use to override the
tool tip text we provide.@Concealed protected java.lang.String getWrappedText(java.lang.String obj)
@Concealed public java.lang.String getToolTipTemplate()