|
NextApp Echo2 v2.1.0.rc2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.Table
A component used to display data in a tabular format.
nextapp.echo2.app.table,
Serialized Form| Constructor Summary | |
Table()
Creates a new Table with an empty
DefaultTableModel. |
|
Table(int columns,
int rows)
Creates a new Table with a new
DefaultTableModel with the specified dimensions. |
|
Table(TableModel model)
Creates a Table using the supplied
TableModel. |
|
Table(TableModel model,
TableColumnModel columnModel)
Creates a Table with the supplied
TableModel and the specified TableColumnModel. |
|
| Method Summary | |
void |
addActionListener(ActionListener l)
Adds an ActionListener to the Table. |
void |
createDefaultColumnsFromModel()
Creates a TableColumnModel based on the
TableModel. |
protected void |
doRender()
Re-renders changed rows. |
java.lang.String |
getActionCommand()
Returns the action command which will be provided in ActionEvents fired by this
Table. |
Border |
getBorder()
Returns the Border. |
Component |
getCellComponent(int column,
int row)
Returns the component rendered at the specified cell position. |
TableColumnModel |
getColumnModel()
Returns the TableColumnModel describing this table's
columns. |
TableCellRenderer |
getDefaultHeaderRenderer()
Returns the default TableCellRenderer used to render
header cells. |
TableCellRenderer |
getDefaultRenderer(java.lang.Class columnClass)
Returns the default TableCellRenderer for the specified
column class. |
Insets |
getInsets()
Returns the default cell insets. |
TableModel |
getModel()
Returns the TableModel being visualized by this
Table. |
Color |
getRolloverBackground()
Return the rollover background color displayed when the mouse is within the bounds of a row. |
FillImage |
getRolloverBackgroundImage()
Return the rollover background image displayed when the mouse is within the bounds of a row. |
Font |
getRolloverFont()
Return the rollover font displayed when the mouse is within the bounds of a row. |
Color |
getRolloverForeground()
Return the rollover foreground color displayed when the mouse is within the bounds of a row. |
Color |
getSelectionBackground()
Returns the row selection background color. |
FillImage |
getSelectionBackgroundImage()
Returns the row selection background image. |
Font |
getSelectionFont()
Returns the row selection font. |
Color |
getSelectionForeground()
Returns the row selection foreground color. |
ListSelectionModel |
getSelectionModel()
Returns the row selection model. |
Extent |
getWidth()
Returns the overall width of the grid. |
boolean |
hasActionListeners()
Determines the any ActionListeners are registered. |
protected void |
invalidate()
Marks the table as needing to be re-rendered. |
boolean |
isAutoCreateColumnsFromModel()
Determines whether the TableColumnModel will be created
automatically from the TableModel. |
boolean |
isHeaderVisible()
Determines if the table header is visible. |
boolean |
isRolloverEnabled()
Determines if rollover effects are enabled. |
boolean |
isSelectionEnabled()
Determines if selection is enabled. |
void |
processInput(java.lang.String inputName,
java.lang.Object inputValue)
Processes client input specific to the Component
received from the UpdateManager. |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the Table. |
void |
setActionCommand(java.lang.String newValue)
Sets the action command which will be provided in ActionEvents fired by this
Table. |
void |
setAutoCreateColumnsFromModel(boolean newValue)
Sets whether the TableColumnModel will be created
automatically from the TableModel. |
void |
setBorder(Border newValue)
Sets the Border. |
void |
setColumnModel(TableColumnModel newValue)
Sets the TableColumnModel describing this table's
columns. |
void |
setDefaultHeaderRenderer(TableCellRenderer newValue)
Sets the default TableCellRenderer used to render
header cells. |
void |
setDefaultRenderer(java.lang.Class columnClass,
TableCellRenderer newValue)
Sets the default TableCellRenderer for the specified
column class. |
void |
setHeaderVisible(boolean newValue)
Sets the visibility state of the table header. |
void |
setInsets(Insets newValue)
Sets the default cell insets. |
void |
setModel(TableModel newValue)
Sets the TableModel being visualized. |
void |
setRolloverBackground(Color newValue)
Sets the rollover background color displayed when the mouse is within the bounds of a row. |
void |
setRolloverBackgroundImage(FillImage newValue)
Sets the rollover background image displayed when the mouse is within the bounds of a row. |
void |
setRolloverEnabled(boolean newValue)
Sets whether rollover effects are enabled when the mouse cursor is within the bounds of a row. |
void |
setRolloverFont(Font newValue)
Sets the rollover font displayed when the mouse is within the bounds of a row. |
void |
setRolloverForeground(Color newValue)
Sets the rollover foreground color displayed when the mouse is within the bounds of a row. |
void |
setSelectionBackground(Color newValue)
Sets the row selection background color. |
void |
setSelectionBackgroundImage(FillImage newValue)
Sets the row selection background image. |
void |
setSelectionEnabled(boolean newValue)
Sets whether selection is enabled. |
void |
setSelectionFont(Font newValue)
Sets the row selection font. |
void |
setSelectionForeground(Color newValue)
Sets the row selection foreground color. |
void |
setSelectionModel(ListSelectionModel newValue)
Sets the row selection model. |
void |
setWidth(Extent newValue)
Sets the overall width of the grid. |
void |
validate()
A life-cycle method invoked before the component is rendered to ensure it is in a valid state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final TableCellRenderer DEFAULT_TABLE_CELL_RENDERER
public static final java.lang.String PROPERTY_ACTION_COMMAND
public static final java.lang.String PROPERTY_BORDER
public static final java.lang.String PROPERTY_INSETS
public static final java.lang.String PROPERTY_ROLLOVER_BACKGROUND
public static final java.lang.String PROPERTY_ROLLOVER_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_ROLLOVER_ENABLED
public static final java.lang.String PROPERTY_ROLLOVER_FONT
public static final java.lang.String PROPERTY_ROLLOVER_FOREGROUND
public static final java.lang.String PROPERTY_SELECTION_BACKGROUND
public static final java.lang.String PROPERTY_SELECTION_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_SELECTION_ENABLED
public static final java.lang.String PROPERTY_SELECTION_FONT
public static final java.lang.String PROPERTY_SELECTION_FOREGROUND
public static final java.lang.String PROPERTY_WIDTH
public static final java.lang.String INPUT_ACTION
public static final java.lang.String ACTION_LISTENERS_CHANGED_PROPERTY
public static final java.lang.String AUTO_CREATE_COLUMNS_FROM_MODEL_CHANGED_PROPERTY
public static final java.lang.String COLUMN_MODEL_CHANGED_PROPERTY
public static final java.lang.String DEFAULT_HEADER_RENDERER_CHANGED_PROPERTY
public static final java.lang.String DEFAULT_RENDERER_CHANGED_PROPERTY
public static final java.lang.String HEADER_VISIBLE_CHANGED_PROPERTY
public static final java.lang.String MODEL_CHANGED_PROPERTY
public static final java.lang.String SELECTION_CHANGED_PROPERTY
public static final java.lang.String SELECTION_MODEL_CHANGED_PROPERTY
public static final int HEADER_ROW
| Constructor Detail |
public Table()
Table with an empty
DefaultTableModel.
public Table(int columns,
int rows)
Table with a new
DefaultTableModel with the specified dimensions.
columns - the initial column countrows - the initial row countpublic Table(TableModel model)
Table using the supplied
TableModel.
model - the initial model
public Table(TableModel model,
TableColumnModel columnModel)
Table with the supplied
TableModel and the specified TableColumnModel.
model - the initial modelcolumnModel - the initial column model| Method Detail |
public java.lang.String getActionCommand()
ActionEvents fired by this
Table.
public void addActionListener(ActionListener l)
ActionListener to the Table.
ActionListeners will be invoked when the user
selects a row.
l - the ActionListener to addpublic void createDefaultColumnsFromModel()
TableColumnModel based on the
TableModel. This method is invoked automatically when the
TableModel's structure changes if the
autoCreateColumnsFromModel flag is set.
protected void doRender()
public Border getBorder()
Border.
public Component getCellComponent(int column,
int row)
column - the columnrow - the row
public TableColumnModel getColumnModel()
TableColumnModel describing this table's
columns.
public TableCellRenderer getDefaultHeaderRenderer()
TableCellRenderer used to render
header cells. The default header renderer will be used in the event
that a TableColumn does not provide a specific header
renderer.
TableCellRendererpublic TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
TableCellRenderer for the specified
column class. The default renderer will be used in the event that
a TableColumn does not provide a specific renderer.
columnClass - the column Class
TableCellRendererpublic Insets getInsets()
public TableModel getModel()
TableModel being visualized by this
Table.
public Color getRolloverBackground()
public FillImage getRolloverBackgroundImage()
public Font getRolloverFont()
public Color getRolloverForeground()
public Color getSelectionBackground()
public FillImage getSelectionBackgroundImage()
public Font getSelectionFont()
public Color getSelectionForeground()
public ListSelectionModel getSelectionModel()
public Extent getWidth()
Extents with
fixed or percentile units.
public boolean hasActionListeners()
ActionListeners are registered.
protected void invalidate()
public boolean isAutoCreateColumnsFromModel()
TableColumnModel will be created
automatically from the TableModel. If this flag is set,
changes to the TableModel will automatically cause the
TableColumnModel to be re-created. This flag is true
by default unless a TableColumnModel is specified in the
constructor.
TableColumnModel will be created
automatically from the TableModelpublic boolean isHeaderVisible()
public boolean isRolloverEnabled()
setRolloverEnabled(boolean)public boolean isSelectionEnabled()
public void processInput(java.lang.String inputName,
java.lang.Object inputValue)
ComponentComponent
received from the UpdateManager.
Derivative implementations should take care to invoke
super.processInput().
processInput in class ComponentinputName - the name of the inputinputValue - the value of the inputComponent.processInput(java.lang.String, java.lang.Object)public void removeActionListener(ActionListener l)
ActionListener from the Table.
ActionListeners will be invoked when the user
selects a row.
l - the ActionListener to removepublic void setActionCommand(java.lang.String newValue)
ActionEvents fired by this
Table.
newValue - the new action commandpublic void setAutoCreateColumnsFromModel(boolean newValue)
TableColumnModel will be created
automatically from the TableModel.
newValue - true if the TableColumnModel should be
created automatically from the TableModelisAutoCreateColumnsFromModel()public void setBorder(Border newValue)
Border.
newValue - the new borderpublic void setColumnModel(TableColumnModel newValue)
TableColumnModel describing this table's
columns.
newValue - the new column modelpublic void setDefaultHeaderRenderer(TableCellRenderer newValue)
TableCellRenderer used to render
header cells. The default header renderer will be used in the event
that a TableColumn does not provide a specific header
renderer.
newValue - the TableCellRenderer
public void setDefaultRenderer(java.lang.Class columnClass,
TableCellRenderer newValue)
TableCellRenderer for the specified
column class. The default renderer will be used in the event that
a TableColumn does not provide a specific renderer.
columnClass - the column ClassnewValue - the TableCellRendererpublic void setHeaderVisible(boolean newValue)
newValue - true if the header should be displayedpublic void setInsets(Insets newValue)
newValue - the new default cell insetspublic void setModel(TableModel newValue)
TableModel being visualized.
newValue - the new model (may not be null)public void setRolloverBackground(Color newValue)
newValue - the new Colorpublic void setRolloverBackgroundImage(FillImage newValue)
newValue - the new background imagepublic void setRolloverEnabled(boolean newValue)
newValue - true if rollover effects should be enabledpublic void setRolloverFont(Font newValue)
newValue - the new Fontpublic void setRolloverForeground(Color newValue)
newValue - the new Colorpublic void setSelectionBackground(Color newValue)
newValue - the new background colorpublic void setSelectionBackgroundImage(FillImage newValue)
newValue - the new background imagepublic void setSelectionEnabled(boolean newValue)
newValue - true to enable selectionpublic void setSelectionForeground(Color newValue)
newValue - the new foreground colorpublic void setSelectionFont(Font newValue)
newValue - the new fontpublic void setSelectionModel(ListSelectionModel newValue)
newValue - the new selection modelpublic void setWidth(Extent newValue)
Extents with
fixed or percentile units.
newValue - the new widthpublic void validate()
Componentsuper.validate()
out of convention.
validate in class ComponentComponent.validate()
|
NextApp Echo2 v2.1.0.rc2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||