Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class MetalFormattedComboBoxEditor

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

public class MetalFormattedComboBoxEditor
extends MetalComboBoxEditor
implements FormattedComboBoxEditor

MetalFormattedComboBoxEditor extends javax.swing.plaf.metal.MetalComboBoxEditor and implements FormattedComboBoxEditor. It sets JFormattedTextField as the editor of a ComboBox. The MetalFormattedComboBoxEditor is used by com.ibm.etools.iseries.ui.JFormattedComboBox for a metal platform.

See Also:
FormattedComboBoxEditor, BasicFormattedComboBoxEditor

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalComboBoxEditor
MetalComboBoxEditor.UIResource
 
Field Summary
static String Copyright
           
protected  JFormattedTextField textFieldEditor
           
 
Fields inherited from class javax.swing.plaf.metal.MetalComboBoxEditor
editorBorderInsets
 
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxEditor
editor
 
Fields inherited from interface com.ibm.etools.iseries.ui.FormattedComboBoxEditor
copyright
 
Constructor Summary
MetalFormattedComboBoxEditor()
          Constructs a new MetalComboBoxFormattedEditor.
MetalFormattedComboBoxEditor(FieldModel fm)
          Constructs a new MetalComboBoxFormattedEditor 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

MetalFormattedComboBoxEditor

public MetalFormattedComboBoxEditor()
Constructs a new MetalComboBoxFormattedEditor.


MetalFormattedComboBoxEditor

public MetalFormattedComboBoxEditor(FieldModel fm)
Constructs a new MetalComboBoxFormattedEditor with the specified FieldModel used by the editor.

Parameters:
fm - et400.util.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

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

getItem

public Object getItem()
Return the edited item

Specified by:
getItem in interface ComboBoxEditor
Overrides:
getItem in class BasicComboBoxEditor
Returns:
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

setFieldModel

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

Specified by:
setFieldModel in interface FormattedComboBoxEditor
Parameters:
fm - et400.util.FieldModel

setForegroundColor

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

Parameters:
c - java.awt.Color

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

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.