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 voidaddActionListener(ActionListener l)Add an ActionListener.ComponentgetEditorComponent()Return the component that should be added to the tree hierarchy for this editorObjectgetItem()Return the edited item *voidremoveActionListener(ActionListener l)Remove an ActionListener *voidselectAll()Ask the editor to start editing and to select everything *voidsetItem(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:
getEditorComponentin interfaceComboBoxEditor
-
setItem
public void setItem(Object item)
Set the item that should be edited. Cancel any editing if necessary *- Specified by:
setItemin interfaceComboBoxEditor
-
getItem
public Object getItem()
Return the edited item *- Specified by:
getItemin interfaceComboBoxEditor
-
selectAll
public void selectAll()
Ask the editor to start editing and to select everything *- Specified by:
selectAllin interfaceComboBoxEditor
-
addActionListener
public void addActionListener(ActionListener l)
Add an ActionListener. An action event is generated when the edited item changes *- Specified by:
addActionListenerin interfaceComboBoxEditor
-
removeActionListener
public void removeActionListener(ActionListener l)
Remove an ActionListener *- Specified by:
removeActionListenerin interfaceComboBoxEditor
-
-