org.archiviststoolkit.swing
Class ATBasicComponentFactory

java.lang.Object
  extended by com.jgoodies.binding.adapter.BasicComponentFactory
      extended by org.archiviststoolkit.swing.ATBasicComponentFactory

public class ATBasicComponentFactory
extends com.jgoodies.binding.adapter.BasicComponentFactory


Constructor Summary
ATBasicComponentFactory()
           
 
Method Summary
static javax.swing.JFormattedTextField createBufferedIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName)
           
static javax.swing.JFormattedTextField createBufferedIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, boolean useGrouping)
           
static javax.swing.JCheckBox createCheckBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz)
           
static javax.swing.JCheckBox createCheckBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz, boolean buffered)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.util.ArrayList values)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.util.ArrayList values, java.lang.Integer maxLength)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz, boolean buffered)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz, java.lang.Integer maxLength)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Class clazz, java.lang.Integer maxLength, boolean buffered)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Object[] values)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Object[] values, boolean buffered)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.lang.Object[] values, java.lang.Integer maxLength, boolean buffered)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.util.Vector values)
           
static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.util.Vector values, java.lang.Integer maxLength)
           
static javax.swing.JComboBox createComboBoxWithConverter(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, java.util.Vector values, java.lang.String listName)
           
static javax.swing.JFormattedTextField createCurrencyField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, boolean useGrouping)
          Method to return a text field which has been formated to accept currency
static javax.swing.JFormattedTextField createDateField(com.jgoodies.binding.value.ValueModel valueModel)
          Creates and returns a formatted text field that is bound to the Date value of the given ValueModel.
static javax.swing.JFormattedTextField createDoubleField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName)
           
static javax.swing.JFormattedTextField createDoubleField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, boolean useGrouping)
           
static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName)
           
static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, boolean useGrouping)
           
static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, boolean useGrouping, boolean buffered)
           
static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel, java.lang.String fieldName, int min, int max)
          Method to create a formated textfield which only accepts integers with a certain range
static javax.swing.JTextField createISODateField(com.jgoodies.binding.value.ValueModel valueModel)
          This create a textfeild that is used to input iso dates.
static javax.swing.JLabel createLabel(java.lang.Class clazz, java.lang.String fieldName)
           
static javax.swing.JLabel createLabel(java.lang.Class clazz, java.lang.String fieldName, java.lang.String defaultValue)
           
static javax.swing.JTextArea createTextArea(com.jgoodies.binding.value.ValueModel valueModel)
           
static javax.swing.JTextArea createTextArea(com.jgoodies.binding.value.ValueModel valueModel, boolean commitOnFocusLost)
           
static javax.swing.JTextField createTextField(com.jgoodies.binding.value.ValueModel valueModel)
           
static javax.swing.JTextField createTextField(com.jgoodies.binding.value.ValueModel valueModel, boolean commitOnFocusLost)
          Creates and returns a text field with the content bound to the given ValueModel.
static javax.swing.JComboBox createUnboundComboBox(java.lang.Object[] values)
           
static javax.swing.JComboBox createUnboundComboBox(java.util.Vector values)
           
static javax.swing.JFormattedTextField createUnboundDateField()
           
static javax.swing.JFormattedTextField createUnboundDoubleField()
           
static javax.swing.JFormattedTextField createUnboundDoubleField(boolean useGrouping)
           
static javax.swing.JTextArea createUnboundedTextArea()
           
static javax.swing.JFormattedTextField createUnboundIntegerField()
           
static javax.swing.JFormattedTextField createUnboundIntegerField(boolean useGrouping)
           
 
Methods inherited from class com.jgoodies.binding.adapter.BasicComponentFactory
createCheckBox, createColorChooser, createColorChooser, createComboBox, createComboBox, createFormattedTextField, createFormattedTextField, createFormattedTextField, createFormattedTextField, createIntegerField, createIntegerField, createIntegerField, createIntegerField, createIntegerField, createLabel, createLabel, createList, createList, createLongField, createLongField, createLongField, createLongField, createLongField, createPasswordField, createPasswordField, createRadioButton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATBasicComponentFactory

public ATBasicComponentFactory()
Method Detail

createIntegerField

public static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                 java.lang.String fieldName)

createBufferedIntegerField

public static javax.swing.JFormattedTextField createBufferedIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                         java.lang.String fieldName)

createBufferedIntegerField

public static javax.swing.JFormattedTextField createBufferedIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                         java.lang.String fieldName,
                                                                         boolean useGrouping)

createIntegerField

public static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                 java.lang.String fieldName,
                                                                 boolean useGrouping)

createIntegerField

public static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                 java.lang.String fieldName,
                                                                 boolean useGrouping,
                                                                 boolean buffered)

createIntegerField

public static javax.swing.JFormattedTextField createIntegerField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                 java.lang.String fieldName,
                                                                 int min,
                                                                 int max)
Method to create a formated textfield which only accepts integers with a certain range

Parameters:
detailsModel - The details model
fieldName - The field name to bound to
min - The minimum value allowed
max - The maximum value allowed
Returns:

createUnboundIntegerField

public static javax.swing.JFormattedTextField createUnboundIntegerField()

createUnboundIntegerField

public static javax.swing.JFormattedTextField createUnboundIntegerField(boolean useGrouping)

createDateField

public static javax.swing.JFormattedTextField createDateField(com.jgoodies.binding.value.ValueModel valueModel)
Creates and returns a formatted text field that is bound to the Date value of the given ValueModel. The JFormattedTextField is configured with an AbstractFormatter that uses two different DateFormats to edit and display the Date. A SHORT DateFormat with strict checking is used to edit (parse) a date; the DateFormatter's default DateFormat is used to display (format) a date. In both cases null Dates are mapped to the empty String.

Parameters:
valueModel - the model that holds the value to be edited
Returns:
a formatted text field for Date instances that is bound to the given value model
Throws:
java.lang.NullPointerException - if the valueModel is null

createUnboundDateField

public static javax.swing.JFormattedTextField createUnboundDateField()

createISODateField

public static javax.swing.JTextField createISODateField(com.jgoodies.binding.value.ValueModel valueModel)
This create a textfeild that is used to input iso dates. The only thing this does from a regular textfield is that it does checking of the date format on focus lost valid formats are yyyy, yyyy-mm, yyyy-mm-dd in the date format being used by the AT

Parameters:
valueModel - The vlaue model to bind to
Returns:
The JTextfield

createDoubleField

public static javax.swing.JFormattedTextField createDoubleField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                java.lang.String fieldName)

createDoubleField

public static javax.swing.JFormattedTextField createDoubleField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                java.lang.String fieldName,
                                                                boolean useGrouping)

createCurrencyField

public static javax.swing.JFormattedTextField createCurrencyField(com.jgoodies.binding.PresentationModel detailsModel,
                                                                  java.lang.String fieldName,
                                                                  boolean useGrouping)
Method to return a text field which has been formated to accept currency

Parameters:
detailsModel - The model to bind to
fieldName - The name of the field in the model to bind to
useGrouping -
Returns:
The textfeild formatted to accept currency

createUnboundDoubleField

public static javax.swing.JFormattedTextField createUnboundDoubleField()

createUnboundDoubleField

public static javax.swing.JFormattedTextField createUnboundDoubleField(boolean useGrouping)

createCheckBox

public static javax.swing.JCheckBox createCheckBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz)

createCheckBox

public static javax.swing.JCheckBox createCheckBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz,
                                                   boolean buffered)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz,
                                                   boolean buffered)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz,
                                                   java.lang.Integer maxLength)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Class clazz,
                                                   java.lang.Integer maxLength,
                                                   boolean buffered)

createComboBoxWithConverter

public static javax.swing.JComboBox createComboBoxWithConverter(com.jgoodies.binding.PresentationModel detailsModel,
                                                                java.lang.String fieldName,
                                                                java.util.Vector values,
                                                                java.lang.String listName)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Object[] values)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Object[] values,
                                                   boolean buffered)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.lang.Object[] values,
                                                   java.lang.Integer maxLength,
                                                   boolean buffered)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.util.ArrayList values)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.util.ArrayList values,
                                                   java.lang.Integer maxLength)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.util.Vector values)

createComboBox

public static javax.swing.JComboBox createComboBox(com.jgoodies.binding.PresentationModel detailsModel,
                                                   java.lang.String fieldName,
                                                   java.util.Vector values,
                                                   java.lang.Integer maxLength)

createUnboundComboBox

public static javax.swing.JComboBox createUnboundComboBox(java.util.Vector values)

createUnboundComboBox

public static javax.swing.JComboBox createUnboundComboBox(java.lang.Object[] values)

createTextArea

public static javax.swing.JTextArea createTextArea(com.jgoodies.binding.value.ValueModel valueModel)

createTextArea

public static javax.swing.JTextArea createTextArea(com.jgoodies.binding.value.ValueModel valueModel,
                                                   boolean commitOnFocusLost)

createUnboundedTextArea

public static javax.swing.JTextArea createUnboundedTextArea()

createTextField

public static javax.swing.JTextField createTextField(com.jgoodies.binding.value.ValueModel valueModel)

createTextField

public static javax.swing.JTextField createTextField(com.jgoodies.binding.value.ValueModel valueModel,
                                                     boolean commitOnFocusLost)
Creates and returns a text field with the content bound to the given ValueModel. Text changes can be committed to the model on focus lost or on every character typed.

Parameters:
valueModel - the model that provides the text value
commitOnFocusLost - true to commit text changes on focus lost, false to commit text changes on every character typed
Returns:
a text field that is bound to the given value model
Throws:
java.lang.NullPointerException - if the valueModel is null
See Also:
createTextField(ValueModel)

createLabel

public static javax.swing.JLabel createLabel(java.lang.Class clazz,
                                             java.lang.String fieldName,
                                             java.lang.String defaultValue)

createLabel

public static javax.swing.JLabel createLabel(java.lang.Class clazz,
                                             java.lang.String fieldName)