com.tssap.util.ui.reuse.table
Class TableComponent

java.lang.Object
  |
  +--com.tssap.util.ui.AbstractEditable
        |
        +--com.tssap.util.ui.reuse.GenericComponent
              |
              +--com.tssap.util.ui.reuse.GenericMultiComponent
                    |
                    +--com.tssap.util.ui.reuse.GenericMultiTableComponent
                          |
                          +--com.tssap.util.ui.reuse.table.TableComponent
All Implemented Interfaces:
IEditable, IGenericComponent, IGenericMultiComponent, IGridLayoutPaneContainer, IMutableTable, IReuseable, ITableComponent

public class TableComponent
extends GenericMultiTableComponent
implements IMutableTable, ITableComponent


Constructor Summary
TableComponent(ITableAdapter adapter)
          Constructor for TableComponent.
 
Method Summary
 void addRow(ITableRow row)
           
 void addRows(ITableRow[] rows)
           
 boolean addTableModifyListener(ITableModifyListener modListener)
           
 void changeRow(ITableRow row, int colNum, java.lang.String value)
           
 void clearTable()
           
 ITableColumn[] getColumns()
          Returns the columnLabels.
 ITableRow[] getSelectedTableRows()
           
 int getSortColumn()
          Returns the sortColumn.
 ITableAdapter getTableAdapter()
           
 int getUserGridNumOfColumns()
          Returns number of columns for userArea given to method initContainer(IGridLayoutPane userArea)
 void initContainer(IGridLayoutPane userArea)
          Initialize component's UI.
 void initializeTable(ITableRow[] rows)
           
 boolean isMultiSelection()
          Returns the multiSelection.
 boolean isUserGridEqualColSize()
          Returns true if userArea given to method initContainer(IGridLayoutPane userArea) has to have equal column widths
 void refreshFromAdapter()
           
 void removeRow(ITableRow row)
           
 void removeRows(ITableRow[] rows)
           
 boolean removeTableModifyListener(ITableModifyListener modListener)
           
 void setMultiSelection(boolean multiSelection)
          Sets the multiSelection.
 void setSortColumn(int sortColumn)
          Sets the sortColumn.
 void setTableAdapter(ITableAdapter adapter)
           
 
Methods inherited from class com.tssap.util.ui.reuse.GenericMultiTableComponent
setEnabled
 
Methods inherited from class com.tssap.util.ui.reuse.GenericMultiComponent
getAddButtonText, getButtonOrientation, getRemoveButtonText, hasAddRemoveButtons, isSecureRemove, setAddButtonText, setButtonOrientation, setHasAddRemoveButtons, setRemoveButtonText, setSecureRemove
 
Methods inherited from class com.tssap.util.ui.reuse.GenericComponent
addModifyListener, addSelectionListener, createPartControl, createPartControl, createPartControl, getTitle, getUserAreaGridLayoutPane, isComposable, isEnabled, refresh, removeModifyListener, removeSelectionListener, setTitle
 
Methods inherited from class com.tssap.util.ui.AbstractEditable
isEditable, setEditable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tssap.util.ui.reuse.table.ITableComponent
getAddButtonText, getButtonOrientation, getRemoveButtonText, isSecureRemove, setAddButtonText, setButtonOrientation, setRemoveButtonText, setSecureRemove
 
Methods inherited from interface com.tssap.util.ui.reuse.IGenericComponent
addModifyListener, addSelectionListener, createPartControl, createPartControl, getTitle, refresh, removeModifyListener, removeSelectionListener, setTitle
 
Methods inherited from interface com.tssap.util.ui.IEditable
isEditable, setEditable
 
Methods inherited from interface com.tssap.util.ui.reuse.IReuseable
createPartControl, isEnabled, setEnabled
 

Constructor Detail

TableComponent

public TableComponent(ITableAdapter adapter)
Constructor for TableComponent.
Parameters:
title -  
Method Detail

addRow

public void addRow(ITableRow row)
Specified by:
addRow in interface IMutableTable
See Also:
IMutableTable.addRow(ITableRow)

addRows

public void addRows(ITableRow[] rows)
Specified by:
addRows in interface IMutableTable
See Also:
IMutableTable.addRows(ITableRow[])

removeRow

public void removeRow(ITableRow row)
Specified by:
removeRow in interface IMutableTable
See Also:
com.tssap.util.ui.reuse.table.IMutableTable#removeRow(Object)

removeRows

public void removeRows(ITableRow[] rows)
Specified by:
removeRows in interface IMutableTable
See Also:
IMutableTable.removeRows(ITableRow[])

clearTable

public void clearTable()
Specified by:
clearTable in interface IMutableTable
See Also:
com.tssap.util.ui.reuse.table.IMutableTable#removeAll()

changeRow

public void changeRow(ITableRow row,
                      int colNum,
                      java.lang.String value)
Specified by:
changeRow in interface IMutableTable
See Also:
com.tssap.util.ui.reuse.table.IMutableTable#changeRow(Object, int, String)

initializeTable

public void initializeTable(ITableRow[] rows)
Specified by:
initializeTable in interface IMutableTable
See Also:
com.tssap.util.ui.reuse.table.IMutableTable#initialFill(ITableRow[])

addTableModifyListener

public boolean addTableModifyListener(ITableModifyListener modListener)
Specified by:
addTableModifyListener in interface IMutableTable
See Also:
IMutableTable.addTableModifyListener(ITableModifyListener)

removeTableModifyListener

public boolean removeTableModifyListener(ITableModifyListener modListener)
Specified by:
removeTableModifyListener in interface IMutableTable
See Also:
IMutableTable.removeTableModifyListener(ITableModifyListener)

initContainer

public void initContainer(IGridLayoutPane userArea)
Description copied from interface: IGridLayoutPaneContainer
Initialize component's UI. Implementor has to fill the given grid layout pane. The number of columns comes from call to method getUserGridNumOfColumns(). If grid columns have equal widths is decided through call to isUserGridEqualColSize().
Specified by:
initContainer in interface IGridLayoutPaneContainer
Overrides:
initContainer in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.initContainer(IGridLayoutPane)

getUserGridNumOfColumns

public int getUserGridNumOfColumns()
Description copied from interface: IGridLayoutPaneContainer
Returns number of columns for userArea given to method initContainer(IGridLayoutPane userArea)
Specified by:
getUserGridNumOfColumns in interface IGridLayoutPaneContainer
Overrides:
getUserGridNumOfColumns in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.getUserGridNumOfColumns()

isUserGridEqualColSize

public boolean isUserGridEqualColSize()
Description copied from interface: IGridLayoutPaneContainer
Returns true if userArea given to method initContainer(IGridLayoutPane userArea) has to have equal column widths
Specified by:
isUserGridEqualColSize in interface IGridLayoutPaneContainer
Overrides:
isUserGridEqualColSize in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.isUserGridEqualColSize()

setSortColumn

public void setSortColumn(int sortColumn)
Sets the sortColumn.
Specified by:
setSortColumn in interface ITableComponent
Parameters:
sortColumn - The sortColumn to set

getSortColumn

public int getSortColumn()
Returns the sortColumn.
Specified by:
getSortColumn in interface ITableComponent
Returns:
int

isMultiSelection

public boolean isMultiSelection()
Returns the multiSelection.
Specified by:
isMultiSelection in interface ITableComponent
Returns:
boolean

setMultiSelection

public void setMultiSelection(boolean multiSelection)
Sets the multiSelection.
Specified by:
setMultiSelection in interface ITableComponent
Parameters:
multiSelection - The multiSelection to set

getColumns

public ITableColumn[] getColumns()
Returns the columnLabels.
Specified by:
getColumns in interface ITableComponent
Returns:
String[]

getSelectedTableRows

public ITableRow[] getSelectedTableRows()
Specified by:
getSelectedTableRows in interface ITableComponent
See Also:
ITableComponent.getSelectedTableRows()

getTableAdapter

public ITableAdapter getTableAdapter()
Specified by:
getTableAdapter in interface ITableComponent
See Also:
ITableComponent.getTableAdapter()

refreshFromAdapter

public void refreshFromAdapter()
Specified by:
refreshFromAdapter in interface ITableComponent
See Also:
ITableComponent.refreshFromAdapter()

setTableAdapter

public void setTableAdapter(ITableAdapter adapter)
Specified by:
setTableAdapter in interface ITableComponent
See Also:
ITableComponent.setTableAdapter(ITableAdapter)


Copyright © 2005 SAP AG. All Rights Reserved.