Class PasswordItem
- All Implemented Interfaces:
Animatable<PasswordItem>
,CanDrop<PasswordItem>
,Clickable<PasswordItem>
,SupportAppend<PasswordItem>
,SupportHelpIcon<PasswordItem>
,SupportPlaceholder<PasswordItem>
,Draggable<PasswordItem>
,Editable<PasswordItem>
,Focusable<PasswordItem>
,HandleHotKey<PasswordItem>
,HandleKeyboardEvents<PasswordItem>
,HandleMouseEvents<PasswordItem>
,Scrollable<PasswordItem>
,Touchable<PasswordItem>
Password item
Special input field used to enter passwords. Instead of every entered character, a dot is shown on the screen.
Supported events:
AnimationStart
AnimationEnd
,
Focus
FocusOut
FocusIn
LosesFocus
copy
cut
EnterPressed
input
paste
Click
,
DoubleClick
,
MouseDown
,
MouseDown
,
MouseLeave
,
MouseMove
,
MouseOver
,
MouseOut
,
MouseUp
,
Wheel
,
KeyPress
,
KeyUp
,
KeyDown
,
Scrollable
TouchCancel
,
TouchEnd
,
TouchMove
,
TouchStart
,
Drop
,
DragStart
,
DragEnd
HotKey
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Field Summary
Fields inherited from class com.jbstrap.ui.components.form.FormItem
appends, clearButton, column, defaultState, defaultValue, description, formItemSize, helpIcon, label, labelPosition, labelSizes, modified, originalValue, params, prepends, required, showLabel, state, tabIndex, value, visible
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
Fields inherited from interface com.jbstrap.ui.components.form.SupportAppend
LOG
-
Constructor Summary
ConstructorDescriptionPasswordItem
(DataDescriptorColumn column) Create a password entry field according to the specified DataDescriptor column.PasswordItem
(DataDescriptorColumn column, String language) Creates a password input field from the specified DataDescriptor column and language code.PasswordItem
(String name, String label) Creates an password field with the specified name and label.PasswordItem
(String name, String label, String language) Creates a password input field with the specified name, label and language code. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawEditor
(StringWriter writer) Draws the editor component.setDefaultValue
(Object defaultValue) Sets the default value of the fieldMethods inherited from class com.jbstrap.ui.components.form.FormItem
_addComponent, _setReverseShow, _setState, addComponent, addRecalcOnChangeColumn, addRecalcOnChangeColumns, addRecalcOnChangeColumns, addValueChangeHandler, afterDraw, clearValue, convertValueToJavaScript, convertValueToJavaScript, drawComponent, enableClearButton, eraseValue, getCalculateValue, getColumn, getComponents, getDataType, getDefaultState, getDescription, getFormItemSize, getLabel, getLabelPosition, getLabelSize, getLabelSize, getName, getOriginalValue, getParam, getParamAsBoolean, getParamAsDate, getParamAsDate, getParamAsDouble, getParamAsInteger, getParamAsLong, getParamAsNumber, getParamAsString, getRecalcOnChangeColumnsList, getState, getTabIndex, getValue, getValueAsBoolean, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsInteger, getValueAsLong, getValueAsString, init, isAssignable, isAutoCalculate, isModified, isReadOnly, isRequired, isReverseShow, isShowLabel, isVisible, onFormItemValueChanged, onHotKeyEventHandler, onShow, redraw, removeParam, resetState, runAfterDrawOnAddon, runOnHideOnAddon, runOnShowOnAddon, setCalculateValue, setDataType, setDataType, setDescription, setEnabled, setFocus, setFormItemSize, setLabel, setLabelPosition, setLabelSize, setLabelSize, setMargin, setModified, setObjectValue, setOriginalObjectValue, setOriginalValue, setPadding, setParam, setParams, setReadOnly, setRequired, setShowLabel, setState, setTabIndex, setValue, setVisible, triggerFormChange, writeHTML
Methods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, onHide, openTag, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setName, setOverflow, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimation
Methods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandler
Methods inherited from interface com.jbstrap.ui.Clickable
addClickHandler, addDoubleClickHandler
Methods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggable
Methods inherited from interface com.jbstrap.ui.Editable
addCopyHandler, addCutHandler, addEnterPressedHandler, addInputHandler, addPasteHandler
Methods inherited from interface com.jbstrap.ui.Focusable
addFocusHandler, addFocusInHandler, addFocusOutHandler, addLosesFocusHandler, setFocus
Methods inherited from interface com.jbstrap.ui.HandleHotKey
addHotKey, addHotKey, removeHotKey, removeHotKeys
Methods inherited from interface com.jbstrap.ui.HandleKeyboardEvents
addKeyDownHandler, addKeyPressHandler, addKeyUpHandler
Methods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler
Methods inherited from interface com.jbstrap.ui.Scrollable
addScrollHandler
Methods inherited from interface com.jbstrap.ui.components.form.SupportAppend
append, append, append, prepend, prepend, prepend, removeAppend, removePrepend
Methods inherited from interface com.jbstrap.ui.components.form.SupportHelpIcon
getHelpIcon, getHelpText, setHelpIcon, setHelpText
Methods inherited from interface com.jbstrap.ui.components.form.SupportPlaceholder
getPlaceholder, setPlaceholder
Methods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Constructor Details
-
PasswordItem
Creates an password field with the specified name and label.- Parameters:
name
- Input field namelabel
- Input field label Ifnull
is set, the field has no label.- Throws:
NullPointerException
- Thrown if the specified name for the field isnull
-
PasswordItem
Creates a password input field with the specified name, label and language code.- Parameters:
name
- Input field namelabel
- Input field label Ifnull
is set, the field has no label.language
- The language code used to create the field If not specified or set tonull
, the field is created using the default language of the framework. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.- Throws:
NullPointerException
- Thrown if the specified name for the field isnull
-
PasswordItem
Create a password entry field according to the specified DataDescriptor column.
The method creates and sets a password input field based on the parameter-specified DataDescriptor column.
The following parameters of the DataDescriptor column are used:DataDescriptorColumn.getLength()
- Text length is equal to the DataDescriptor column lengthDataDescriptorColumn.getTitle
- The field label is the one specified for the DataDescriptor columnDataDescriptorColumn.isNullable()
- If the field gets a value ofnull
, it is not designated as mandatory. If the field value is not set tonull
, it is designated as a mandatory field.MetaParamName.MASK
- The mask specified here is set for the password input fieldMetaParamName.PLACEHOLDER
- Placeholder text to be used in the password input field. This text is displayed if no other text is entered into the input field.MetaParamName.SIZE
- The input field size is set from the value specified here. (Available values: SMALL, MEDIUM, LARGE)MetaParamName.STATE
- The input field state is set from these values. (Available values: DEFAULT, ERROR, WARNING, SUCCESS, INFO)MetaParamName.DEFAULT_VALUE
- The value specified here is set as the input field’s default value. The value must be specified based on the field’s data type, that is, it must be a text value.MetaParamName.READ_ONLY
- Iftrue
is set, the field is created as a read-only field. Otherwise, the field is created as writable and the user is free to change its content.MetaParamName.ENABLED
- Iffalse
is set, the field is disabled. Otherwise, the field is created as enabled.MetaParamName.HELP
- If this parameter is specified, an icon is displayed next to the input field and the text specified here appears as a help text if the user moves the mouse over it.MetaParamName.HELP_ICON
- If an icon name is specified in the parameter, also listed in the enumIcon
, the default help text is changed to the icon.MetaParamName.DESCRIPTION
- The text specified here will appear below the field, in a smaller, italic font.MetaParamName.TAB_INDEX
- The value specified here determines the order of the input focus (when the user presses the Tab key). The smaller the value is, the sooner the input field gets focus. * The greater the value is, the later the field gets focus. * If the parameter is not specified, the field’s tab index receives the focus order value set for the field in the DataDescriptor. If that is also not specified, the focus order is based on which data value was entered earlier into the DataDescriptor.
- Parameters:
column
- The DataDescriptor column based on which the field is created- Throws:
NullPointerException
- Thrown if the parameter’s specified column is set tonull
-
PasswordItem
Creates a password input field from the specified DataDescriptor column and language code.
The method creates and sets a password input field based on the parameter-specified DataDescriptor column.
The following parameters of the DataDescriptor are used:DataDescriptorColumn.getLength()
- Text length is equal to the DataDescriptor column lengthDataDescriptorColumn.getTitle
- The field label is the one specified for the DataDescriptor columnDataDescriptorColumn.isNullable()
- If the field gets a value ofnull
, it is not designated as mandatory. If the field value is not set tonull
, it is designated as a mandatory field.MetaParamName.MASK
- The mask specified here is set for the password input fieldMetaParamName.PLACEHOLDER
- Placeholder text to be used in the password input field. * This text is displayed if no other text is entered into the input field.MetaParamName.SIZE
- The input field size is set from the value specified here. (Available values: SMALL, MEDIUM, LARGE)MetaParamName.STATE
- The input field state is set from these values. (Available values: DEFAULT, ERROR, WARNING, SUCCESS, INFO)MetaParamName.DEFAULT_VALUE
- The value specified here is set as the input field’s default value. * The value must be specified based on the field’s data type, that is, it must be a text value.MetaParamName.READ_ONLY
- Iftrue
is set, the field is created as a read-only field. * Otherwise, the field is created as writable and the user is free to change its content.MetaParamName.ENABLED
- Iffalse
is set, the field is disabled. Otherwise, the field is created as enabled.MetaParamName.HELP
- If this parameter is specified, an icon is displayed next to the input field and the text specified here appears as a help text if the user moves the mouse over it.MetaParamName.HELP_ICON
- If an icon name is specified in the parameter, also listed in the enumIcon
, the default help text is changed to the icon.MetaParamName.DESCRIPTION
- The text specified here will appear below the field, in a smaller, italic font.MetaParamName.TAB_INDEX
- The value specified here determines the order of the input focus (when the user presses the Tab key). * The smaller the value is, the sooner the field gets focus. * The greater the value is, the later the field gets focus. * If the parameter is not specified, the field’s tab index receives the focus order value set for the field in the DataDescriptor. If that is also not specified, the focus order is based on which data value was entered earlier into the DataDescriptor.
- Parameters:
column
- The DataDescriptor column based on which the field is createdlanguage
- The language code used to create the field * If not specified or set tonull
, the field is created using the default language of the framework. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.- Throws:
NullPointerException
- Thrown if the parameter’s specified column is set tonull
-
-
Method Details
-
drawEditor
Description copied from class:FormItem
Draws the editor component.
You do not need to use this method during development, but all components extending the form item must implement it. Use the method to generate the input field’s HTML code. This code is then inserted into the corresponding DOM code when drawing the form item.
- Specified by:
drawEditor
in classFormItem<String,
PasswordItem> - Parameters:
writer
- The HTML string writer class instance; write here the HTML code for the input field
-
setDefaultValue
Sets the default value of the field- Specified by:
setDefaultValue
in classFormItem<String,
PasswordItem> - Parameters:
defaultValue
- The default value of the field- Returns:
- Form item component
-