Class ValuePassThroughCellEditor
- java.lang.Object
-
- org.pentaho.reporting.libraries.designtime.swing.ValuePassThroughCellEditor
-
- All Implemented Interfaces:
ComboBoxEditor
public class ValuePassThroughCellEditor extends Object implements ComboBoxEditor
A non editing cell-editor for comboboxes. This works around the obvious bug that the combobox always adds an empty string to non-editable models.- Author:
- Thomas Morgner.
-
-
Constructor Summary
Constructors Constructor Description ValuePassThroughCellEditor(JComboBox comboBox, ListCellRenderer renderer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(ActionListener l)
Add an ActionListener.Component
getEditorComponent()
Return the component that should be added to the tree hierarchy for this editorObject
getItem()
Return the edited item *void
removeActionListener(ActionListener l)
Remove an ActionListener *void
selectAll()
Ask the editor to start editing and to select everything *void
setItem(Object item)
Set the item that should be edited.
-
-
-
Constructor Detail
-
ValuePassThroughCellEditor
public ValuePassThroughCellEditor(JComboBox comboBox, ListCellRenderer renderer)
-
-
Method Detail
-
getEditorComponent
public Component getEditorComponent()
Return the component that should be added to the tree hierarchy for this editor- Specified by:
getEditorComponent
in interfaceComboBoxEditor
-
setItem
public void setItem(Object item)
Set the item that should be edited. Cancel any editing if necessary *- Specified by:
setItem
in interfaceComboBoxEditor
-
getItem
public Object getItem()
Return the edited item *- Specified by:
getItem
in interfaceComboBoxEditor
-
selectAll
public void selectAll()
Ask the editor to start editing and to select everything *- Specified by:
selectAll
in interfaceComboBoxEditor
-
addActionListener
public void addActionListener(ActionListener l)
Add an ActionListener. An action event is generated when the edited item changes *- Specified by:
addActionListener
in interfaceComboBoxEditor
-
removeActionListener
public void removeActionListener(ActionListener l)
Remove an ActionListener *- Specified by:
removeActionListener
in interfaceComboBoxEditor
-
-