|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.control.AbstractControllable<ITable>
javax.rad.genui.control.UITable
public class UITable
Platform and technology independent Table. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
JTable
Field Summary |
---|
Fields inherited from class javax.rad.genui.UIComponent |
---|
bTranslate, lLastTranslationModified, parent, popupMenu |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.ui.control.INavigationControl |
---|
NAVIGATION_CELL_AND_FOCUS, NAVIGATION_CELL_AND_ROW_AND_FOCUS, NAVIGATION_NONE, NAVIGATION_ROW_AND_FOCUS |
Fields inherited from interface javax.rad.model.ui.IControllable |
---|
COMMAND_DELETE, COMMAND_DUPLICATE, COMMAND_EDIT, COMMAND_EXPORT, COMMAND_FIRST, COMMAND_INSERT, COMMAND_INSERT_SUB, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS, COMMAND_RESTORE, COMMAND_SEARCH |
Constructor Summary | |
---|---|
|
UITable()
Creates a new instance of UITable . |
|
UITable(IDataBook pDataBook)
Creates a new instance of UITable with the given
data book. |
|
UITable(IDataBook pDataBook,
ColumnView pColumnView)
Creates a new instance of UITable with the given
data book and column view. |
protected |
UITable(ITable pTable)
Creates a new instance of UITable with the given
table. |
protected |
UITable(ITable pTable,
IDataBook pDataBook,
ColumnView pColumnView)
Creates a new instance of UITable with the given
table, data book and column view. |
Method Summary | |
---|---|
void |
cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook . |
protected java.lang.String |
createComponentName()
Creates a name for this UIComponent . |
void |
doEdit()
Starts editing. |
IDataBook |
getActiveDataBook()
Gets the controllable IDataBook for this IControllable . |
ICellFormatter |
getCellFormatter()
Gets the ICellFormatter . |
ColumnView |
getColumnView()
Returns the ColumnView displayed by this control. |
IDataBook |
getDataBook()
Returns the DataBook displayed by this control. |
int |
getEnterNavigationMode()
Gets the navigation mode for the ENTER key. |
int |
getMaxRowHeight()
Gets the max row height for automatic calculation. |
int |
getMinRowHeight()
Gets the min row height for automatic calculation. |
int |
getRowHeight()
Gets the row height. |
int |
getTabNavigationMode()
Gets the navigation mode for the TAB key. |
boolean |
isAutoResize()
Gets true, if the ITable is in auto resize mode. |
boolean |
isEditable()
Gets if editable or not. |
boolean |
isMouseEventOnSelectedCell()
True, if the mouse event occured on current selected cell. |
boolean |
isShowFocusRect()
Gets if showing the focus rect or not. |
boolean |
isShowGridLines()
Gets if the horizontal lines or vertical lines are shown. |
boolean |
isShowHorizontalLines()
Gets if showing the vertical lines or not. |
boolean |
isShowSelection()
Gets if showing the selection or not. |
boolean |
isShowVerticalLines()
Gets if showing the vertical lines or not. |
boolean |
isSortOnHeaderEnabled()
Gets true, if it is possible sorting the data by clicking on the header. |
boolean |
isTableHeaderVisible()
Gets the visibility of the table header. |
void |
notifyRepaint()
The control need to check if the part is visible and then repaint the part. |
void |
saveEditing()
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow . |
void |
setAutoResize(boolean pAutoResize)
Sets true, if the ITable is in auto resize mode. |
void |
setCellFormatter(ICellFormatter pCellFormatter)
Sets the ICellFormatter . |
void |
setCellFormatter(java.lang.Object pCellFormatter,
java.lang.String pMethodName)
Sets the cell formatter. |
void |
setColumnView(ColumnView pColumnView)
Sets the ColumnView displayed by this control. |
void |
setDataBook(IDataBook pDataBook)
Sets the DataBook displayed by this control. |
void |
setEditable(boolean pEditable)
Sets if editable or not. |
void |
setEnterNavigationMode(int pNavigationMode)
Sets the navigation mode for the ENTER key. |
void |
setMaxRowHeight(int pMaxRowHeight)
Sets the max row height for automatic calculation. |
void |
setMinRowHeight(int pMinRowHeight)
Sets the min row height for automatic calculation. |
void |
setRowHeight(int pRowHeight)
Sets the row height. |
void |
setShowFocusRect(boolean pShowFocusRect)
Sets if showing the focus rect or not. |
void |
setShowGridLines(boolean pShowVerticalLines)
Sets if the horizontal lines or vertical lines are shown. |
void |
setShowHorizontalLines(boolean pShowHorizontalLines)
Sets if showing the vertical lines or not. |
void |
setShowSelection(boolean pShowSelection)
Sets if showing the selection or not. |
void |
setShowVerticalLines(boolean pShowVerticalLines)
Sets if showing the vertical lines or not. |
void |
setSortOnHeaderEnabled(boolean pSortOnHeaderEnabled)
Set true, if it should possible sorting the data by clicking on the header. |
void |
setTableHeaderVisible(boolean pTableHeaderVisible)
Sets the visibility of the table header. |
void |
setTabNavigationMode(int pNavigationMode)
Sets the navigation mode for the TAB key. |
void |
startEditing()
Informs the GUI control, that the editor should be opened. |
void |
updateTranslation()
Notification for updating the translation. |
Methods inherited from class javax.rad.genui.control.AbstractControllable |
---|
addNotify, createCellFormatter, createNodeFormatter, doCommand, doDelete, doDuplicate, doExport, doFirst, doInsert, doInsertSub, doLast, doNext, doNotifyController, doPrevious, doRestore, doSearch, getController, isCommandEnabled, isDeleteEnabled, isDuplicateEnabled, isEditEnabled, isExportEnabled, isFirstEnabled, isInsertEnabled, isInsertSubEnabled, isLastEnabled, isNextEnabled, isPreviousEnabled, isRestoreEnabled, isSearchEnabled, removeNotify, setController |
Methods inherited from class javax.rad.genui.UIResource |
---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.ui.control.ITable |
---|
getTranslation, setTranslation |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Methods inherited from interface javax.rad.model.ui.ITranslatable |
---|
isTranslationEnabled, setTranslationEnabled |
Methods inherited from interface javax.rad.util.ITranslator |
---|
translate |
Constructor Detail |
---|
public UITable()
UITable
.
ITable
public UITable(IDataBook pDataBook)
UITable
with the given
data book.
pDataBook
- the data book.setDataBook(IDataBook)
public UITable(IDataBook pDataBook, ColumnView pColumnView)
UITable
with the given
data book and column view.
pDataBook
- the data book.pColumnView
- the column view.setDataBook(IDataBook)
,
setColumnView(ColumnView)
protected UITable(ITable pTable)
UITable
with the given
table.
pTable
- the tableITable
protected UITable(ITable pTable, IDataBook pDataBook, ColumnView pColumnView)
UITable
with the given
table, data book and column view.
pTable
- the table.pDataBook
- the data book.pColumnView
- the column view.ITable
,
setDataBook(IDataBook)
,
setColumnView(ColumnView)
Method Detail |
---|
public IDataBook getDataBook()
getDataBook
in interface ITableControl
ITableControl.setDataBook(javax.rad.model.IDataBook)
public void setDataBook(IDataBook pDataBook)
setDataBook
in interface ITableControl
pDataBook
- the DataBookITableControl.getDataBook()
public IDataBook getActiveDataBook()
IDataBook
for this IControllable
.
IEditorControl should return the set data row, if it is instanceof IDataBook or null otherwise.
ITableControl should return the set data book.
ITreeControl should return the data book of the current selected node.
The controller has to be informed, If the databook changes on a focused IControllable.
eg: ITreeControl node selection of a different databook.
Editor or table has the focus, and a different databook is set on editor or table.
getActiveDataBook
in interface IControllable
IDataBook
public ColumnView getColumnView()
getColumnView
in interface ITable
ITable.setColumnView(javax.rad.model.ColumnView)
public void setColumnView(ColumnView pColumnView)
setColumnView
in interface ITable
pColumnView
- the ColumnViewITable.getColumnView()
public boolean isAutoResize()
isAutoResize
in interface ITable
public void setAutoResize(boolean pAutoResize)
setAutoResize
in interface ITable
pAutoResize
- true, if the ITable is in auto resize mode.public int getMaxRowHeight()
getMaxRowHeight
in interface ITable
public int getMinRowHeight()
getMinRowHeight
in interface ITable
public int getRowHeight()
getRowHeight
in interface ITable
public void setMaxRowHeight(int pMaxRowHeight)
setMaxRowHeight
in interface ITable
pMaxRowHeight
- the max row height for automatic calculation.public void setMinRowHeight(int pMinRowHeight)
setMinRowHeight
in interface ITable
pMinRowHeight
- the min row height for automatic calculation.public void setRowHeight(int pRowHeight)
setRowHeight
in interface ITable
pRowHeight
- the row height.public boolean isTableHeaderVisible()
isTableHeaderVisible
in interface ITable
public void setTableHeaderVisible(boolean pTableHeaderVisible)
setTableHeaderVisible
in interface ITable
pTableHeaderVisible
- the visibility of the table header.public boolean isSortOnHeaderEnabled()
isSortOnHeaderEnabled
in interface ITable
public void setSortOnHeaderEnabled(boolean pSortOnHeaderEnabled)
setSortOnHeaderEnabled
in interface ITable
pSortOnHeaderEnabled
- true, if it is possible sorting the data by clicking on the header.public int getEnterNavigationMode()
ENTER
key.
getEnterNavigationMode
in interface INavigationControl
ENTER
key.INavigationControl.NAVIGATION_NONE
,
INavigationControl.NAVIGATION_CELL_AND_FOCUS
,
INavigationControl.NAVIGATION_CELL_AND_ROW_AND_FOCUS
,
INavigationControl.NAVIGATION_ROW_AND_FOCUS
public int getTabNavigationMode()
TAB
key.
getTabNavigationMode
in interface INavigationControl
TAB
key.INavigationControl.NAVIGATION_NONE
,
INavigationControl.NAVIGATION_CELL_AND_FOCUS
,
INavigationControl.NAVIGATION_CELL_AND_ROW_AND_FOCUS
,
INavigationControl.NAVIGATION_ROW_AND_FOCUS
public void setEnterNavigationMode(int pNavigationMode)
ENTER
key.
setEnterNavigationMode
in interface INavigationControl
pNavigationMode
- the navigation mode for the ENTER
key.INavigationControl.NAVIGATION_NONE
,
INavigationControl.NAVIGATION_CELL_AND_FOCUS
,
INavigationControl.NAVIGATION_CELL_AND_ROW_AND_FOCUS
,
INavigationControl.NAVIGATION_ROW_AND_FOCUS
public void setTabNavigationMode(int pNavigationMode)
TAB
key.
setTabNavigationMode
in interface INavigationControl
pNavigationMode
- the navigation mode for the TAB
key.INavigationControl.NAVIGATION_NONE
,
INavigationControl.NAVIGATION_CELL_AND_FOCUS
,
INavigationControl.NAVIGATION_CELL_AND_ROW_AND_FOCUS
,
INavigationControl.NAVIGATION_ROW_AND_FOCUS
public void notifyRepaint()
notifyRepaint
in interface IControl
public void startEditing()
startEditing
in interface ITableControl
public void saveEditing() throws ModelException
IDataBook
or IDataRow
.
saveEditing
in interface IControl
ModelException
- if the value can not be stored.public void cancelEditing()
DataBook
.
cancelEditing
in interface IControl
public ICellFormatter getCellFormatter()
ICellFormatter
.
The ICellFormatter
will be called for every cell and can return a
style for that cell.
getCellFormatter
in interface ICellFormatable
ICellFormatter
.ICellFormatable.setCellFormatter(ICellFormatter)
public void setCellFormatter(ICellFormatter pCellFormatter)
ICellFormatter
.
The ICellFormatter
will be called for every cell and can return a
style for that cell.
setCellFormatter
in interface ICellFormatable
pCellFormatter
- the ICellFormatter
.ICellFormatable.getCellFormatter()
public void setCellFormatter(java.lang.Object pCellFormatter, java.lang.String pMethodName)
pCellFormatter
- the cell formatter.pMethodName
- the method name.public boolean isEditable()
isEditable
in interface ITable
public void setEditable(boolean pEditable)
setEditable
in interface ITable
pEditable
- if editable or not.public boolean isShowSelection()
isShowSelection
in interface ITable
public void setShowSelection(boolean pShowSelection)
setShowSelection
in interface ITable
pShowSelection
- showing the selection or not.public boolean isShowFocusRect()
isShowFocusRect
in interface ITable
public void setShowFocusRect(boolean pShowFocusRect)
setShowFocusRect
in interface ITable
pShowFocusRect
- showing the focus rect or not.public boolean isShowVerticalLines()
isShowVerticalLines
in interface ITable
public void setShowVerticalLines(boolean pShowVerticalLines)
setShowVerticalLines
in interface ITable
pShowVerticalLines
- showing the vertical lines or not.public boolean isShowHorizontalLines()
isShowHorizontalLines
in interface ITable
public void setShowHorizontalLines(boolean pShowHorizontalLines)
setShowHorizontalLines
in interface ITable
pShowHorizontalLines
- showing the vertical lines or not.public boolean isShowGridLines()
public void setShowGridLines(boolean pShowVerticalLines)
pShowVerticalLines
- true, the horizontal lines or vertical lines are shown.public boolean isMouseEventOnSelectedCell()
isMouseEventOnSelectedCell
in interface ITable
public void updateTranslation()
UIComponent
will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation
in class UIComponent<ITable>
UIComponent.setTranslation(TranslationMap)
,
UIComponent.addNotify()
protected java.lang.String createComponentName()
UIComponent
.
The returned name needs to be unique in the current root/workscreen and
is ideally, but not necessarily, prefixed with the UIComponent.sRootName
,
if there is any.
Overriding classes should be aware that this method will be called in
UIComponent.addNotify()
and the returned name will only be assigned to the
UIComponent
if there isn't already a name set. Also
UIComponent.stExistingNames
can be used to find out if a name has already
been assigned, and UIComponent.sRootName
to get the root name.
In rare cases UIComponent.stExistingNames
and/or UIComponent.sRootName
might
be null
when this method is called.
createComponentName
in class UIComponent<ITable>
UIComponent
.UIComponent.getExistingNames()
,
UIComponent.getRootName()
,
UIComponent.incrementNameIfExists(String, Set, boolean)
public void doEdit()
doEdit
in class AbstractControllable<ITable>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |