com.sibvisions.rad.ui.web.impl.control
Class WebTable

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebComponent
          extended by com.sibvisions.rad.ui.web.impl.control.LinkTableCache
              extended by com.sibvisions.rad.ui.web.impl.control.WebTable
All Implemented Interfaces:
Runnable, IDataBookListener, IDataRowListener, IControl, ITable, IAlignmentConstants, IComponent, IResource

public class WebTable
extends LinkTableCache
implements ITable, IDataBookListener, IDataRowListener, Runnable

Web server implementation of ITable.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
WebTable()
          Creates a new instance of WebTable.
 
Method Summary
 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.
 ICellFormatter getCellFormatter()
          Gets the cell formatter.
 IDataBook getDataBook()
          Returns the DataBook displayed by this control.
 TranslationMap getTranslation()
          Gets the possible translation mapping for this UIComponent.
 boolean isAutoResize()
          Gets true, if the ITable is in auto resize mode.
 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 run()
          
 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 cell formatter.
 void setCellFormatter(Object pCellFormatter, String pMethodName)
          Sets the cell formatter.
 void setDataBook(IDataBook pDataBook)
          Sets the DataBook displayed by this control.
 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 setTranslation(TranslationMap pTranslation)
          Sets the possible translations for this UIComponent.
 void valuesChanged(DataRowEvent pDataRowEvent)
          Notifies that values on an IDataRow are changed.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.control.LinkTableCache
addLinkTable, getLinkTable, removeLinkTable
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, finalize, getAsString, getBackground, getBounds, getChangedProperties, getComponentId, getComponentName, getConstraints, getCursor, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getProperty, getSize, getToolTipText, getVerticalAlignment, isBackgroundSet, isChanged, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setComponentId, setConstraints, setCursor, setEnabled, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setProperty, setProperty, setSize, setToolTipText, setVerticalAlignment, setVisible
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

WebTable

public WebTable()
Creates a new instance of WebTable.

See Also:
ITable
Method Detail

run

public void run()

Specified by:
run in interface Runnable

getDataBook

public IDataBook getDataBook()
Returns the DataBook displayed by this control.

Specified by:
getDataBook in interface ITable
Returns:
the DataBook.
See Also:
ITable.setDataBook(javax.rad.model.IDataBook)

setDataBook

public void setDataBook(IDataBook pDataBook)
Sets the DataBook displayed by this control.

Specified by:
setDataBook in interface ITable
Parameters:
pDataBook - the DataBook
See Also:
ITable.getDataBook()

isAutoResize

public boolean isAutoResize()
Gets true, if the ITable is in auto resize mode.

Specified by:
isAutoResize in interface ITable
Returns:
true, if the ITable is in auto resize mode.

setAutoResize

public void setAutoResize(boolean pAutoResize)
Sets true, if the ITable is in auto resize mode.

Specified by:
setAutoResize in interface ITable
Parameters:
pAutoResize - true, if the ITable is in auto resize mode.

isTableHeaderVisible

public boolean isTableHeaderVisible()
Gets the visibility of the table header.

Specified by:
isTableHeaderVisible in interface ITable
Returns:
the visibility of the table header.

setTableHeaderVisible

public void setTableHeaderVisible(boolean pTableHeaderVisible)
Sets the visibility of the table header.

Specified by:
setTableHeaderVisible in interface ITable
Parameters:
pTableHeaderVisible - the visibility of the table header.

isSortOnHeaderEnabled

public boolean isSortOnHeaderEnabled()
Gets true, if it is possible sorting the data by clicking on the header.

Specified by:
isSortOnHeaderEnabled in interface ITable
Returns:
true, if it is possible sorting the data by clicking on the header.

setSortOnHeaderEnabled

public void setSortOnHeaderEnabled(boolean pSortOnHeaderEnabled)
Set true, if it should possible sorting the data by clicking on the header.

Specified by:
setSortOnHeaderEnabled in interface ITable
Parameters:
pSortOnHeaderEnabled - true, if it is possible sorting the data by clicking on the header.

notifyRepaint

public void notifyRepaint()
The control need to check if the part is visible and then repaint the part.

Specified by:
notifyRepaint in interface IControl

saveEditing

public void saveEditing()
                 throws ModelException
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow.

Specified by:
saveEditing in interface IControl
Throws:
ModelException - if the value can not be stored.

cancelEditing

public void cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.

Specified by:
cancelEditing in interface IControl

getCellFormatter

public ICellFormatter getCellFormatter()
Gets the cell formatter.

Specified by:
getCellFormatter in interface ITable
Returns:
the cell formatter.

setCellFormatter

public void setCellFormatter(ICellFormatter pCellFormatter)
Sets the cell formatter.

Specified by:
setCellFormatter in interface ITable
Parameters:
pCellFormatter - the cell formatter.

setCellFormatter

public void setCellFormatter(Object pCellFormatter,
                             String pMethodName)
Sets the cell formatter.

Specified by:
setCellFormatter in interface ITable
Parameters:
pCellFormatter - the cell formatter.
pMethodName - the method name.

isShowSelection

public boolean isShowSelection()
Gets if showing the selection or not.

Specified by:
isShowSelection in interface ITable
Returns:
showing the selection or not.

setShowSelection

public void setShowSelection(boolean pShowSelection)
Sets if showing the selection or not.

Specified by:
setShowSelection in interface ITable
Parameters:
pShowSelection - showing the selection or not.

isShowVerticalLines

public boolean isShowVerticalLines()
/** Gets if showing the vertical lines or not.

Specified by:
isShowVerticalLines in interface ITable
Returns:
showing the vertical lines or not.

setShowVerticalLines

public void setShowVerticalLines(boolean pShowVerticalLines)
Sets if showing the vertical lines or not.

Specified by:
setShowVerticalLines in interface ITable
Parameters:
pShowVerticalLines - showing the vertical lines or not.

isShowHorizontalLines

public boolean isShowHorizontalLines()
Gets if showing the vertical lines or not.

Specified by:
isShowHorizontalLines in interface ITable
Returns:
showing the vertical lines or not.

setShowHorizontalLines

public void setShowHorizontalLines(boolean pShowHorizontalLines)
Sets if showing the vertical lines or not.

Specified by:
setShowHorizontalLines in interface ITable
Parameters:
pShowHorizontalLines - showing the vertical lines or not.

getTranslation

public TranslationMap getTranslation()
Gets the possible translation mapping for this UIComponent.

Specified by:
getTranslation in interface IControl
Specified by:
getTranslation in interface ITable
Returns:
the translation mappint

setTranslation

public void setTranslation(TranslationMap pTranslation)
Sets the possible translations for this UIComponent.

Specified by:
setTranslation in interface IControl
Specified by:
setTranslation in interface ITable
Parameters:
pTranslation - the translation mapping

dataBookChanged

public void dataBookChanged(DataBookEvent pDataBookEvent)
                     throws ModelException
Notifies that the IDataBook is changed.

Specified by:
dataBookChanged in interface IDataBookListener
Parameters:
pDataBookEvent - gives information about the changed IDataBook, the type of change and the original IDataRow.
Throws:
ModelException - if a ModelException occurs.

valuesChanged

public void valuesChanged(DataRowEvent pDataRowEvent)
                   throws ModelException
Notifies that values on an IDataRow are changed.

Specified by:
valuesChanged in interface IDataRowListener
Parameters:
pDataRowEvent - gives information about the changed IDataRow, the changed columns and the original IDataRow.
Throws:
ModelException - if a ModelException occurs.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.