|
||||||||||
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.JScrollPane
com.sibvisions.rad.ui.swing.ext.JVxScrollPane
com.sibvisions.rad.ui.swing.ext.JVxTable
public class JVxTable
Scrollable JTable that implements ITableControl interface.
Nested Class Summary | |
---|---|
static class |
JVxTable.CellEditorPane
CellEditorPane provides different editor sizes as the cell has. |
static class |
JVxTable.DataBookTableColumnModel
Implements the JTable model interfaces with the given IDataBook. |
static class |
JVxTable.DataBookTableModel
Implements the TableModel interfaces with the given IDataBook. |
static class |
JVxTable.GenericTableCellHandler
The GenericTableCellEditor is a wrapper, that provides ICellEditor functionality. |
static class |
JVxTable.StrikeThroughEmptyBorder
EmptyBorder with strike through functionality. |
static class |
JVxTable.StrikeThroughLineBorder
LineBorder with strike through functionality. |
Nested classes/interfaces inherited from class javax.swing.JScrollPane |
---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JScrollPane |
---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
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 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.ICellEditorListener |
---|
ACTION_KEY, ENTER_KEY, ESCAPE_KEY, FOCUS_LOST, SHIFT_ENTER_KEY, SHIFT_TAB_KEY, TAB_KEY |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JVxTable()
Constructs a JVxTable. |
Method Summary | |
---|---|
void |
addNotify()
|
void |
cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook . |
void |
dataBookChanged(DataBookEvent pDataBookEvent)
Notifies that the IDataBook is changed. |
void |
editingComplete(String pCompleteType)
Informs the ICellEditorListener that the editing is completed. |
void |
editingStarted()
Informs the ICellEditorListener that the editing has started. |
void |
focusGained(FocusEvent pFocusEvent)
|
void |
focusLost(FocusEvent pFocusEvent)
|
ICellEditorHandler<JComponent> |
getCellEditorHandler()
The current used CellEditor for editing. |
ICellFormatter |
getCellFormatter()
Gets the CellFormatter. |
ColumnView |
getColumnView()
Returns the ColumnView displayed by this control. |
IDataBook |
getDataBook()
Returns the DataBook displayed by this control. |
int |
getEnterNavigationMode()
Gets the ENTER navigation mode. |
JTable |
getJTable()
Gets the JTable used by JVxTable. |
int |
getMaxRowHeight()
Gets the maximal row height. |
int |
getMinRowHeight()
Gets the minimal row height. |
Dimension |
getPreferredSize()
Returns the preferred size in a bit different way as JScrollPane. |
int |
getRowHeight()
Get the row height. |
int |
getTabNavigationMode()
Gets the ENTER navigation mode. |
TranslationMap |
getTranslation()
Gets the possible translation mapping for this UIComponent . |
boolean |
isAutoFillEmptySpace()
Gets true, empty space is automatically filled with existing columns. |
boolean |
isAutoResize()
Gets true, if the JVxTable is in auto resize mode. |
boolean |
isEditable()
Gets if editable or not. |
boolean |
isSavingImmediate()
Tells whether the CellEditor should save immediate. |
boolean |
isShowFocusRect()
Gets if showing the focus rect or not. |
boolean |
isShowSelection()
Gets if showing the selection 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 |
keyPressed(KeyEvent pKeyEvent)
|
void |
keyReleased(KeyEvent pKeyEvent)
|
void |
keyTyped(KeyEvent pKeyEvent)
|
void |
mousePressed(MouseEvent pMouseEvent)
|
void |
mouseReleased(MouseEvent pMouseEvent)
|
void |
notifyRepaint()
The control need to check if the part is visible and then repaint the part. |
void |
openComboBox()
Opens the combo box, if possible. |
void |
removeNotify()
|
void |
reshape(int pX,
int pY,
int pWidth,
int pHeight)
Deprecated. |
void |
run()
The run method is invoked from AWT EventQueue. |
void |
saveEditing()
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow . |
void |
scrollToSelectedCell()
Scrolls the selected Cell in the visible Region of the JVxTable. |
void |
selectNext(int pNavigationMode)
Selects the next. |
void |
selectNextCell(boolean pDelegateFocus)
Selects the next cell. |
void |
selectNextCellAndRow(boolean pDelegateFocus)
Selects the next cell and row. |
void |
selectNextPage(boolean pDelegateFocus)
Selects the next row. |
void |
selectNextRow(boolean pDelegateFocus)
Selects the next row. |
void |
selectPrevious(int pNavigationMode)
Selects the next. |
void |
selectPreviousCell(boolean pDelegateFocus)
Selects the previous cell. |
void |
selectPreviousCellAndRow(boolean pDelegateFocus)
Selects the previous cell and row. |
void |
selectPreviousPage(boolean pDelegateFocus)
Selects the previous cell. |
void |
selectPreviousRow(boolean pDelegateFocus)
Selects the previous cell. |
void |
setAutoFillEmptySpace(boolean pAutoFillEmptySpace)
Set true, empty space is automatically filled with existing columns. |
void |
setAutoResize(boolean pAutoResize)
Sets true, if the JVxTable is in auto resize mode. |
void |
setBackground(Color pColor)
Sets the background of the table and the viewport. |
protected void |
setCellEditorHandler(ICellEditorHandler pCellEditorHandler)
Sets the current used ICellEditorHandler for editing. |
void |
setCellFormatter(ICellFormatter pCellFormatter)
Sets the CellFormatter. |
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 |
setEnabled(boolean pEnabled)
|
void |
setEnterNavigationMode(int pNavigationMode)
Sets the ENTER navigation mode. |
void |
setMaxRowHeight(int pMaxRowHeight)
Set the maximal row height. |
void |
setMinRowHeight(int pMinRowHeight)
Set the minimal row height. |
void |
setRowHeight(int pRowHeight)
Set the row height. |
void |
setShowFocusRect(boolean pShowFocusRect)
Sets if showing the focus rect or not. |
void |
setShowSelection(boolean pShowSelection)
Sets if showing the selection 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 ENTER navigation mode. |
void |
setTranslation(TranslationMap pTranslation)
Sets the possible translations for this UIComponent . |
void |
startEditing()
Informs the GUI control, that the editor should be opened. |
protected String |
translate(String pText)
Translates the pText with the mapped translations. |
void |
valueChanged(ListSelectionEvent pListSelectionEvent)
|
void |
valuesChanged(DataRowEvent pDataRowEvent)
Notifies that values on an IDataRow are changed. |
Methods inherited from class com.sibvisions.rad.ui.swing.ext.JVxScrollPane |
---|
getPreferredComponentSize, getViewportView, mouseClicked, mouseEntered, mouseExited, setViewport |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JVxTable()
Method Detail |
---|
public void run()
run
in interface Runnable
public void mousePressed(MouseEvent pMouseEvent)
mousePressed
in interface MouseListener
mousePressed
in class JVxScrollPane
public void mouseReleased(MouseEvent pMouseEvent)
mouseReleased
in interface MouseListener
mouseReleased
in class JVxScrollPane
public void valueChanged(ListSelectionEvent pListSelectionEvent)
valueChanged
in interface ListSelectionListener
public void notifyRepaint()
notifyRepaint
in interface IControl
public void startEditing()
startEditing
in interface ITableControl
public void cancelEditing()
DataBook
.
cancelEditing
in interface IControl
public void saveEditing() throws ModelException
IDataBook
or IDataRow
.
saveEditing
in interface IControl
ModelException
- if the value can not be stored.public void setTranslation(TranslationMap pTranslation)
UIComponent
.
setTranslation
in interface ITranslatable
pTranslation
- the translation mappingpublic TranslationMap getTranslation()
UIComponent
.
getTranslation
in interface ITranslatable
public void keyPressed(KeyEvent pKeyEvent)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent pKeyEvent)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent pKeyEvent)
keyTyped
in interface KeyListener
public void focusGained(FocusEvent pFocusEvent)
focusGained
in interface FocusListener
public void focusLost(FocusEvent pFocusEvent)
focusLost
in interface FocusListener
public void dataBookChanged(DataBookEvent pDataBookEvent) throws ModelException
dataBookChanged
in interface IDataBookListener
pDataBookEvent
- gives information about the changed IDataBook, the type of change and the original IDataRow.
ModelException
- if a ModelException occurs.public void valuesChanged(DataRowEvent pDataRowEvent) throws ModelException
valuesChanged
in interface IDataRowListener
pDataRowEvent
- gives information about the changed IDataRow, the changed columns and the original IDataRow.
ModelException
- if a ModelException occurs.public void editingStarted()
ICellEditorListener
that the editing has started.
He has to Register the IControl on the IDataRow with registerEditingControl.
editingStarted
in interface ICellEditorListener
public void editingComplete(String pCompleteType)
ICellEditorListener
that the editing is completed.
He has to Unregister the IControl on the IDataRow with unregisterEditingControl.
editingComplete
in interface ICellEditorListener
pCompleteType
- the type of completion.public boolean isSavingImmediate()
isSavingImmediate
in interface ICellEditorListener
public void addNotify()
addNotify
in class JComponent
public void removeNotify()
removeNotify
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JVxScrollPane
public void setBackground(Color pColor)
setBackground
in class JComponent
pColor
- the background colorpublic void setEnabled(boolean pEnabled)
setEnabled
in class JComponent
@Deprecated public void reshape(int pX, int pY, int pWidth, int pHeight)
reshape
in class JComponent
public IDataBook getDataBook()
getDataBook
in interface ITableControl
setDataBook(javax.rad.model.IDataBook)
public void setDataBook(IDataBook pDataBook)
setDataBook
in interface ITableControl
pDataBook
- the DataBookgetDataBook()
public ColumnView getColumnView()
ColumnView
displayed by this control. If null
is set,
the default column view from the data book is returned.
setColumnView(javax.rad.model.ColumnView)
public void setColumnView(ColumnView pColumnView)
pColumnView
- the column viewgetColumnView()
public ICellFormatter getCellFormatter()
getCellFormatter
in interface ICellFormatterEditorListener
setCellFormatter(com.sibvisions.rad.ui.swing.ext.format.ICellFormatter)
public void setCellFormatter(ICellFormatter pCellFormatter)
pCellFormatter
- the CellFormattergetCellFormatter()
public boolean isTableHeaderVisible()
public void setTableHeaderVisible(boolean pTableHeaderVisible)
pTableHeaderVisible
- the visibility of the table header.public boolean isSortOnHeaderEnabled()
public void setSortOnHeaderEnabled(boolean pSortOnHeaderEnabled)
pSortOnHeaderEnabled
- true, if it is possible sorting the data by clicking on the header.public boolean isAutoFillEmptySpace()
public void setAutoFillEmptySpace(boolean pAutoFillEmptySpace)
pAutoFillEmptySpace
- true, empty space is automatically filled with existing columns.public int getEnterNavigationMode()
getEnterNavigationMode
in interface INavigationControl
public void setEnterNavigationMode(int pNavigationMode)
setEnterNavigationMode
in interface INavigationControl
pNavigationMode
- the ENTER navigation mode.public int getTabNavigationMode()
getTabNavigationMode
in interface INavigationControl
public void setTabNavigationMode(int pNavigationMode)
setTabNavigationMode
in interface INavigationControl
pNavigationMode
- the ENTER navigation mode.public int getRowHeight()
public void setRowHeight(int pRowHeight)
pRowHeight
- the row height.public int getMinRowHeight()
public void setMinRowHeight(int pMinRowHeight)
pMinRowHeight
- the minimal row height.public int getMaxRowHeight()
public void setMaxRowHeight(int pMaxRowHeight)
pMaxRowHeight
- the maximal row height.public JTable getJTable()
public boolean isAutoResize()
public void setAutoResize(boolean pAutoResize)
pAutoResize
- true, if the JVxTable is in auto resize mode.public ICellEditorHandler<JComponent> getCellEditorHandler()
protected void setCellEditorHandler(ICellEditorHandler pCellEditorHandler)
pCellEditorHandler
- the current used ICellEditorHandler for editing.public void scrollToSelectedCell()
public void openComboBox()
public void selectNext(int pNavigationMode)
pNavigationMode
- the navigation mode.public void selectPrevious(int pNavigationMode)
pNavigationMode
- the navigation mode.public void selectNextCell(boolean pDelegateFocus)
pDelegateFocus
- if true, after the last cell the next component is focused.public void selectPreviousCell(boolean pDelegateFocus)
pDelegateFocus
- if true, after the first cell the previous component is focused.public void selectNextCellAndRow(boolean pDelegateFocus)
pDelegateFocus
- if true, after the last cell the next component is focused.public void selectPreviousCellAndRow(boolean pDelegateFocus)
pDelegateFocus
- if true, after the first cell the previous component is focused.public void selectNextRow(boolean pDelegateFocus)
pDelegateFocus
- if true, after the last row the next component is focused.public void selectPreviousRow(boolean pDelegateFocus)
pDelegateFocus
- if true, after the first cell the previous component is focused.public void selectNextPage(boolean pDelegateFocus)
pDelegateFocus
- if true, after the last row the next component is focused.public void selectPreviousPage(boolean pDelegateFocus)
pDelegateFocus
- if true, after the first cell the previous component is focused.protected String translate(String pText)
pText
with the mapped translations.
pText
- the text to translate
pText
based on the translation mapping or
pText
if there is no translation availablesetTranslation(TranslationMap)
public boolean isEditable()
public void setEditable(boolean pEditable)
pEditable
- if editable or not.public boolean isShowSelection()
public void setShowSelection(boolean pShowSelection)
pShowSelection
- showing the selection or not.public boolean isShowFocusRect()
public void setShowFocusRect(boolean pShowFocusRect)
pShowFocusRect
- showing the focus rect or not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |