|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.swing.visuals.olaptableview.OLAPTableView
@SASScope(value="ALL") public class OLAPTableView
OLAPTableView is a swing component that extends from TableView
and allows OLAP (On-Line Analytical Processing) data to be viewed and manipulated in tabular form.
OLAPTableView requires a model that implements both a TableModel
and an OLAPDataSetInterfaceProvider in
order to view the data correctly. The OLAPDataSetInterface
will be obtained from the OLAPDataSetInterfaceProvider.
To attach a model to OLAPTableView:
setModel (your-model);
For More Information:
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Examples for this class may be found on the Examples Site.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
TableView,
OLAPDataSetInterfaceProvider,
OLAPTableModelAdapter,
OLAPDataSetInterface,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
RB_KEY
|
| Fields inherited from class com.sas.swing.visuals.tableview.TableView |
|---|
AUTO_RESIZE_ALL_ROWS, AUTO_RESIZE_FIRST_ROW, changingCurrentCell, clearRowSelectionAfterSorting, columnAutoResizeMode, columnHeaderFilter, columnsSized, dataCellFilter, factory, genericErrorHandler, LASTROW, lastSortDirections, lastSortedColumns, printing, rowAutoResizeMode, rowHeaderFilter, rowHeightModel, tableInitialized, titleFilter, toolbarFilter, viewerSupport |
| Constructor Summary | |
|---|---|
OLAPTableView()
Constructs a default OLAPTableView that is initialized with a default
data model, a default column model, a default row model, and default selection models. |
|
OLAPTableView(int numRows,
int numColumns)
Constructs a OLAPTableView with numRows
and numColumns of empty cells using
DefaultTableModel. |
|
OLAPTableView(java.lang.Object[][] rowData,
java.lang.Object[] columnNames)
Constructs a OLAPTableView to display the values in the two dimensional array,
rowData, with column names, columnNames. |
|
OLAPTableView(javax.swing.table.TableModel tableModel)
Constructs a OLAPTableView that is initialized with
tableModel as the data model, a default column model, a default row model,
and default selection models. |
|
OLAPTableView(javax.swing.table.TableModel tableModel,
javax.swing.table.TableColumnModel columnModel)
Constructs a OLAPTableView that is initialized with
tableModel as the data model, columnModel
as the column model, a default row model, and default selection models. |
|
OLAPTableView(javax.swing.table.TableModel tableModel,
javax.swing.table.TableColumnModel columnModel,
javax.swing.ListSelectionModel selectionModel)
Constructs a OLAPTableView that is initialized with
tableModel as the data model, columnModel as the
column model, selectionModel as the cell selection model, and a default row model . |
|
OLAPTableView(java.util.Vector rowData,
java.util.Vector columnNames)
Constructs a OLAPTableView to display the values in the
Vector of Vectors, rowData,
with column names, columnNames. |
|
| Method Summary | |
|---|---|
protected ActionSupportFilter |
configureColumnHeaderActionFilter(int row,
int column)
|
protected ActionSupportFilter |
configureDataCellActionFilter(int row,
int column)
|
protected ActionSupportFilter |
configureRowHeaderActionFilter(int row,
int column)
|
protected ActionSupportFilter |
configureTitleActionFilter(int row,
int column)
|
protected ActionSupportFilter |
configureToolBarActionFilter()
Configures the toolbar action filter for the ActionProvider. |
void |
contentsChanged(com.sas.collection.ContentsChangedEvent event)
Invoked when the table receives a ContentsChangeEvent
from the action provider. |
void |
createDefaultActionProviderFilters()
Creates the default action provider filters that get used for by the action provider to return various actions for the given areas. |
protected javax.swing.table.TableColumnModel |
createDefaultColumnModel()
Returns the default column model object which is a DefaultTableColumnModel. |
void |
createDefaultColumnsFromModel()
Creates default columns for the table from the data model using the getColumnCount method
defined in the TableModel interface. |
protected javax.swing.table.TableModel |
createDefaultDataModel()
Returns the default table model object, which is a OLAPTableModelAdapter. |
protected javax.swing.JComponent |
createDefaultOriginComponent()
Returns the default origin component object, which is a OLAPOriginComponent for an OLAP model. |
protected void |
createDefaultRenderers()
Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons. |
protected RowHeader |
createDefaultRowHeader()
Returns the default table row header object, which is a OLAPRowHeader. |
protected TableRowModel |
createDefaultRowModel()
Returns the default row model object which is a DefaultTableRowModel. |
protected javax.swing.table.JTableHeader |
createDefaultTableHeader()
Returns the default table header object, which is a OLAPColumnHeader if the model is OLAP, ColumnHeader
if the model is relational. |
void |
createDefaultViewerSupport()
Creates the default viewer support, which by default is an instanceof com.sas.actionprovider.support.SwingViewerSupport. |
AxisInterface |
getAxis(int axis)
Returns an instance of the AxisInterface for the given axis if the model is an OLAPDataSetInterfaceProvider and the model has that axis present. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to
augment the automatically introspected information about this OLAPTableView. |
java.lang.String |
getUIClassID()
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component. |
protected void |
repaintCells(int oldRow,
int newRow,
int oldColumn,
int newColumn)
|
protected void |
repaintCurrentCell()
|
void |
setModel(javax.swing.table.TableModel newModel)
Sets the new model of the table, if the model implements com.sas.swing.models.OLAPDataSetInterfaceProvider then appropriate OLAP
headers will be created, otherwise the headers will be relational headers. |
void |
showPopup(int row,
int column)
Displays the popup menu at the bttom right corner of the cell specified. |
void |
showPopup(java.awt.Point point)
Displays the popup menu at the given point. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
Invoked when this table's TableModel generates
a TableModelEvent. |
void |
updateUI()
Notification from the javax.swing.UIManager that the look and feel
(L&F) has changed. |
protected void |
validateCurrentCell()
|
| Methods inherited from interface com.sas.table.MoveColumnInterface |
|---|
moveColumn |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
| Constructor Detail |
|---|
public OLAPTableView()
OLAPTableView that is initialized with a default
data model, a default column model, a default row model, and default selection models.
JTable.createDefaultDataModel(),
JTable.createDefaultColumnModel(),
TableView.createDefaultSelectionModel(),
createDefaultRowModel()public OLAPTableView(javax.swing.table.TableModel tableModel)
OLAPTableView that is initialized with
tableModel as the data model, a default column model, a default row model,
and default selection models.
tableModel - the data model for the tableJTable.createDefaultColumnModel(),
TableView.createDefaultSelectionModel(),
createDefaultRowModel()
public OLAPTableView(javax.swing.table.TableModel tableModel,
javax.swing.table.TableColumnModel columnModel)
OLAPTableView that is initialized with
tableModel as the data model, columnModel
as the column model, a default row model, and default selection models.
tableModel - the data model for the tablecolumnModel - the column model for the tableTableView.createDefaultSelectionModel(),
createDefaultRowModel()
public OLAPTableView(javax.swing.table.TableModel tableModel,
javax.swing.table.TableColumnModel columnModel,
javax.swing.ListSelectionModel selectionModel)
OLAPTableView that is initialized with
tableModel as the data model, columnModel as the
column model, selectionModel as the cell selection model, and a default row model .
If any of the parameters are null this method
will initialize the table with the corresponding default model.
The autoCreateColumnsFromModel flag is set to false
if columnModel is non-null, otherwise it is set to true
and the column model is populated with suitable
TableColumns for the columns in tableModel.
tableModel - the data model for the tablecolumnModel - the column model for the tableselectionModel - the row selection model for the tableJTable.createDefaultDataModel(),
JTable.createDefaultColumnModel(),
TableView.createDefaultSelectionModel(),
createDefaultRowModel()
public OLAPTableView(int numRows,
int numColumns)
OLAPTableView with numRows
and numColumns of empty cells using
DefaultTableModel. The columns will have
names of the form "A", "B", "C", etc.
numRows - the number of rows the table holdsnumColumns - the number of columns the table holdsDefaultTableModel
public OLAPTableView(java.util.Vector rowData,
java.util.Vector columnNames)
OLAPTableView to display the values in the
Vector of Vectors, rowData,
with column names, columnNames. The
Vectors contained in rowData
should contain the values for that row. In other words,
the value of the cell at row 1, column 5 can be obtained
with the following code:
((Vector)rowData.elementAt(1)).elementAt(5);
rowData - the data for the new tablecolumnNames - names of each column
public OLAPTableView(java.lang.Object[][] rowData,
java.lang.Object[] columnNames)
OLAPTableView to display the values in the two dimensional array,
rowData, with column names, columnNames.
rowData is an array of rows, so the value of the cell at row 1,
column 5 can be obtained with the following code:
rowData[1][5];
All rows must be of the same length as columnNames.
rowData - the data for the new tablecolumnNames - names of each column| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector to
augment the automatically introspected information about this OLAPTableView.
public void setModel(javax.swing.table.TableModel newModel)
com.sas.swing.models.OLAPDataSetInterfaceProvider then appropriate OLAP
headers will be created, otherwise the headers will be relational headers.
setModel in class javax.swing.JTablenewModel - the newModel for the tablepublic AxisInterface getAxis(int axis)
axis - the integer representing the axis, values are from the
AxisInterface class.
AxisInterfaceprotected javax.swing.table.TableModel createDefaultDataModel()
OLAPTableModelAdapter. A subclass can override this
method to return a different table model object.
createDefaultDataModel in class javax.swing.JTableOLAPTableModelAdapterprotected javax.swing.table.JTableHeader createDefaultTableHeader()
OLAPColumnHeader if the model is OLAP, ColumnHeader
if the model is relational. A subclass can override this
method to return a different table header object.
createDefaultTableHeader in class TableViewOLAPColumnHeaderprotected javax.swing.table.TableColumnModel createDefaultColumnModel()
DefaultTableColumnModel. A subclass can override this
method to return a different column model object
createDefaultColumnModel in class javax.swing.JTablepublic void createDefaultColumnsFromModel()
getColumnCount method
defined in the TableModel interface.
Clears any existing columns before creating the new columns based on information from the model.
createDefaultColumnsFromModel in class javax.swing.JTableJTable.getAutoCreateColumnsFromModel()public void createDefaultViewerSupport()
com.sas.actionprovider.support.SwingViewerSupport. The action
support type is set to com.sas.actionprovider.support.ActionProviderSupportTypes.OLAP_TABLEVIEW_SUPPORT
createDefaultViewerSupport in class TableViewpublic void createDefaultActionProviderFilters()
createDefaultActionProviderFilters in class TableViewprotected void createDefaultRenderers()
createDefaultRenderers in class TableViewNumberRendererpublic void updateUI()
javax.swing.UIManager that the look and feel
(L&F) has changed.
Replaces the current UI object with the latest version from the
javax.swing.UIManager.
updateUI in class TableViewJComponent.updateUI()public java.lang.String getUIClassID()
getUIClassID in class TableViewJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)protected RowHeader createDefaultRowHeader()
OLAPRowHeader. A subclass can override this
method to return a different table row header object.
createDefaultRowHeader in class TableViewOLAPRowHeaderprotected TableRowModel createDefaultRowModel()
DefaultTableRowModel. A subclass can override this
method to return a different row model object
createDefaultRowModel in class TableViewDefaultTableRowModelprotected javax.swing.JComponent createDefaultOriginComponent()
OLAPOriginComponent for an OLAP model. A subclass can override this
method to return a different origin component object.
createDefaultOriginComponent in class TableViewOLAPOriginComponentprotected void repaintCurrentCell()
repaintCurrentCell in class TableView
protected void repaintCells(int oldRow,
int newRow,
int oldColumn,
int newColumn)
repaintCells in class TableViewprotected void validateCurrentCell()
validateCurrentCell in class TableViewpublic void contentsChanged(com.sas.collection.ContentsChangedEvent event)
ContentsChangeEvent
from the action provider.
Application code will not use these methods explicitly, they
are used internally by OLAPTableView.
contentsChanged in interface com.sas.collection.ContentsChangedListenercontentsChanged in class TableViewevent - the contents changed event
public void showPopup(int row,
int column)
showPopup in class TableViewrow - the row coordinate in the view to display the popup menu forcolumn - the column coordinate in the view to display the popup menu forpublic void showPopup(java.awt.Point point)
showPopup in class TableViewpoint - the location to display the popup menuprotected ActionSupportFilter configureToolBarActionFilter()
configureToolBarActionFilter in class TableView
protected ActionSupportFilter configureRowHeaderActionFilter(int row,
int column)
configureRowHeaderActionFilter in class TableView
protected ActionSupportFilter configureColumnHeaderActionFilter(int row,
int column)
configureColumnHeaderActionFilter in class TableView
protected ActionSupportFilter configureTitleActionFilter(int row,
int column)
configureTitleActionFilter in class TableView
protected ActionSupportFilter configureDataCellActionFilter(int row,
int column)
configureDataCellActionFilter in class TableViewpublic void tableChanged(javax.swing.event.TableModelEvent e)
TableModel generates
a TableModelEvent.
The TableModelEvent should be constructed in the
coordinate system of the model; the appropriate mapping to the
view coordinate system is performed by this OLAPTableView
when it receives the event.
Application code will not use these methods explicitly, they
are used internally by OLAPTableView.
tableChanged in interface javax.swing.event.TableModelListenertableChanged in class TableView
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||