|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.pivot.olap.OlapCellRenderer
public class OlapCellRenderer
OlapCellRenderer is the default renderer for the data cells of an olap pivot table.
Field Summary | |
---|---|
protected Map |
defaultRenderersByMeasure
a map that contains table cell renderers vs olap measures |
protected Map |
formattedValuesByMeasure
a map that contains boolean flags vs olap measures |
protected boolean |
globalUseFormattedValue
determines whether the olap cell's formatted value should be used in rendering |
Constructor Summary | |
---|---|
OlapCellRenderer()
Constructs an OlapCellRenderer. |
Method Summary | |
---|---|
TableCellRenderer |
getDefaultRenderer(OlapMeasure measure)
Determines the renderer for the given measure, if any. |
boolean |
getGlobalUseFormattedValue()
Determines whether the renderer will use the formatted values of an olap cell when rendering. |
protected TableCellRenderer |
getTableCellRenderer(JTable table,
OlapCell cell)
Determines the renderer to use for the given olap cell. |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the component used for drawing the cell. |
boolean |
getUseFormattedValue(OlapMeasure measure)
Determines whether the renderer will use the formatted values of an olap cell when rendering, for the given measure. |
protected Object |
getValue(OlapCell cell)
Retrieves the value to use for rendering for the given olap cell. |
void |
setDefaultRenderer(OlapMeasure measure,
TableCellRenderer renderer)
Assigns the renderer to use for the given measure. |
void |
setGlobalUseFormattedValue(boolean globalUseFormattedValue)
Determines whether the renderer will use the formatted values of an olap cell when rendering. |
void |
setUseFormattedValue(OlapMeasure measure,
boolean useFormattedValue)
Determines whether the renderer will use the formatted values of an olap cell when rendering, for the given measure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean globalUseFormattedValue
protected Map defaultRenderersByMeasure
protected Map formattedValuesByMeasure
Constructor Detail |
---|
public OlapCellRenderer()
Method Detail |
---|
public TableCellRenderer getDefaultRenderer(OlapMeasure measure)
measure
- the measure whose renderer is returned
public boolean getGlobalUseFormattedValue()
protected TableCellRenderer getTableCellRenderer(JTable table, OlapCell cell)
table
- the pivot tablecell
- the cell whose renderer is retrieved
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface TableCellRenderer
table
- the JTable
that is asking the
renderer to draw; can be null
value
- the value of the cell to be rendered. It is
up to the specific renderer to interpret
and draw the value. For example, if
value
is the string "true", it could be rendered as a
string or it could be rendered as a check
box that is checked. null
is a
valid valueisSelected
- true if the cell is to be rendered with the
selection highlighted; otherwise falsehasFocus
- if true, render cell appropriately. For
example, put a special border on the cell, if
the cell can be edited, render in the color used
to indicate editingrow
- the row index of the cell being drawn. When
drawing the header, the value of
row
is -1column
- the column index of the cell being drawnpublic boolean getUseFormattedValue(OlapMeasure measure)
measure
- the given measure
protected Object getValue(OlapCell cell)
cell
- the olap cell whose value is rerieved
public void setDefaultRenderer(OlapMeasure measure, TableCellRenderer renderer)
measure
- the measure whose renderer is assignedrenderer
- the renderer to assignpublic void setGlobalUseFormattedValue(boolean globalUseFormattedValue)
globalUseFormattedValue
- true if the formatted value is used, false otherwisepublic void setUseFormattedValue(OlapMeasure measure, boolean useFormattedValue)
measure
- the given measureuseFormattedValue
- true if the formatted value is used, false otherwise
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |