Compiere 3.1

org.compiere.minigrid
Class IDColumnEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by org.compiere.minigrid.IDColumnEditor
All Implemented Interfaces:
ActionListener, Serializable, EventListener, CellEditor, TableCellEditor

public class IDColumnEditor
extends AbstractCellEditor
implements TableCellEditor, ActionListener

ID Column Editor (with Select Box). CheckBox change is only detected, if you move out of the cell. A ActionListener is added to the check box and the table forced to notice the change immediately.

Version:
$Id: IDColumnEditor.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
IDColumnEditor()
          Constructor
 
Method Summary
 void actionPerformed(ActionEvent e)
          Action Listener
 Object getCellEditorValue()
          Return Selection Status as IDColumn
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          Get visual Component
 boolean isCellEditable(EventObject anEvent)
          Can we edit it
 boolean shouldSelectCell(EventObject anEvent)
          Can the cell be selected
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, stopCellEditing
 
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, cancelCellEditing, removeCellEditorListener, stopCellEditing
 

Constructor Detail

IDColumnEditor

public IDColumnEditor()
Constructor

Method Detail

getCellEditorValue

public Object getCellEditorValue()
Return Selection Status as IDColumn

Specified by:
getCellEditorValue in interface CellEditor
Returns:
value

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Get visual Component

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Parameters:
table -
value -
isSelected -
row -
column -
Returns:
Component

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Can we edit it

Specified by:
isCellEditable in interface CellEditor
Overrides:
isCellEditable in class AbstractCellEditor
Parameters:
anEvent -
Returns:
true (cobstant)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Can the cell be selected

Specified by:
shouldSelectCell in interface CellEditor
Overrides:
shouldSelectCell in class AbstractCellEditor
Parameters:
anEvent -
Returns:
true (constant)

actionPerformed

public void actionPerformed(ActionEvent e)
Action Listener

Specified by:
actionPerformed in interface ActionListener
Parameters:
e -

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.