org.jets3t.gui
Class UserInputFields
java.lang.Object
org.jets3t.gui.UserInputFields
public class UserInputFields
- extends 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
UserInputFields
public UserInputFields(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.
buildFieldsPanel
public boolean buildFieldsPanel(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 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()