org.scopemvc.view.swing
Class SComboBoxEditor

java.lang.Object
  |
  +--org.scopemvc.view.swing.SComboBoxEditor
All Implemented Interfaces:
javax.swing.ComboBoxEditor

public class SComboBoxEditor
extends java.lang.Object
implements javax.swing.ComboBoxEditor

Default combobox editor for SComboBox. It can be used for any value class for which a StringConvertor exists. The editor is created in SComboBox constructor, so it can be safely obtained with call getEditor.

The StringConvertor is obtained from StringConvertors to match the type of object being edited.

Version:
$Revision: 1.9 $ $Date: 2002/09/05 15:41:49 $
Author:
Daniel Michalik

Constructor Summary
SComboBoxEditor()
          Constructor for the SComboBoxEditor object
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Add an ActionListener.
 java.awt.Component getEditorComponent()
          Return the component that should be added to the tree hierarchy for this editor
 java.lang.Object getItem()
          Return the edited item.
 void removeActionListener(java.awt.event.ActionListener l)
          Remove an ActionListener
 void selectAll()
          Ask the editor to start editing and to select everything
 void setItem(java.lang.Object anObject)
          Set the item that should be edited.
 void setStringConvertor(StringConvertor conv)
          Sets the string convertor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SComboBoxEditor

public SComboBoxEditor()
Constructor for the SComboBoxEditor object

Method Detail

getItem

public java.lang.Object getItem()
                         throws java.lang.IllegalStateException
Return the edited item.

Specified by:
getItem in interface javax.swing.ComboBoxEditor
Returns:
The item value
Throws:
java.lang.IllegalStateException - TODO: Describe the Exception

getEditorComponent

public java.awt.Component getEditorComponent()
Return the component that should be added to the tree hierarchy for this editor

Specified by:
getEditorComponent in interface javax.swing.ComboBoxEditor
Returns:
The editorComponent value

setStringConvertor

public final void setStringConvertor(StringConvertor conv)
Sets the string convertor

Parameters:
conv - The new stringConvertor value

setItem

public void setItem(java.lang.Object anObject)
Set the item that should be edited. Cancel any editing if necessary

Specified by:
setItem in interface javax.swing.ComboBoxEditor
Parameters:
anObject - The new item value

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Add an ActionListener. An action event is generated when the edited item changes

Specified by:
addActionListener in interface javax.swing.ComboBoxEditor
Parameters:
l - The element to be added to the ActionListener attribute

selectAll

public void selectAll()
Ask the editor to start editing and to select everything

Specified by:
selectAll in interface javax.swing.ComboBoxEditor

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Remove an ActionListener

Specified by:
removeActionListener in interface javax.swing.ComboBoxEditor
Parameters:
l - TODO: Describe the Parameter


Copyright © 2000-2002 The Scope Team. All Rights Reserved.