com.partnersoft.gui.forms
Class FormRandomIntegerField

java.lang.Object
  extended by com.partnersoft.gui.forms.FormRandomIntegerField
All Implemented Interfaces:
FormField<java.lang.Long>

public class FormRandomIntegerField
extends java.lang.Object
implements FormField<java.lang.Long>

A type-in field that only accepts Integers.

Copyright 2007 Partner Software, Inc.

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

Constructor Summary
FormRandomIntegerField(int size)
           
FormRandomIntegerField(int minValue, int maxValue)
           
 
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.
 java.lang.Long 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 form (no input allowed).
 void setToolTipText(java.lang.String newText)
          Sets the tool-tip text for the field.
 void setValue(int intValue)
           
 void setValue(java.lang.Long newValue)
          Sets the current value for this field.
 void valueChanged(java.lang.Long newValue)
          When the value changes, this is run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormRandomIntegerField

public FormRandomIntegerField(int size)

FormRandomIntegerField

public FormRandomIntegerField(int minValue,
                              int maxValue)
Method Detail

setValue

public void setValue(int intValue)

getValue

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

Specified by:
getValue in interface FormField<java.lang.Long>

setValue

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

Specified by:
setValue in interface FormField<java.lang.Long>

addFieldListener

public void addFieldListener(FormFieldListener nosey)
Description copied from interface: FormField
Add a listener for value change and action events.

Specified by:
addFieldListener in interface FormField<java.lang.Long>
Parameters:
nosey - the interested party

doAction

public void doAction()
Description copied from interface: FormField
This does different things depending on the field; for example in a text field it indicates return was hit.

Specified by:
doAction in interface FormField<java.lang.Long>

getGui

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

Specified by:
getGui in interface FormField<java.lang.Long>

removeFieldListener

public void removeFieldListener(FormFieldListener nosey)
Description copied from interface: FormField
Remove a listener for value change and action events.

Specified by:
removeFieldListener in interface FormField<java.lang.Long>
Parameters:
nosey - the interested party

setToolTipText

public void setToolTipText(java.lang.String newText)
Description copied from interface: FormField
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.

Specified by:
setToolTipText in interface FormField<java.lang.Long>

valueChanged

public void valueChanged(java.lang.Long newValue)
Description copied from interface: FormField
When the value changes, this is run. Use as a more convenient form of event handling.

Specified by:
valueChanged in interface FormField<java.lang.Long>

setDisabled

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

Specified by:
setDisabled in interface FormField<java.lang.Long>

isDisabled

public boolean isDisabled()
Specified by:
isDisabled in interface FormField<java.lang.Long>