Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class BasicFormattedComboBoxEditor

java.lang.Object
  extended by javax.swing.plaf.basic.BasicComboBoxEditor
      extended by com.ibm.etools.iseries.ui.BasicFormattedComboBoxEditor
All Implemented Interfaces:
FormattedComboBoxEditor, FocusListener, EventListener, ComboBoxEditor

public class BasicFormattedComboBoxEditor
extends BasicComboBoxEditor
implements FormattedComboBoxEditor

BasicFormattedComboBoxEditor extends javax.swing.plaf.basic.BasicComboBoxEditor and implements FormattedComboBoxEditor. It sets JFormattedTextField as the editor of a ComboBox. BasicFormattedComboBoxEditor is for a basic platform.

See Also:
FormattedComboBoxEditor, MetalFormattedComboBoxEditor

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
BasicComboBoxEditor.UIResource
 
Field Summary
static String Copyright
           
protected  JFormattedTextField textFieldEditor
           
 
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
editor
 
Fields inherited from interface com.ibm.etools.iseries.ui.FormattedComboBoxEditor
copyright
 
Constructor Summary
BasicFormattedComboBoxEditor()
          Constructs a new BasicComboBoxFormattedEditor.
BasicFormattedComboBoxEditor(FieldModel fm)
          Constructs a new BasicComboBoxFormattedEditor with the specified FieldModel used by the editor.
 
Method Summary
 void addActionListener(ActionListener l)
          Adds an ActionListener.
static String Copyright()
          This method returns the copyright notice for this class.
 void focusGained(FocusEvent e)
          Process this method when focus is gained on the editor.
 void focusLost(FocusEvent e)
          Process this when focus is lost on the editor.
 Color getBackgroundColor()
          Returns the background color of the editor.
 Component getEditorComponent()
          Return the component that should be added to the tree hierarchy for this editor
 Color getForegroundColor()
          Return the foreground color of the editor.
 Object 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 setBackgroundColor(Color c)
          Return the background color of the editor.
 void setFieldModel(FieldModel fm)
          Return the FieldModel of the editor.
 void setForegroundColor(Color c)
          Return the foreground color of the editor.
 void setItem(Object anObject)
          Set the item that should be edited.
 
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
createEditorComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

textFieldEditor

protected JFormattedTextField textFieldEditor
Constructor Detail

BasicFormattedComboBoxEditor

public BasicFormattedComboBoxEditor()
Constructs a new BasicComboBoxFormattedEditor.


BasicFormattedComboBoxEditor

public BasicFormattedComboBoxEditor(FieldModel fm)
Constructs a new BasicComboBoxFormattedEditor with the specified FieldModel used by the editor.

Parameters:
fm - com.ibm.etools.iseries.ui.FieldModel
Method Detail

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener.

Specified by:
addActionListener in interface ComboBoxEditor
Overrides:
addActionListener in class BasicComboBoxEditor
Parameters:
l - java.awt.event.ActionListener

Copyright

public static String Copyright()
This method returns the copyright notice for this class.

Returns:
java.lang.String

focusGained

public void focusGained(FocusEvent e)
Process this method when focus is gained on the editor.

Specified by:
focusGained in interface FocusListener
Overrides:
focusGained in class BasicComboBoxEditor
Parameters:
e - java.awt.event.FocusEvent

focusLost

public void focusLost(FocusEvent e)
Process this when focus is lost on the editor.

Specified by:
focusLost in interface FocusListener
Overrides:
focusLost in class BasicComboBoxEditor
Parameters:
e - java.awt.event.FocusEvent

getBackgroundColor

public Color getBackgroundColor()
Returns the background color of the editor.

Returns:
java.awt.Color
See Also:
setBackgroundColor(java.awt.Color)

getEditorComponent

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

Specified by:
getEditorComponent in interface ComboBoxEditor
Overrides:
getEditorComponent in class BasicComboBoxEditor
Returns:
java.awt.Component

getForegroundColor

public Color getForegroundColor()
Return the foreground color of the editor.

Returns:
java.awt.Color
See Also:
setForegroundColor(java.awt.Color)

getItem

public Object getItem()
Return the edited item

Specified by:
getItem in interface ComboBoxEditor
Overrides:
getItem in class BasicComboBoxEditor
Returns:
java.lang.Object
See Also:
setItem(java.lang.Object)

removeActionListener

public void removeActionListener(ActionListener l)
Remove an ActionListener

Specified by:
removeActionListener in interface ComboBoxEditor
Overrides:
removeActionListener in class BasicComboBoxEditor
Parameters:
l - java.awt.event.ActionListener

selectAll

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

Specified by:
selectAll in interface ComboBoxEditor
Overrides:
selectAll in class BasicComboBoxEditor

setBackgroundColor

public void setBackgroundColor(Color c)
Return the background color of the editor.

Parameters:
c - java.awt.Color
See Also:
getBackgroundColor()

setFieldModel

public void setFieldModel(FieldModel fm)
Return the FieldModel of the editor.

Specified by:
setFieldModel in interface FormattedComboBoxEditor
Parameters:
fm - com.ibm.etools.iseries.ui.FieldModel

setForegroundColor

public void setForegroundColor(Color c)
Return the foreground color of the editor.

Parameters:
c - java.awt.Color
See Also:
getForegroundColor()

setItem

public void setItem(Object anObject)
Set the item that should be edited.

Specified by:
setItem in interface ComboBoxEditor
Overrides:
setItem in class BasicComboBoxEditor
Parameters:
anObject - java.lang.Object
See Also:
getItem()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.