Package com.simsilica.lemur
Class PasswordField
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.simsilica.lemur.Panel
com.simsilica.lemur.TextField
com.simsilica.lemur.PasswordField
- All Implemented Interfaces:
HasLocalTransform
,CloneableSmartAsset
,Collidable
,Savable
,JmeCloneable
,Cloneable
A special TextField implementation that displays an obscured version
of the password the user has entered. In all other ways, it acts
exactyl like a TextField.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode
-
Field Summary
FieldsFields inherited from class com.simsilica.lemur.TextField
LAYER_TEXT
Fields inherited from class com.simsilica.lemur.Panel
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETS
Fields inherited from class com.jme3.scene.Spatial
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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionPasswordField
(DocumentModel model) protected
PasswordField
(DocumentModel model, boolean applyStyles, ElementId elementId, String style) PasswordField
(DocumentModel model, String style) PasswordField
(String text) PasswordField
(String text, ElementId elementId) PasswordField
(String text, ElementId elementId, String style) PasswordField
(String text, String style) -
Method Summary
Modifier and TypeMethodDescriptionReturns the formatted text as the user will see it.char
getText()
Returns the raw hidden password text.void
setAllowedCharacters
(Predicate<Character> allowed) Sets a predicate that returns true for characters that are allowed in the password field.protected void
setDocumentModel
(DocumentModel model) void
Sets the character used to obscure output.void
Presets the password text to some value.toString()
Returns the Spatial's name followed by the class of the spatial
Example: "MyNode (com.jme3.scene.Spatial)"Methods inherited from class com.simsilica.lemur.TextField
createTextEntryComponent, getActionMap, getColor, getFont, getFontSize, getPreferredCursorWidth, getPreferredLineCount, getPreferredWidth, getTextHAlignment, getTextVAlignment, initializeDefaultStyles, isSingleLine, setColor, setFont, setFontSize, setPreferredCursorWidth, setPreferredLineCount, setPreferredWidth, setSingleLine, setTextHAlignment, setTextVAlignment
Methods inherited from class com.simsilica.lemur.Panel
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
Methods inherited from class com.jme3.scene.Node
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
Methods inherited from class com.jme3.scene.Spatial
addControl, addControlAt, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, depthFirstTraversal, 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
-
Field Details
-
ELEMENT_ID
- See Also:
-
-
Constructor Details
-
PasswordField
-
PasswordField
-
PasswordField
-
PasswordField
-
PasswordField
-
PasswordField
-
PasswordField
protected PasswordField(DocumentModel model, boolean applyStyles, ElementId elementId, String style)
-
-
Method Details
-
setDocumentModel
- Overrides:
setDocumentModel
in classTextField
-
getDocumentModel
- Overrides:
getDocumentModel
in classTextField
-
setText
Presets the password text to some value.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.
-
getText
Returns the raw hidden password text. -
getDisplayText
Returns the formatted text as the user will see it. -
setOutputCharacter
@StyleAttribute(value="outputCharacter", lookupDefault=false) public void setOutputCharacter(Character c) Sets the character used to obscure output. If set to null then the default '*' will be used. -
getOutputCharacter
public char getOutputCharacter() -
setAllowedCharacters
@StyleAttribute(value="allowedCharacters", lookupDefault=false) public void setAllowedCharacters(Predicate<Character> allowed) Sets a predicate that returns true for characters that are allowed in the password field. All other input will be skipped. -
getAllowedCharacters
-
toString
Description copied from class:Spatial
Returns the Spatial's name followed by the class of the spatial
Example: "MyNode (com.jme3.scene.Spatial)"
-