public class PasswordField extends TextField
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT_ID |
LAYER_TEXT
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETS
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform
Modifier | Constructor and Description |
---|---|
|
PasswordField(DocumentModel model) |
protected |
PasswordField(DocumentModel model,
boolean applyStyles,
ElementId elementId,
java.lang.String style) |
|
PasswordField(DocumentModel model,
java.lang.String style) |
|
PasswordField(java.lang.String text) |
|
PasswordField(java.lang.String text,
ElementId elementId) |
|
PasswordField(java.lang.String text,
ElementId elementId,
java.lang.String style) |
|
PasswordField(java.lang.String text,
java.lang.String style) |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Predicate<java.lang.Character> |
getAllowedCharacters() |
java.lang.String |
getDisplayText()
Returns the formatted text as the user will see it.
|
DocumentModel |
getDocumentModel() |
char |
getOutputCharacter() |
java.lang.String |
getText()
Returns the raw hidden password text.
|
void |
setAllowedCharacters(com.google.common.base.Predicate<java.lang.Character> allowed)
Sets a predicate that returns true for characters that are allowed in
the password field.
|
protected void |
setDocumentModel(DocumentModel model) |
void |
setOutputCharacter(java.lang.Character c)
Sets the character used to obscure output.
|
void |
setText(java.lang.String s)
Presets the password text to some value.
|
java.lang.String |
toString() |
createTextEntryComponent, getActionMap, getColor, getFont, getFontSize, getPreferredCursorWidth, getPreferredLineCount, getPreferredWidth, getTextHAlignment, getTextVAlignment, initializeDefaultStyles, isSingleLine, setColor, setFont, setFontSize, setPreferredCursorWidth, setPreferredLineCount, setPreferredWidth, setSingleLine, setTextHAlignment, setTextVAlignment
addEffect, addMouseListener, getAlpha, getBackground, getBorder, getEffectControl, getEffects, getElementId, getInsets, getInsetsComponent, getPreferredSize, getSize, getStyle, hasEffect, removeEffect, removeMouseListener, runEffect, setAlpha, setAlpha, setBackground, setBorder, setChildAlpha, setEffects, setInsets, setInsetsComponent, setPreferredSize, setSize
attachChild, attachChildAt, breadthFirstTraversal, clone, cloneFields, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, setLightListRefresh, setLodLevel, setMaterial, setMatParamOverrideRefresh, setModelBound, setParent, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write
addControl, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocal
public static final java.lang.String ELEMENT_ID
public PasswordField(java.lang.String text)
public PasswordField(DocumentModel model)
public PasswordField(java.lang.String text, java.lang.String style)
public PasswordField(java.lang.String text, ElementId elementId)
public PasswordField(java.lang.String text, ElementId elementId, java.lang.String style)
public PasswordField(DocumentModel model, java.lang.String style)
protected PasswordField(DocumentModel model, boolean applyStyles, ElementId elementId, java.lang.String style)
protected void setDocumentModel(DocumentModel model)
setDocumentModel
in class TextField
public DocumentModel getDocumentModel()
getDocumentModel
in class TextField
@StyleAttribute(value="text", lookupDefault=false) public void setText(java.lang.String s)
Note: if you find yourself calling this with a user's actual password text then you are probably doing something wrong with password management.
Note: setting text this way will bypass the input filtering. This is so that it's possible to use special marker characters to tell the difference between a real user-entered password and a token inserted to represent a hash of a previously entered password. This token can then purposely have text that is not allowed in a normal password so as to be distinguishable from a real user-entered password.
public java.lang.String getText()
public java.lang.String getDisplayText()
@StyleAttribute(value="outputCharacter", lookupDefault=false) public void setOutputCharacter(java.lang.Character c)
public char getOutputCharacter()
@StyleAttribute(value="allowedCharacters", lookupDefault=false) public void setAllowedCharacters(com.google.common.base.Predicate<java.lang.Character> allowed)
public com.google.common.base.Predicate<java.lang.Character> getAllowedCharacters()