|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.panels.PasswordGroup
This class can be used to manage multiple related password fields. This is used in the
UserInputPanel
to manage communication with the validator and processor for
password fields.
com.izforge.izpack.panels.UserInputPanel
Constructor Summary | |
PasswordGroup(String validator,
String processor)
Creates a passowrd group to manage one or more password fields. |
Method Summary | |
void |
addField(JPasswordField field)
Adds a JPasswordField to the group of fields being managed by this object. |
String |
getFieldContents(int index)
Returns the contents of the field indicated by index . |
int |
getNumFields()
Returns the number of sub-fields. |
String |
getPassword()
Returns the password. |
boolean |
validateContents()
This method validates the group content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PasswordGroup(String validator, String processor)
validator
- A string that specifies a class that provides a password validation service.
The class must implement the Validator
interface. If an attempt to instantiate
this class fails, no validation will be performed.processor
- A string that specifies a class that provides a password processing service,
such as password encryption. The class must implement the Processor
interface.
If an attempt to instantiate this class fails, no processing will be performed. Insted the
contents of the first field will be returned.Method Detail |
public int getNumFields()
getNumFields
in interface ProcessingClient
public String getFieldContents(int index) throws IndexOutOfBoundsException
index
.
getFieldContents
in interface ProcessingClient
index
- the index of the sub-field from which the contents is requested.
IndexOutOfBoundsException
- if the index is out of bounds.public void addField(JPasswordField field)
JPasswordField
to the group of fields being managed by this object.
field
- JPasswordField
to addpublic boolean validateContents()
true
if the validation passes or no implementation of a validation
rule exists. Otherwise false
is returned.public String getPassword()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |