com.jidesoft.grid
Class ButtonTableCellEditorRenderer
java.lang.Object
javax.swing.AbstractCellEditor
com.jidesoft.grid.AbstractJideCellEditor
com.jidesoft.grid.ContextSensitiveCellEditor
com.jidesoft.grid.AbstractTableCellEditorRenderer
com.jidesoft.grid.ButtonTableCellEditorRenderer
- All Implemented Interfaces:
- ConverterContextSupport, CellRolloverSupport, EditorContextSupport, EditorStyleSupport, JideCellEditor, TableCellEditorRenderer, Serializable, CellEditor, TableCellEditor, TableCellRenderer
- Direct Known Subclasses:
- HyperlinkTableCellEditorRenderer
public class ButtonTableCellEditorRenderer
- extends AbstractTableCellEditorRenderer
- implements CellRolloverSupport
A table cell editor/renderer that can display a hyperlink as cell. You can call setActionListener(java.awt.event.ActionListener)
to set the action listener which will be triggered when the
hyperlink is clicked.
- See Also:
- Serialized Form
Method Summary |
void |
configureTableCellEditorRendererComponent(JTable table,
Component editorRendererComponent,
boolean forRenderer,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
Component |
createTableCellEditorRendererComponent(JTable table,
int row,
int column)
|
ActionListener |
getActionListener()
|
Object |
getCellEditorValue()
|
boolean |
isRollover(JTable table,
MouseEvent e,
int row,
int column)
|
void |
setActionListener(ActionListener actionListener)
|
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor |
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, isEditorStyleSupported, isUseConverterContext, setConverter, setConverterContext, setEditorContext, setEditorStyle, setType, setUseConverterContext |
Methods inherited from class com.jidesoft.grid.AbstractJideCellEditor |
addValidationListener, getClickCountToStart, getDefaultErrorBehavior, getValidationListeners, isAutoStopCellEditing, isCellEditable, isPassEnterKeyToTable, removeValidationListener, setAutoStopCellEditing, setClickCountToStart, setDefaultErrorBehavior, setPassEnterKeyToTable, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ButtonTableCellEditorRenderer
public ButtonTableCellEditorRenderer()
ButtonTableCellEditorRenderer
public ButtonTableCellEditorRenderer(ConverterContext context)
getActionListener
public ActionListener getActionListener()
setActionListener
public void setActionListener(ActionListener actionListener)
createTableCellEditorRendererComponent
public Component createTableCellEditorRendererComponent(JTable table,
int row,
int column)
- Specified by:
createTableCellEditorRendererComponent
in interface TableCellEditorRenderer
- Parameters:
table
- the JTable
that is asking the renderer to draw; can be null
row
- the row index of the cell being drawn.column
- the column index of the cell being drawn
- Returns:
- the component for both rendering and editing.
configureTableCellEditorRendererComponent
public void configureTableCellEditorRendererComponent(JTable table,
Component editorRendererComponent,
boolean forRenderer,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
- Specified by:
configureTableCellEditorRendererComponent
in interface TableCellEditorRenderer
- Parameters:
table
- the JTable
that is asking the renderer to draw; can be
null
editorRendererComponent
- the component that was created by createTableCellEditorRendererComponent.forRenderer
- true if this component is created for rendering purpose. False if it is for
editing purpose.value
- the value of the cell to be rendered. It is up to the specific renderer to
interpret and draw the value. For example, if value
is the string
"true", it could be rendered as a string or it could be rendered as a check box
that is checked. null
is a valid valueisSelected
- true if the cell is to be rendered with the selection highlighted; otherwise
falsehasFocus
- whether the cell has focus. This parameter should always be true for editing
purpose but could be true or false for rendering purpose.row
- the row index of the cell being drawn.column
- the column index of the cell being drawn
getCellEditorValue
public Object getCellEditorValue()
- Specified by:
getCellEditorValue
in interface CellEditor
isRollover
public boolean isRollover(JTable table,
MouseEvent e,
int row,
int column)
- Specified by:
isRollover
in interface CellRolloverSupport