com.metamatrix.toolbox.ui.widget.table
Class DefaultTableCellRenderer
java.lang.Object
com.metamatrix.toolbox.ui.widget.table.DefaultTableCellRenderer
- All Implemented Interfaces:
- javax.swing.SwingConstants, javax.swing.table.TableCellRenderer
- Direct Known Subclasses:
- PropertiedObjectTableCellRenderer, ProvidersMain.ProvidersCellRenderer, ServiceMgmtPanel.ServiceMgmtCellRenderer
public class DefaultTableCellRenderer
- extends java.lang.Object
- implements javax.swing.SwingConstants, javax.swing.table.TableCellRenderer
This is the default cell renderer for TableWidgets. It renders boolean values as CheckBoxes and right-justifies numeric values.
- Since:
- Golden Gate
- Version:
- Golden Gate
- Author:
- John P. A. Verhaeg
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Method Summary |
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int rowIndex,
int columnIndex)
Returns the appropriate Component to render the value in the specified table at the specified row and column indexes. |
protected void |
initializeComponent(java.awt.Component component,
javax.swing.JTable table,
boolean isSelected,
boolean hasFocus,
int rowIndex,
int columnIndex)
|
void |
setBooleanComponent(CheckBox theCheckBox)
|
void |
setTextComponent(LabelWidget theLabel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
noFocusBorder
public final javax.swing.border.Border noFocusBorder
checkBoxBorder
public final javax.swing.border.Border checkBoxBorder
DefaultTableCellRenderer
public DefaultTableCellRenderer()
getTableCellRendererComponent
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int rowIndex,
int columnIndex)
- Returns the appropriate Component to render the value in the specified table at the specified row and column indexes.
- Specified by:
getTableCellRendererComponent
in interface javax.swing.table.TableCellRenderer
- Parameters:
table
- The table containing the valuevalue
- The valueisSelected
- True if the cell containing the value is currently selectedhasFocus
- True if the cell containing the value currently has focusrowIndex
- The row index of the cell containing the valuecolumnIndex
- The column index of the cell containing the value
- Returns:
- A CheckBox for boolean values, a LabelWidget with right-justified text for numeric values, and a LabelWidget with
left-justified text for all other values.
- Since:
- Golden Gate
initializeComponent
protected void initializeComponent(java.awt.Component component,
javax.swing.JTable table,
boolean isSelected,
boolean hasFocus,
int rowIndex,
int columnIndex)
- Since:
- 2.1
setBooleanComponent
public void setBooleanComponent(CheckBox theCheckBox)
setTextComponent
public void setTextComponent(LabelWidget theLabel)
Copyright © 2009. All Rights Reserved.