org.jets3t.gui
Class UserInputFields

java.lang.Object
  extended by org.jets3t.gui.UserInputFields

public class UserInputFields
extends java.lang.Object

Utility class to manage User Inputs by representing the possible user input fields as GUI elements, providing the panel that contains these GUI elements, and providing the user's inputs into the GUI items as properties.

Author:
James Murty

Constructor Summary
UserInputFields(java.awt.Insets defaultInsets, HyperlinkActivatedListener hyperlinkListener, SkinsFactory skinsFactory)
          Constructs the object ready to generate GUI elements to represent the configured user input fields.
 
Method Summary
 boolean buildFieldsPanel(javax.swing.JPanel fieldsPanel, Jets3tProperties uploaderProperties)
          Builds a user input panel matching the fields specified in the uploader.properties file.
 java.util.Properties getUserInputsAsProperties(boolean hashPasswords)
           
 boolean isUserInputFieldsAvailable()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserInputFields

public UserInputFields(java.awt.Insets defaultInsets,
                       HyperlinkActivatedListener hyperlinkListener,
                       SkinsFactory skinsFactory)
Constructs the object ready to generate GUI elements to represent the configured user input fields.

Parameters:
defaultInsets - the default insets to use when displaying the GUI elements.
hyperlinkListener - a class to listen for hyperlink click events that may be generated by JHtmlLabel. This class may be null, in which case these events will be ignored.
skinsFactory - the skin factory used to create GUI elements.
Method Detail

buildFieldsPanel

public boolean buildFieldsPanel(javax.swing.JPanel fieldsPanel,
                                Jets3tProperties uploaderProperties)
Builds a user input panel matching the fields specified in the uploader.properties file.

Parameters:
fieldsPanel - the panel component to add prompt and user input components to.
uploaderProperties - properties specific to the Uploader application that includes the field.* settings necessary to build the User Inputs screen.
Returns:
true if there is at least one valid user input field, false otherwise.

getUserInputsAsProperties

public java.util.Properties getUserInputsAsProperties(boolean hashPasswords)
Returns:
properties containing the user's answers to the input fields. Property names correspond to the field's name, and the property values are the user's response.

isUserInputFieldsAvailable

public boolean isUserInputFieldsAvailable()