Methods Summary |
---|
public void | addCellEditorListener(javax.swing.event.CellEditorListener cel)
listeners.addElement(cel);
|
public void | cancelCellEditing()
fireEditingCanceled();
editing = false;
helper.setVisible(false);
|
protected void | fireEditingCanceled()
setValue(originalValue);
ChangeEvent ce = new ChangeEvent(this);
for (int i = listeners.size() - 1; i >= 0; i--) {
((CellEditorListener)listeners.elementAt(i)).editingCanceled(ce);
}
|
protected void | fireEditingStopped()
ChangeEvent ce = new ChangeEvent(this);
for (int i = listeners.size() - 1; i >= 0; i--) {
((CellEditorListener)listeners.elementAt(i)).editingStopped(ce);
}
|
public java.lang.Object | getCellEditorValue()return new Integer(getValue());
|
public java.awt.Component | getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
if (value == null) {
return this;
}
if (value instanceof Volume) {
setValue(((Volume)value).getVolume());
}
else {
setValue(0);
}
table.setRowSelectionInterval(row, row);
table.setColumnSelectionInterval(column, column);
originalValue = getValue();
editing = true;
Point p = table.getLocationOnScreen();
Rectangle r = table.getCellRect(row, column, true);
helper.setLocation(r.x + p.x + getWidth() - 50, r.y + p.y + getHeight());
helper.setVisible(true);
return this;
|
public boolean | isCellEditable(java.util.EventObject eo)return true;
|
public void | removeCellEditorListener(javax.swing.event.CellEditorListener cel)
listeners.removeElement(cel);
|
public boolean | shouldSelectCell(java.util.EventObject eo)
return true;
|
public boolean | stopCellEditing()
fireEditingStopped();
editing = false;
helper.setVisible(false);
return true;
|