|
||||||||||
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.
UserInputPanel
Field Summary | |
private java.util.Vector |
fields
|
private Processor |
processor
|
private Validator |
validator
|
Constructor Summary | |
PasswordGroup(java.lang.String validator,
java.lang.String processor)
Creates a passowrd group to manage one or more password fields. |
Method Summary | |
void |
addField(javax.swing.JPasswordField field)
Adds a JPasswordField to the group of fields being managed
by this object. |
java.lang.String |
getFieldContents(int index)
Returns the contents of the field indicated by index . |
int |
getNumFields()
Returns the number of sub-fields. |
java.lang.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 |
Field Detail |
private java.util.Vector fields
private Validator validator
private Processor processor
Constructor Detail |
public PasswordGroup(java.lang.String validator, java.lang.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 java.lang.String getFieldContents(int index) throws java.lang.IndexOutOfBoundsException
index
.
getFieldContents
in interface ProcessingClient
index
- the index of the sub-field from which the contents
is requested.
java.lang.IndexOutOfBoundsException
- if the index is out of bounds.public void addField(javax.swing.JPasswordField field)
JPasswordField
to the group of fields being managed
by this object.
public boolean validateContents()
true
if the validation passes or no implementation
of a validation rule exists. Otherwise false
is
returned.public java.lang.String getPassword()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |