Top Fields Constructors Methods
sun.tools.jconsole.inspector

public Class XTextFieldEditor

extends XTextField
implements TableCellEditor
Class Inheritance
All Implemented Interfaces
javax.swing.table.TableCellEditor, javax.swing.CellEditor
Known Direct Subclasses
sun.tools.jconsole.inspector.XMBeanAttributes.ValueCellEditor, sun.tools.jconsole.inspector.XMBeanNotifications.UserDataCellEditor
Annotations
@SuppressWarnings:serial
Imports
java.awt.Component, java.awt.event.ActionEvent, .FocusAdapter, .FocusEvent, .FocusListener, java.util.EventObject, javax.swing.JMenuItem, .JTable, .JTextField, javax.swing.event.CellEditorListener, .ChangeEvent, .EventListenerList, javax.swing.table.TableCellEditor

Field Summary

Modifier and TypeField and Description
protected ChangeEvent
private FocusListener
protected EventListenerList
Inherited from sun.tools.jconsole.inspector.XTextField:
COMPATIBLE_VALUECURRENT_VALUENULL_VALUEtextField

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent
the event to be processed
e
)

Overrides sun.tools.jconsole.inspector.XTextField.actionPerformed.

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.
public void
addCellEditorListener(CellEditorListener
the CellEditorListener
listener
)

Implements javax.swing.CellEditor.addCellEditorListener.

Adds a listener to the list that's notified when the editor stops, or cancels editing.
public void
cancelCellEditing()

Implements javax.swing.CellEditor.cancelCellEditing.

Tells the editor to cancel editing and not accept any partially edited value.
protected void
protected void
protected void
public Object
getCellEditorValue()

Implements javax.swing.CellEditor.getCellEditorValue.

Returns the value contained in the editor.
public Component
getTableCellEditorComponent(JTable
the JTable that is asking the editor to edit; can be null
table
,
Object
the value of the cell to be edited; it is up to the specific editor 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
value
,
boolean
true if the cell is to be rendered with highlighting
isSelected
,
int
the row of the cell being edited
row
,
int
the column of the cell being edited
column
)

Implements javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Sets an initial value for the editor.
public boolean
isCellEditable(EventObject
the event the editor should use to consider whether to begin editing or not
event
)

Implements javax.swing.CellEditor.isCellEditable.

Asks the editor if it can start editing using anEvent.
public void
removeCellEditorListener(CellEditorListener
the CellEditorListener
listener
)

Implements javax.swing.CellEditor.removeCellEditorListener.

Removes a listener from the list that's notified
public boolean
shouldSelectCell(EventObject
the event the editor should use to start editing
event
)

Implements javax.swing.CellEditor.shouldSelectCell.

Returns true if the editing cell should be selected, false otherwise.
public boolean
stopCellEditing()

Implements javax.swing.CellEditor.stopCellEditing.

Tells the editor to stop editing and accept any partially edited value as the value of the editor.
Inherited from sun.tools.jconsole.inspector.XTextField:
buildJMenuItemchangedUpdategetNullSelectionAllowedgetValueinitinsertUpdateremoveUpdatesetHorizontalAlignmentsetNullSelectionAllowed

Field Detail

changeEventback to summary
protected ChangeEvent changeEvent
editorFocusListenerback to summary
private FocusListener editorFocusListener
evtListenerListback to summary
protected EventListenerList evtListenerList

Constructor Detail

XTextFieldEditorback to summary
public XTextFieldEditor()

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent e)

Overrides sun.tools.jconsole.inspector.XTextField.actionPerformed.

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Parameters
e:ActionEvent

the event to be processed

Annotations
@Override
addCellEditorListenerback to summary
public void addCellEditorListener(CellEditorListener listener)

Implements javax.swing.CellEditor.addCellEditorListener.

Doc from javax.swing.CellEditor.addCellEditorListener.

Adds a listener to the list that's notified when the editor stops, or cancels editing.

Parameters
listener:CellEditorListener

the CellEditorListener

cancelCellEditingback to summary
public void cancelCellEditing()

Implements javax.swing.CellEditor.cancelCellEditing.

Doc from javax.swing.CellEditor.cancelCellEditing.

Tells the editor to cancel editing and not accept any partially edited value.

dropSuccessback to summary
protected void dropSuccess()
fireEditingCanceledback to summary
protected void fireEditingCanceled()
fireEditingStoppedback to summary
protected void fireEditingStopped()
getCellEditorValueback to summary
public Object getCellEditorValue()

Implements javax.swing.CellEditor.getCellEditorValue.

Doc from javax.swing.CellEditor.getCellEditorValue.

Returns the value contained in the editor.

Returns:Object

the value contained in the editor

getTableCellEditorComponentback to summary
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)

Implements javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Doc from javax.swing.table.TableCellEditor.getTableCellEditorComponent.

Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Parameters
table:JTable

the JTable that is asking the editor to edit; can be null

value:Object

the value of the cell to be edited; it is up to the specific editor 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:boolean

true if the cell is to be rendered with highlighting

row:int

the row of the cell being edited

column:int

the column of the cell being edited

Returns:Component

the component for editing

isCellEditableback to summary
public boolean isCellEditable(EventObject event)

Implements javax.swing.CellEditor.isCellEditable.

Doc from javax.swing.CellEditor.isCellEditable.

Asks the editor if it can start editing using anEvent. anEvent is in the invoking component coordinate system. The editor can not assume the Component returned by getCellEditorComponent is installed. This method is intended for the use of client to avoid the cost of setting up and installing the editor component if editing is not possible. If editing can be started this method returns true.

Parameters
event:EventObject

the event the editor should use to consider whether to begin editing or not

Returns:boolean

true if editing can be started

removeCellEditorListenerback to summary
public void removeCellEditorListener(CellEditorListener listener)

Implements javax.swing.CellEditor.removeCellEditorListener.

Doc from javax.swing.CellEditor.removeCellEditorListener.

Removes a listener from the list that's notified

Parameters
listener:CellEditorListener

the CellEditorListener

shouldSelectCellback to summary
public boolean shouldSelectCell(EventObject event)

Implements javax.swing.CellEditor.shouldSelectCell.

Doc from javax.swing.CellEditor.shouldSelectCell.

Returns true if the editing cell should be selected, false otherwise. Typically, the return value is true, because is most cases the editing cell should be selected. However, it is useful to return false to keep the selection from changing for some types of edits. eg. A table that contains a column of check boxes, the user might want to be able to change those checkboxes without altering the selection. (See Netscape Communicator for just such an example) Of course, it is up to the client of the editor to use the return value, but it doesn't need to if it doesn't want to.

Parameters
event:EventObject

the event the editor should use to start editing

Returns:boolean

true if the editor would like the editing cell to be selected; otherwise returns false

stopCellEditingback to summary
public boolean stopCellEditing()

Implements javax.swing.CellEditor.stopCellEditing.

Doc from javax.swing.CellEditor.stopCellEditing.

Tells the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped; this is useful for editors that validate and can not accept invalid entries.

Returns:boolean

true if editing was stopped; false otherwise