com.partnersoft.gui.forms
Class FormPicklistField

java.lang.Object
  extended by com.partnersoft.gui.forms.AbstractFormField<java.lang.String>
      extended by com.partnersoft.gui.forms.FormPicklistField
All Implemented Interfaces:
FormField<java.lang.String>

public class FormPicklistField
extends AbstractFormField<java.lang.String>

A FormField implemented with a JComboBox. Does not allow arbitrary values to be entered; for that use FormComboField.

Copyright 2004-2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Field Summary
 
Fields inherited from class com.partnersoft.gui.forms.AbstractFormField
gui
 
Constructor Summary
FormPicklistField()
           
FormPicklistField(java.util.Collection<java.lang.String> options)
           
FormPicklistField(javax.swing.ComboBoxModel model)
           
FormPicklistField(java.lang.String... options)
           
 
Method Summary
 javax.swing.JComboBox getJComboBox()
           
 int getSelectedIndex()
           
 java.lang.String getValue()
          Returns the current value for this field.
 void setModel(javax.swing.ComboBoxModel newModel)
           
 void setOptions(java.util.ArrayList<java.lang.String> newOptions)
           
 void setOptions(java.util.Collection<java.lang.String> newOptions)
           
 void setOptions(java.lang.String... newOptions)
           
 void setSelectedIndex(int newIndex)
           
 void setValue(java.lang.String newItem)
          Sets the current value for this field.
 
Methods inherited from class com.partnersoft.gui.forms.AbstractFormField
addFieldListener, doAction, fireActionRequested, fireValueChanged, getGui, isDisabled, removeFieldListener, setDisabled, setToolTipText, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormPicklistField

public FormPicklistField()

FormPicklistField

public FormPicklistField(javax.swing.ComboBoxModel model)

FormPicklistField

public FormPicklistField(java.util.Collection<java.lang.String> options)

FormPicklistField

public FormPicklistField(java.lang.String... options)
Method Detail

setModel

public void setModel(javax.swing.ComboBoxModel newModel)

getSelectedIndex

public int getSelectedIndex()

setSelectedIndex

public void setSelectedIndex(int newIndex)

getValue

public java.lang.String getValue()
Description copied from interface: FormField
Returns the current value for this field.


setValue

public void setValue(java.lang.String newItem)
Description copied from interface: FormField
Sets the current value for this field.


setOptions

public void setOptions(java.util.Collection<java.lang.String> newOptions)

setOptions

public void setOptions(java.util.ArrayList<java.lang.String> newOptions)

setOptions

public void setOptions(java.lang.String... newOptions)

getJComboBox

public javax.swing.JComboBox getJComboBox()