com.partnersoft.gui.forms
Interface FormField<T>

Type Parameters:
T - type of value the FormField edits
All Known Implementing Classes:
AbstractFormField, AbstractFormTextField, FormCheckboxField, FormCogFilterField, FormColorField, FormComboField, FormDatabaseField, FormDateAndTimeField, FormDateField, FormDirectionField, FormDurationField, FormFilePathField, FormFilePathListField, FormIconField, FormIconPicklistField, FormIntegerField, FormNamedBlobField, FormNumberField, FormPasswordField, FormPicklistField, FormRandomIntegerField, FormReadOnlyStringField, FormStringField, FormTextField, FormTimeField

public interface FormField<T>

A data-entry field on a Form. Provides a more standard and data-oriented interface for the wide variety of Java components that allow setting a data value.

Copyright 2005-2009 Partner Software, Inc.

Version:
$Id: GUIField.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Method Summary
 void addFieldListener(FormFieldListener nosey)
          Add a listener for value change and action events.
 void doAction()
          This does different things depending on the field; for example in a text field it indicates return was hit.
 javax.swing.JComponent getGui()
          Returns the GUI component for this field.
 T getValue()
          Returns the current value for this field.
 boolean isDisabled()
           
 void removeFieldListener(FormFieldListener nosey)
          Remove a listener for value change and action events.
 void setDisabled(boolean disabled)
          If true, disables the field (no input allowed).
 void setToolTipText(java.lang.String newText)
          Sets the tool-tip text for the field.
 void setValue(T newValue)
          Sets the current value for this field.
 void valueChanged(T newValue)
          When the value changes, this is run.
 

Method Detail

getGui

javax.swing.JComponent getGui()
Returns the GUI component for this field. Implementations should also consider providing a type-specific accessor, e.g. getJTextArea().


getValue

T getValue()
Returns the current value for this field.


setValue

void setValue(T newValue)
Sets the current value for this field.


valueChanged

void valueChanged(T newValue)
When the value changes, this is run. Use as a more convenient form of event handling.


doAction

void doAction()
This does different things depending on the field; for example in a text field it indicates return was hit.


setToolTipText

void setToolTipText(java.lang.String newText)
Sets the tool-tip text for the field. This is the floaty bit of description that you see if you're smart enough or slow enough to leave the mouse hovered over the field.

Parameters:
newText -

addFieldListener

void addFieldListener(FormFieldListener nosey)
Add a listener for value change and action events.

Parameters:
nosey - the interested party

removeFieldListener

void removeFieldListener(FormFieldListener nosey)
Remove a listener for value change and action events.

Parameters:
nosey - the interested party

setDisabled

void setDisabled(boolean disabled)
If true, disables the field (no input allowed). Default is enabled.


isDisabled

boolean isDisabled()