org.apache.jmeter.gui.util

Class TextAreaTableCellEditor

Implemented Interfaces:
TableCellEditor, TreeCellEditor

public class TextAreaTableCellEditor
extends AbstractCellEditor
implements TableCellEditor, TreeCellEditor

Nested Class Summary

protected class
TextAreaTableCellEditor.EditorDelegate
The protected EditorDelegate class.

Field Summary

protected int
clickCountToStart
An integer specifying the number of clicks needed to start editing.
protected TextAreaTableCellEditor.EditorDelegate
delegate
The delegate class which handles all methods sent from the CellEditor.
protected JTextArea
editorComponent
The Swing component being edited.

Constructor Summary

TextAreaTableCellEditor()
Constructs a TableCellEditor that uses a text field.

Method Summary

void
cancelCellEditing()
Forwards the message from the CellEditor to the delegate.
Object
getCellEditorValue()
Forwards the message from the CellEditor to the delegate.
int
getClickCountToStart()
Returns the number of clicks needed to start editing.
Component
getComponent()
Returns a reference to the editor component.
Component
getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
Implements the TableCellEditor interface.
Component
getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Implements the TreeCellEditor interface.
boolean
isCellEditable(EventObject anEvent)
Forwards the message from the CellEditor to the delegate.
void
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.
boolean
shouldSelectCell(EventObject anEvent)
Forwards the message from the CellEditor to the delegate.
boolean
stopCellEditing()
Forwards the message from the CellEditor to the delegate.

Field Details

clickCountToStart

protected int clickCountToStart
An integer specifying the number of clicks needed to start editing. Even if clickCountToStart is defined as zero, it will not initiate until a click occurs.

delegate

protected TextAreaTableCellEditor.EditorDelegate delegate
The delegate class which handles all methods sent from the CellEditor.

editorComponent

protected JTextArea editorComponent
The Swing component being edited.

Constructor Details

TextAreaTableCellEditor

public TextAreaTableCellEditor()
Constructs a TableCellEditor that uses a text field.

Method Details

cancelCellEditing

public void cancelCellEditing()
Forwards the message from the CellEditor to the delegate.

getCellEditorValue

public Object getCellEditorValue()
Forwards the message from the CellEditor to the delegate.

getClickCountToStart

public int getClickCountToStart()
Returns the number of clicks needed to start editing.
Returns:
the number of clicks needed to start editing

getComponent

public Component getComponent()
Returns a reference to the editor component.
Returns:
the editor Component

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Implements the TableCellEditor interface.

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Implements the TreeCellEditor interface.

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Forwards the message from the CellEditor to the delegate.

setClickCountToStart

public void setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.
Parameters:
count - an int specifying the number of clicks needed to start editing

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Forwards the message from the CellEditor to the delegate.

stopCellEditing

public boolean stopCellEditing()
Forwards the message from the CellEditor to the delegate.

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.