com.partnersoft.gui.forms
Class FormPicklistField
java.lang.Object
com.partnersoft.gui.forms.AbstractFormField<java.lang.String>
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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()