|
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.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.citra.table.AdvancedJTable
com.citra.pivot.PivotTable
public class PivotTable
PivotTable is a JTable subclass able to display data pivoted in two edges,
row and column. The pivot table's model is a PivotTableModel
.
Nested Class Summary | |
---|---|
class |
PivotTable.PivotDataStyleModel
PivotDataStyleModel is the PivotTable's style model. |
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
COLUMN_HEADER_SEPARATOR
constant indicating a column used as a separator for the column header |
static String |
COLUMN_NAMES_SEPARATOR
constant indicating a column used as a separator for the column header hierarchy names |
protected boolean |
pivotRowHeader
whether to render the row header in pivot style |
protected PivotStyleModel |
pivotStyleModel
the pivot style model |
static String |
ROW_COLUMN_SEPARATOR
constant indicating a column used as a separator between the row and column header |
static String |
ROW_HEADER_SEPARATOR
constant indicating a column used as a separator for the row header |
protected PivotRowHeaderRenderer |
rowHeaderRenderer
the renderer for the pivot table's row header cells |
protected boolean |
showColumnHierarchyNames
whether to show the column hierarchy names |
protected boolean |
showRowHierarchyNames
whether to show the row hierarchy names |
Fields inherited from class com.citra.table.AdvancedJTable |
---|
cellResizer, COMMIT_EDIT, CONTINUE_EDIT, DISCARD_EDIT, editMode, isFirstColumnFixed, nonContiguousCellSelection, nonContiguousSelectionModel, rowHeader, scroller, showRowHeader, spanDrawer, styleModel, tableAssistant, tableReorder, viewableResizer |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PivotTable()
Constructs a PivotTable. |
|
PivotTable(PivotDataModel dataModel)
Constructs a PivotTable. |
|
PivotTable(PivotTableModel model)
Constructs a PivotTable having model as its model. |
Method Summary | |
---|---|
protected PivotRowHeaderRenderer |
createDefaultPivotRowRenderer()
Returns a default renderer for displaying the rows of the pivot table's row header. |
protected PivotStyleModel |
createDefaultPivotStyleModel()
Creates and returns a PivotStyleModel. |
protected StyleModel |
createDefaultStyleModel()
Overrides the method in order to create a new instance of PivotTable.PivotDataStyleModel . |
boolean |
getFixedGrandTotals()
Determines whether row and column grand totals are always showing in the table. |
boolean |
getPivotRowHeader()
Determines whether to render the row header in pivot style. |
PivotStyleModel |
getPivotStyleModel()
Returns the currently assigned pivot style model. |
PivotTableHeader |
getPivotTableHeader()
Convenience method to return the pivot table's accompanying pivot table header. |
PivotTableModel |
getPivotTableModel()
Convenience method to return the pivot table's data model, casted to PivotTableModel. |
PivotRowHeaderRenderer |
getPivotTableRenderer()
Returns the renderer for displaying the rows of the pivot table's row header. |
boolean |
getShowColumnHierarchyNames()
Determines whether the hierarchy names shown on the column header will be displayed. |
boolean |
getShowRowHierarchyNames()
Determines whether the hierarchy names shown on the row header will be displayed. |
void |
setFixedGrandTotals(boolean fixed)
Determines whether row and column grand totals are always showing in the table. |
void |
setPivotRowHeader(boolean pivotRowHeader)
Determines whether to render the row header in pivot style. |
void |
setPivotRowRenderer(PivotRowHeaderRenderer rowHeaderRenderer)
Assigns the renderer for displaying the rows of the pivot table's row header. |
void |
setPivotStyleModel(PivotStyleModel pivotStyleModel)
Assigns the pivot style model. |
void |
setShowColumnHierarchyNames(boolean showColumn)
Determines whether the hierarchy names shown on the column header will be displayed. |
void |
setShowRowHierarchyNames(boolean showRow)
Determines whether the hierarchy names shown on the row header will be displayed. |
protected boolean |
shouldToggleExpand(int row,
int column,
EventObject e,
boolean editingStarted)
This method determines the situation under which a pivot table's node is expanded/collapsed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ROW_HEADER_SEPARATOR
public static final String ROW_COLUMN_SEPARATOR
public static final String COLUMN_HEADER_SEPARATOR
public static final String COLUMN_NAMES_SEPARATOR
protected PivotRowHeaderRenderer rowHeaderRenderer
protected PivotStyleModel pivotStyleModel
protected boolean pivotRowHeader
protected boolean showRowHierarchyNames
protected boolean showColumnHierarchyNames
Constructor Detail |
---|
public PivotTable()
public PivotTable(PivotDataModel dataModel)
public PivotTable(PivotTableModel model)
model
as its model.
Method Detail |
---|
protected PivotRowHeaderRenderer createDefaultPivotRowRenderer()
protected PivotStyleModel createDefaultPivotStyleModel()
protected StyleModel createDefaultStyleModel()
PivotTable.PivotDataStyleModel
.
Returns the default style model object which is a DefaultStyleModel
.
createDefaultStyleModel
in class AdvancedJTable
public boolean getFixedGrandTotals()
public boolean getPivotRowHeader()
public PivotStyleModel getPivotStyleModel()
public PivotTableHeader getPivotTableHeader()
public PivotTableModel getPivotTableModel()
public PivotRowHeaderRenderer getPivotTableRenderer()
public boolean getShowColumnHierarchyNames()
public boolean getShowRowHierarchyNames()
public void setFixedGrandTotals(boolean fixed)
fixed
- true, if grand totals are always visible, false otherwisepublic void setPivotRowHeader(boolean pivotRowHeader)
pivotRowHeader
- true if row header is displayed in pivot style, false otherwisepublic void setPivotRowRenderer(PivotRowHeaderRenderer rowHeaderRenderer)
rowHeaderRenderer
- the renderer for the table's row header to assignpublic void setPivotStyleModel(PivotStyleModel pivotStyleModel)
pivotStyleModel
- the new pivot style model to assignpublic void setShowColumnHierarchyNames(boolean showColumn)
showColumn
- true if column hierarchy names will be displayed, false otherwisepublic void setShowRowHierarchyNames(boolean showRow)
showRow
- true if row hierarchy names will be displayed, false otherwiseprotected boolean shouldToggleExpand(int row, int column, EventObject e, boolean editingStarted)
row
- the row we wish to expand/collapsecolumn
- the column we wish to expand/collapsee
- the event that is used to expand/collapse the node, usually a MouseEventeditingStarted
- boolean indicating whether we are editing
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |