|
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 | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.table.JCTable | +--com.klg.jclass.table.beans.LiveTable | +--com.klg.jclass.table.db.DataTable
This is data aware Table
subclass.
It displays data from the data source and
allows to change the data and save them back to the data source.
This component navigates the result set of a data bean and can insert and delete
records, cancel, save and requery data in the data source.
The class is not a bean, but a common ancestor of all data aware table beans.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static String[] |
commands
|
protected boolean |
useDatasourceEditable
|
Fields inherited from class com.klg.jclass.table.beans.LiveTable |
cellRenderer, numColumns, numRows |
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 | |
protected |
DataTable()
Protected DataTable constructor. |
Method Summary | |
void |
actionPerformed(ActionEvent event)
Handles the popup menu commands. |
void |
afterTraverseCell(com.klg.jclass.table.JCTraverseCellEvent e)
Invoked after the cell is traversed to if all listeners notified through traverseCell accepted the destination. |
protected boolean |
beforeCurrentRowChange()
Saves the value from the current editor to the data source before the current row has been changed. |
protected void |
cancelAll()
|
protected void |
cancelRows()
|
protected void |
commitAll()
|
protected void |
commitRows()
|
protected com.klg.jclass.table.TablePopupMenu |
createPopupMenu()
Creates data binding specific portion of the popup menu. |
protected void |
delete()
|
protected Class |
getColumnClass(int column)
Returns the class of a given column in the datasource. |
protected com.klg.jclass.table.db.DataBoundSource |
getDataBeanSource()
Returns DataBoundSource for the table. |
protected String |
getDataBinding()
Returns the table's value of the DataBinding object property. |
protected Object |
getNativeMetaData()
Returns the IDE specific metadata object bound to the table. |
protected com.klg.jclass.table.JCCellRange |
getSelection()
|
boolean |
getUseDatasourceEditable()
Gets the useDatasourceEditable property. |
protected void |
initDataBinding(com.klg.jclass.table.db.DataBoundSource dataSource)
Verifies that a new data source is valid and binds the table. |
protected void |
insert()
|
protected void |
makeDataSource()
|
protected void |
requeryAll()
|
protected void |
requeryRows()
|
protected boolean |
setDataBinding(com.klg.jclass.datasource.DataModel dataModel,
com.klg.jclass.datasource.MetaDataModel metaDataModel)
Sets up parameters to bind the DataBoundSource
to a MetaDataModel in the
given DataModel . |
protected void |
setDataSource(com.klg.jclass.datasource.BindingModel binding)
Bind using a Binding |
void |
setDataSource(com.klg.jclass.datasource.DataModel dataModel)
Binds the table to the given DataModel and to the
root MetaDataModel . |
void |
setDataSource(com.klg.jclass.datasource.DataModel dataModel,
com.klg.jclass.datasource.MetaDataModel metaDataModel)
Binds the table to the given DataModel and MetaDataModel . |
protected void |
setDataSource(com.klg.jclass.datasource.DataModel dataModel,
String metaDescription)
Sets the data source to a DataModel and binds the MetaData to
the MetaDataModel represented by
a "path" of MetaDataModel
descriptions separated by '|' (e.g. |
protected void |
setDataSource(String dataBinding)
Sets the DataBinding property value to the table. |
void |
setDataSource(com.klg.jclass.table.TableDataModel dataSource)
Overwrites the superclass setDataSource
to support enabling/disabling menu items. |
void |
setUseDatasourceEditable(boolean b)
Sets the useDatasourceEditable property. |
protected void |
tableChanged()
Cancel the editing and updates the table state, because the data source data table was changed. |
void |
traverseCell(com.klg.jclass.table.JCTraverseCellEvent e)
Invoked before a cell is traversed to. |
protected void |
updateEditors()
Updates cell editors according to the datasource table column types. |
Methods inherited from class com.klg.jclass.table.beans.LiveTable |
createArray, createArray2D, createCellStyle, createVector, createVector, getAbout, getCellSize, getData, getFrameBorderType, getFrozenCellLayout, getLabelLayout, getNumEditorColumns, getNumEditorRows, getSBLayout, getSelectedRange, getSpannedCells, getStyles, getSwingDataModel, makeDataSource, makePositionsArray, setAbout, setCellRenderer, setCellSize, setData, setFrameBorderType, setFrozenCellLayout, setLabelLayout, setNumEditorColumns, setNumEditorRows, setSBLayout, setSpannedCells, setStyles, setSwingDataModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean useDatasourceEditable
public static final String[] commands
Constructor Detail |
protected DataTable()
DataTable
constructor.
The constructor must not be called
directly, but only from it's subclasses.
Method Detail |
protected com.klg.jclass.table.TablePopupMenu createPopupMenu()
createPopupMenu
in class JCTable
public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
actionPerformed
in class JCTable
event
- the event generated by the actionpublic void setDataSource(com.klg.jclass.table.TableDataModel dataSource)
setDataSource
to support enabling/disabling menu items.
setDataSource
in class JCTable
dataSource
- the new data source for this tablepublic void setDataSource(com.klg.jclass.datasource.DataModel dataModel)
DataModel
and to the
root MetaDataModel
.
public void setDataSource(com.klg.jclass.datasource.DataModel dataModel, com.klg.jclass.datasource.MetaDataModel metaDataModel)
DataModel
and MetaDataModel
.
protected void setDataSource(String dataBinding)
DataBinding
property value to the table.
Sets a table datasource for the data binding hierarchy string,
starting from a JCTreeData
instance name and containing full sequence of
MetaDataModel
levels starting from the root
to the level the table is bound with.
getDataBinding()
protected void setDataSource(com.klg.jclass.datasource.DataModel dataModel, String metaDescription)
MetaData
to
the MetaDataModel
represented by
a "path" of MetaDataModel
descriptions separated by '|' (e.g. Orders|Customers).
protected void setDataSource(com.klg.jclass.datasource.BindingModel binding)
Binding
protected void initDataBinding(com.klg.jclass.table.db.DataBoundSource dataSource)
protected String getDataBinding()
DataBinding
object property.
Returns the data binding hierarchy string, starting from a
JCTreeData
instance name
and containing full sequence of MetaDataModel
levels starting from the root to the level
the table is bound with.
DataBinding
property specifies a string,
describing a JCTreeData
instance and
meta data level of the instance this table is bound with.
The format of the property
is as follows:
<JCTreeData name>:<MetaDataModel description>[|<MetaDataModel description>...]
setDataBinding(com.klg.jclass.datasource.DataModel, com.klg.jclass.datasource.MetaDataModel)
,
JCTreeData
,
MetaDataModel
protected boolean setDataBinding(com.klg.jclass.datasource.DataModel dataModel, com.klg.jclass.datasource.MetaDataModel metaDataModel)
DataBoundSource
to a MetaDataModel
in the
given DataModel
.
protected void tableChanged()
protected boolean beforeCurrentRowChange()
protected com.klg.jclass.table.JCCellRange getSelection()
protected void insert()
protected void delete()
protected void cancelRows()
protected void cancelAll()
protected void requeryRows()
protected void requeryAll()
protected void commitRows()
protected void commitAll()
public void traverseCell(com.klg.jclass.table.JCTraverseCellEvent e)
setCancelled
method can be called to prevent the traversal or the destination cell
can be modified.
traverseCell
in interface JCTraverseCellListener
e
- JCTraverseCellEvent.setCancelled(boolean)
,
JCTraverseCellEvent.setNextRow(int)
,
JCTraverseCellEvent.setNextColumn(int)
public void afterTraverseCell(com.klg.jclass.table.JCTraverseCellEvent e)
traverseCell
accepted the destination. If a listener
cancelled the traversal in traverseCell
, afterTraverseCell will
be called with the cancelled flag set and the destination the same as the
source location.
afterTraverseCell
in interface JCTraverseCellListener
e
- traverseCell(com.klg.jclass.table.JCTraverseCellEvent)
,
JCTraverseCellEvent.isCancelled()
protected com.klg.jclass.table.db.DataBoundSource getDataBeanSource()
protected Object getNativeMetaData()
public void setUseDatasourceEditable(boolean b)
getUseDatasourceEditable()
public boolean getUseDatasourceEditable()
useDatasourceEditable
property.
setUseDatasourceEditable(boolean)
protected void updateEditors()
protected Class getColumnClass(int column)
getColumnClass
in class JCTable
column
- the column index of the column whose class is required
protected void makeDataSource()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |