public class UIPasswordField extends UITextField
UITextField.CursorPosition
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate
autoSelectOnFocus, bgColor, charOffset, cursorColor, cursorPosition, cursorShape, editable, fontScale, iconTextfield, iconTextfieldDisabled, lineOffset, lines, lineSpacing, multiLine, scrollBar, selectColor, selectingText, selectionPosition, selectShape, startTimer, text, textColor, textShadow
Constructor and Description |
---|
UIPasswordField(MalisisGui gui)
Instantiates a new
UIPasswordField . |
UIPasswordField(MalisisGui gui,
char passwordChar)
Instantiates a new
UIPasswordField |
Modifier and Type | Method and Description |
---|---|
void |
addText(java.lang.String text)
Adds the text.
|
void |
deleteSelectedText()
Delete selected text.
|
char |
getPasswordCharacter()
Gets the masking character used when rendering text.
|
java.lang.String |
getText()
Gets the text of this
UITextField . |
protected boolean |
handleCtrlKeyDown(int keyCode)
Handle ctrl key down.
|
void |
setPasswordCharacter(char passwordChar)
Sets the masking character to use when rendering text.
|
void |
setText(java.lang.String text)
Sets the text.
|
protected void |
updateText()
Updates the text from the password value
|
buildLines, createShape, deleteFromCursor, deleteWord, drawBackground, drawCursor, drawForeground, drawSelectionBox, drawText, getContentHeight, getContentWidth, getCursorColor, getCursorPosition, getFontScale, getHorizontalPadding, getLineHeight, getLineSpacing, getOffsetX, getOffsetY, getPropertyString, getScrollbar, getScrollStep, getSelectColor, getSelectedText, getSelectionPosition, getTextColor, getVerticalPadding, getVisibleLines, isEditable, isTextShadow, onButtonPress, onButtonRelease, onCursorUpdated, onDoubleClick, onDrag, onKeyTyped, selectWord, selectWord, setAutoSelectOnFocus, setCursorColor, setCursorPosition, setEditable, setFocused, setFontScale, setLineOffset, setLineSpacing, setOffsetX, setOffsetY, setOptions, setSelectColor, setSize, setTextColor, setTextShadow, startSelecting, validateText
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onClick, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setHovered, setName, setParent, setPosition, setPosition, setTooltip, setTooltip, setVisible, setZIndex, toString, unregister
public UIPasswordField(MalisisGui gui)
UIPasswordField
.gui
- the guipublic UIPasswordField(MalisisGui gui, char passwordChar)
UIPasswordField
gui
- the guipasswordChar
- the password charpublic char getPasswordCharacter()
public void setPasswordCharacter(char passwordChar)
passwordChar
- the masking character to usepublic java.lang.String getText()
UITextField
UITextField
.getText
in class UITextField
protected void updateText()
public void addText(java.lang.String text)
addText
in class UITextField
text
- the textpublic void setText(java.lang.String text)
setText
in class UITextField
text
- the new textpublic void deleteSelectedText()
deleteSelectedText
in class UITextField
protected boolean handleCtrlKeyDown(int keyCode)
handleCtrlKeyDown
in class UITextField
keyCode
- the key code