| |
|
| java.lang.Object fr.aliacom.common.ui.table.BeanPropertiesMapping
BeanPropertiesMapping | final public class BeanPropertiesMapping (Code) | | This class representents the column model for the
fr.aliacom.common.ui.ITable .
This class maps a tables columns to properties in the java bean
displayed by the
fr.aliacom.common.ui.ITable instance.
Each column is a bean property.
Several columns can display the same property.
author: tom author: (C) 2001, 2002 Thomas Cataldo |
Method Summary | |
public void | addProperty(String property, String title) Adds a property to the model. | public int | getIndex(String property) Return the index of the column displaying a given property. | public int | getPropertiesCount() Method getPropertiesCount. | public String | getProperty(int index) Returns the name of the property displayed by the table at given column
index.
Parameters: index - the column number, starting at 0. | public String | getTitle(int column) Get the title of the column displayed at a given index. |
BeanPropertiesMapping | public BeanPropertiesMapping()(Code) | | Creates an empty column model.
|
BeanPropertiesMapping | public BeanPropertiesMapping(ArrayList properties)(Code) | | Creates a column model suitable for displaying the properties listed
in the ArrayList provided.
Parameters: properties - the list of properties name |
addProperty | public void addProperty(String property, String title)(Code) | | Adds a property to the model. The property will be displayed by the table
in a column named by the given title.
Parameters: property - the java bean property name Parameters: title - the title of the column |
getIndex | public int getIndex(String property)(Code) | | Return the index of the column displaying a given property.
Returns -1 if the property is not found.
Parameters: property - the index of the property or -1 if not found |
getPropertiesCount | public int getPropertiesCount()(Code) | | Method getPropertiesCount.
the number of column/properties |
getProperty | public String getProperty(int index)(Code) | | Returns the name of the property displayed by the table at given column
index.
Parameters: index - the column number, starting at 0. the property at the given index |
getTitle | public String getTitle(int column)(Code) | | Get the title of the column displayed at a given index.
Parameters: column - the index of the column the human readable title. |
|
|
|