JIDE 3.5.15

com.jidesoft.grid
Class ButtonTableCellEditorRenderer

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by com.jidesoft.grid.AbstractJideCellEditor
          extended by com.jidesoft.grid.ContextSensitiveCellEditor
              extended by com.jidesoft.grid.AbstractTableCellEditorRenderer
                  extended by 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

Field Summary
 
Fields inherited from class com.jidesoft.grid.AbstractTableCellEditorRenderer
_editorComponent, _rendererComponent
 
Fields inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
DEFAULT_CELL_EDITOR_BORDER
 
Fields inherited from class com.jidesoft.grid.AbstractJideCellEditor
_clickCountToStart
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
ButtonTableCellEditorRenderer()
           
ButtonTableCellEditorRenderer(ConverterContext context)
           
 
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.AbstractTableCellEditorRenderer
cancelCellEditing, getTableCellEditorComponent, getTableCellRendererComponent, resetRendererComponent, stopCellEditing
 
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 javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, isCellEditable, removeCellEditorListener, shouldSelectCell
 

Constructor Detail

ButtonTableCellEditorRenderer

public ButtonTableCellEditorRenderer()

ButtonTableCellEditorRenderer

public ButtonTableCellEditorRenderer(ConverterContext context)
Method Detail

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 value
isSelected - true if the cell is to be rendered with the selection highlighted; otherwise false
hasFocus - 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

JIDE 3.5.15