Package com.spinyowl.legui.component
Class PasswordInput
java.lang.Object
com.spinyowl.legui.component.Component
com.spinyowl.legui.component.AbstractTextComponent
com.spinyowl.legui.component.TextInput
com.spinyowl.legui.component.PasswordInput
- All Implemented Interfaces:
TextComponent,Serializable
This component used to enter passwords securely by users.
- See Also:
-
Field Summary
Fields inherited from class com.spinyowl.legui.component.AbstractTextComponent
textState -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PasswordInput(float x, float y, float width, float height) Constructor with position and size parameters.PasswordInput(String text) Default constructor with text to set.PasswordInput(String text, float x, float y, float width, float height) Constructor with text, position and size parameters.PasswordInput(String text, org.joml.Vector2f position, org.joml.Vector2f size) Constructor with text, position and size parameters.PasswordInput(org.joml.Vector2f position, org.joml.Vector2f size) Constructor with position and size parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns mask character.inthashCode()booleanisMasked()Returns true if masking enabled.voidsetMaskCharacter(int maskCharacter) Used to set mask character.voidsetMasked(boolean masked) Used to enable or disable masking.voidsetTextState(TextState textState) Used to set text statetoString()Methods inherited from class com.spinyowl.legui.component.TextInput
addTextInputContentChangeEventListener, getCaretPosition, getEndSelectionIndex, getMouseCaretPosition, getSelection, getStartSelectionIndex, getTextInputContentChangeEvents, isEditable, removeTextInputContentChangeEventListener, setCaretPosition, setEditable, setEndSelectionIndex, setMouseCaretPosition, setStartSelectionIndexMethods inherited from class com.spinyowl.legui.component.AbstractTextComponent
getTextStateMethods inherited from class com.spinyowl.legui.component.Component
add, add, addAll, clearChildComponents, containerIterator, contains, containsAll, count, forEach, getAbsolutePosition, getChildComponents, getFocusedStyle, getFrame, getHoveredStyle, getIntersector, getLayer, getListenerMap, getMetadata, getParent, getPosition, getPressedStyle, getSize, getStyle, getTabIndex, getTooltip, indexOfChild, intersects, isEmpty, isEnabled, isFocusable, isFocused, isHovered, isPressed, isTabFocusable, isVisible, keepRendering, keepRendering, parallelStream, remove, remove, removeAll, removeIf, setEnabled, setFocusable, setFocused, setHovered, setIntersector, setListenerMap, setParent, setPosition, setPosition, setPressed, setSize, setSize, setStyle, setTabFocusable, setTabIndex, setTooltip, stream
-
Constructor Details
-
PasswordInput
public PasswordInput()Default constructor. Used to create component instance without any parameters.Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
-
PasswordInput
public PasswordInput(float x, float y, float width, float height) Constructor with position and size parameters.- Parameters:
x- x position position in parent component.y- y position position in parent component.width- width of component.height- height of component.
-
PasswordInput
public PasswordInput(org.joml.Vector2f position, org.joml.Vector2f size) Constructor with position and size parameters.- Parameters:
position- position position in parent component.size- size of component.
-
PasswordInput
Default constructor with text to set.Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
- Parameters:
text- text to set.
-
PasswordInput
Constructor with text, position and size parameters.- Parameters:
text- text to set.x- x position position in parent component.y- y position position in parent component.width- width of component.height- height of component.
-
PasswordInput
Constructor with text, position and size parameters.- Parameters:
text- text to set.position- position position in parent component.size- size of component.
-
-
Method Details
-
getMaskCharacter
public int getMaskCharacter()Returns mask character.- Returns:
- mask character.
-
setMaskCharacter
public void setMaskCharacter(int maskCharacter) Used to set mask character.- Parameters:
maskCharacter- mask character to set.
-
isMasked
public boolean isMasked()Returns true if masking enabled.- Returns:
- true if masking enabled.
-
setMasked
public void setMasked(boolean masked) Used to enable or disable masking.- Parameters:
masked- true if need to mask text.
-
toString
-
equals
-
hashCode
public int hashCode() -
setTextState
Description copied from interface:TextComponentUsed to set text state- Specified by:
setTextStatein interfaceTextComponent- Overrides:
setTextStatein classAbstractTextComponent- Parameters:
textState- new text state to set.
-