|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.higrid.HiGridData
HiGridData includes support for the footer, before details, and after details records.
Field Summary | |
static int |
AFTER_DETAILS
|
static int |
BEFORE_DETAILS
|
protected com.klg.jclass.datasource.DataModel |
dataModel
|
static int |
FOOTER
|
static int |
SUMMARY_ROWS
|
Constructor Summary | |
protected |
HiGridData()
Constructors. |
|
HiGridData(com.klg.jclass.datasource.DataModel dataModel)
|
Method Summary | |
void |
addDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
Register a listener for this Data Model. |
void |
cancelAll(com.klg.jclass.datasource.DataModelListener originator)
Cancel all pending changes in all DataTables. |
void |
clearCurrentPath(com.klg.jclass.datasource.MetaDataModel parentMeta)
Clear the current path of all children of this MetaDataModel. |
void |
clearDataTableTreeInternalData(Object user)
For internal use only. |
void |
clearDataTableTreeUserData(Object user)
Clears all user data. |
protected void |
createAfterDetailsMetaTree()
Create the after details meta tree with the same hierarchy as the meta tree for the record type. |
protected void |
createBeforeDetailsMetaTree()
Create the before details meta tree with the same hierarchy as the meta tree for the record type. |
protected void |
createFooterMetaTree()
Create the footer meta tree with the same hierarchy as the meta tree for the record type. |
protected void |
createSummaryDataTable(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel recordData,
com.klg.jclass.higrid.FormatNode node)
Create the summary data table for the given data table model. |
protected com.klg.jclass.datasource.MetaDataModel |
createSummaryMetaData(int summary,
int metaID)
Create a new summary meta data object. |
protected void |
createSummaryMetaTree()
Create the summary meta trees with the same hierarchy as the meta tree for the record type. |
protected com.klg.jclass.datasource.DataSourceTreeModel |
createSummaryMetaTree(com.klg.jclass.datasource.DataSourceTreeModel summaryTree,
int summary)
Create a summary meta tree with the same hierarchy as the meta tree for the record type. |
protected void |
createSummaryMetaTreeFromNode(com.klg.jclass.datasource.DataSourceTreeModel summaryTree,
com.klg.jclass.datasource.MetaDataModel rootMetaData,
com.klg.jclass.datasource.MetaDataModel rootSummary,
int summary)
Recursive helper routine to create the summary meta tree. |
void |
enableDataModelEvents(boolean value)
Enable or disable data model events. |
boolean |
fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event)
Pass event on to listeners of this DataModel. |
boolean |
fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event,
com.klg.jclass.datasource.DataModelListener listener)
Pass event on to listeners of this DataModel. |
TreeModel |
getAfterDetailsMetaTree()
Retrieves the after details meta tree. |
TreeModel |
getBeforeDetailsMetaTree()
Retrieves the before details meta tree. |
Object |
getCurrentDataItem(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.MetaDataModel myLevel,
String column)
Returns the data item at the specified MetaData level and column for the current row. |
com.klg.jclass.datasource.DataTableModel |
getCurrentDataTable(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.MetaDataModel myLevel)
Returns the DataTable at the specified MetaData level based on the current bookmark. |
long |
getCurrentGlobalBookmark()
Return the bookmark of the row which has the global cursor's focus. |
com.klg.jclass.datasource.DataTableModel |
getCurrentGlobalTable()
Return the DataTableModel currently in focus. |
TreeModel |
getDataTableTree()
Return a handle to the DataTree. |
boolean |
getEventsEnabled()
Return true if events are enabled, false otherwise. |
TreeModel |
getFooterMetaTree()
Retrieves the footer meta tree. |
Object |
getListeners()
Return a list of listeners on this DataModel. |
com.klg.jclass.datasource.MetaDataModel |
getMetaData(String metaDataName)
Get a MetaDataModel instance by name, or null if not found. |
TreeModel |
getMetaDataTree()
Return a handle to the MetaTree. |
String |
getModelName()
Get this model's name. |
boolean |
isModified()
Are there any pending modifications in any rows in this entire data model? |
boolean |
moveToRow(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.DataTableModel data_table,
long bookmark)
Called by observers to tell this data model to which row it should move. |
boolean |
moveToRow(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.DataTableModel data_table,
long bookmark,
boolean moveIdeCursor)
For internal use only. |
void |
removeDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
Remove a listener of this Data Model. |
void |
requeryAll(com.klg.jclass.datasource.DataModelListener originator)
Requery all DataTables. |
protected void |
resetSummaryDataTables(com.klg.jclass.higrid.HiGrid grid,
boolean clearCachedData)
Reset the summary data tables of all cached data. |
protected void |
resetSummaryDataTables(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel rootTable,
boolean clearCachedData)
Helper method to reset the summary data tables. |
void |
setModelName(String modelName)
Set this model's name. |
protected void |
setSummaryDataRoot(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel recordData)
Set the root for the summary data model. |
void |
updateAll(com.klg.jclass.datasource.DataModelListener originator)
Write all pending changes in all DataTables to the data source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FOOTER
public static final int BEFORE_DETAILS
public static final int AFTER_DETAILS
public static final int SUMMARY_ROWS
protected com.klg.jclass.datasource.DataModel dataModel
Constructor Detail |
protected HiGridData()
public HiGridData(com.klg.jclass.datasource.DataModel dataModel)
Method Detail |
public TreeModel getMetaDataTree()
getMetaDataTree
in interface DataModel
public TreeModel getDataTableTree()
getDataTableTree
in interface DataModel
public void addDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
addDataModelListener
in interface DataModel
DataModelListener
public void removeDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
removeDataModelListener
in interface DataModel
DataModelListener
public boolean moveToRow(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataTableModel data_table, long bookmark) throws DataModelException
moveToRow
in interface DataModel
originator
- the DataModelListener which initiated this actiondata_table
- the DataTable to which the cursor should be movedbookmark
- a long uniquely identify to which row the cursor
should move
DataModelException
- If move to row fails.public boolean moveToRow(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataTableModel data_table, long bookmark, boolean moveIdeCursor) throws DataModelException
moveToRow
in interface DataModel
originator
- the DataModelListener which initiated this actiondata_table
- the DataTable to which the cursor should be movedbookmark
- a long uniquely identify to which row the cursor
should movemoveIdeCursor
- a boolean indicating if this move should also cause
the ide's cursor to move
DataModelException
- If move to row fails.public void updateAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
updateAll
in interface DataModel
originator
- the DataModelListener which initiated this action
DataModelException
- If update fails.public void cancelAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
cancelAll
in interface DataModel
originator
- the DataModelListener which initiated this action
DataModelException
- If an exception occurs while canceling changes.public void requeryAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
requeryAll
in interface DataModel
originator
- the DataModelListener which initiated this action
DataModelException
- If requery fails.public Object getListeners()
getListeners
in interface DataModel
public boolean fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event)
fireDataModelEvent
in interface DataModel
event
- a DataModelEvent
public boolean fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event, com.klg.jclass.datasource.DataModelListener listener)
fireDataModelEvent
in interface DataModel
event
- a DataModelEventlistener
- the DataModelListener
public void enableDataModelEvents(boolean value)
This is different from the DataModelEvent BEGIN_EVENTS and END_EVENTS events where events are still sent but the listener having received the BEGIN_EVENTS event knows it may choose to disregard the events until the END_EVENTS event is received. They are given the choice.
Temporarily disabling events is more efficient than using the BEGIN/END_EVENTS method since the events are not dispatched to all listeners.
enableDataModelEvents
in interface DataModel
DataModelEvent
,
getEventsEnabled()
public boolean getEventsEnabled()
getEventsEnabled
in interface DataModel
enableDataModelEvents(boolean)
public void setModelName(String modelName)
setModelName
in interface DataModel
modelName
- a String which is to be this model's namepublic String getModelName()
getModelName
in interface DataModel
public com.klg.jclass.datasource.DataTableModel getCurrentGlobalTable()
getCurrentGlobalTable
in interface DataModel
moveToRow(com.klg.jclass.datasource.DataModelListener, com.klg.jclass.datasource.DataTableModel, long)
,
getCurrentGlobalBookmark()
public long getCurrentGlobalBookmark()
getCurrentGlobalBookmark
in interface DataModel
moveToRow(com.klg.jclass.datasource.DataModelListener, com.klg.jclass.datasource.DataTableModel, long)
,
getCurrentGlobalTable()
public boolean isModified()
isModified
in interface DataModel
public com.klg.jclass.datasource.DataTableModel getCurrentDataTable(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.MetaDataModel myLevel) throws DataModelException
Will create the table if it does not exist. In this case it will be the child of the current row in the parent, and so on.
getCurrentDataTable
in interface DataModel
originator
- the DataModelListener which initiated this action
DataModelException
- If get fails.public Object getCurrentDataItem(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.MetaDataModel myLevel, String column) throws DataModelException
Will create the table if it does not exist. In this case it will be the child of the current row in the parent, and so on.
getCurrentDataItem
in interface DataModel
originator
- the DataModelListener which initiated this action
DataModelException
- If get fails.public com.klg.jclass.datasource.MetaDataModel getMetaData(String metaDataName)
getMetaData
in interface DataModel
metaDataName
- a String which is the name of the MetaDataModel object
MetaDataModel.setDescription(java.lang.String)
,
MetaDataModel.getDescription()
public void clearCurrentPath(com.klg.jclass.datasource.MetaDataModel parentMeta)
clearCurrentPath
in interface DataModel
parentMeta
- the MetaDataModel whose children are to be
cleared.public TreeModel getFooterMetaTree()
public TreeModel getBeforeDetailsMetaTree()
public TreeModel getAfterDetailsMetaTree()
protected void createFooterMetaTree()
protected void createBeforeDetailsMetaTree()
protected void createAfterDetailsMetaTree()
protected void createSummaryMetaTree()
protected com.klg.jclass.datasource.DataSourceTreeModel createSummaryMetaTree(com.klg.jclass.datasource.DataSourceTreeModel summaryTree, int summary)
summaryTree
- The summary meta tree.summary
- The summary type.
protected void createSummaryMetaTreeFromNode(com.klg.jclass.datasource.DataSourceTreeModel summaryTree, com.klg.jclass.datasource.MetaDataModel rootMetaData, com.klg.jclass.datasource.MetaDataModel rootSummary, int summary)
summaryTree
- The summary meta tree.rootMetaData
- The record type root meta data.rootSummary
- The summary root meta data.summary
- The summary type.protected com.klg.jclass.datasource.MetaDataModel createSummaryMetaData(int summary, int metaID)
summary
- The summary type.metaID
- The meta id.
protected void setSummaryDataRoot(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel recordData)
grid
- The HiGrid instance.recordData
- The data table model for the record type.protected void createSummaryDataTable(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel recordData, com.klg.jclass.higrid.FormatNode node)
grid
- The HiGrid instance.recordData
- The data table model for the record type.node
- The format node of the level.protected void resetSummaryDataTables(com.klg.jclass.higrid.HiGrid grid, boolean clearCachedData)
grid
- The HiGrid instance.clearCachedData
- True if the cached data are to be removed.protected void resetSummaryDataTables(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel rootTable, boolean clearCachedData)
grid
- The HiGrid instance.rootTable
- The root record table.clearCachedData
- True if the cached data are to be removed.public void clearDataTableTreeUserData(Object user)
clearDataTableTreeUserData
in interface DataModel
user
- an Object, a reference to the user.public void clearDataTableTreeInternalData(Object user)
clearDataTableTreeInternalData
in interface DataModel
user
- an Object, a reference to the user.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |