AbstractExpressionValueCellEditor Class
com.bea.ide.debug
AbstractExpressionValueCellEditor Class
- public abstract class AbstractExpressionValueCellEditor
extends DefaultCellEditor
Helper class for IDebugExpressionViews that want to use a text field
as their editor. Assists in translating from the expression's value
to how the user will actually edit it.
-
Hierarchy
-
Object
AbstractCellEditor
DefaultCellEditor
AbstractExpressionValueCellEditor
-
All Implemented Interfaces
-
CellEditor
, Serializable
, TableCellEditor
, TreeCellEditor
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_originalValue
protected String
_originalValue
- The original value before editing began.
AbstractExpressionValueCellEditor
public AbstractExpressionValueCellEditor()
- Default constructor for
AbstractExpressionValueCellEditor
.
getCellEditorValue() Method
public Object
getCellEditorValue()
Calls parseDisplayValue() with the text field's value. If it throws
an IllegalArgumentException due to a invalid user input, the expression's
original value is returned instead.
-
Overrides
-
DefaultCellEditor.getCellEditorValue()
getCurrentValue() Method
protected abstract String
getCurrentValue()
Gets the current value of the underlying expression, as reported
by the proxy. This should not be modified by the editor.
Returns
- a string denoting the value of the underlying expression.
getDisplayValue() Method
protected abstract String
getDisplayValue()
Translates from the expression's value as reported by the proxy to
the string that will be stuffed into the text field at the beginning
of editing.
getTableCellEditorComponent(JTable, Object, boolean, int, int) Method
public Component
getTableCellEditorComponent(JTable
table,
Object
value,
boolean isSelected,
int row,
int column)
-
Overrides
-
DefaultCellEditor.getTableCellEditorComponent(JTable, Object, boolean, int, int)
parseDisplayValue(String) Method
protected String
parseDisplayValue(String
s)
throws IllegalArgumentException
Translates the text field's value the string that will be stuffed
back into the expression at the end of editing. Default implementation
just passes returns the same string.
Exceptions
-
IllegalArgumentException
- if there is a problem with the user's
input. If thrown,
getCurrentValue()
will be used as the new value.