Class IntegerItem
- All Implemented Interfaces:
Animatable<IntegerItem>,CanDrop<IntegerItem>,Clickable<IntegerItem>,SupportAppend<IntegerItem>,SupportHelpIcon<IntegerItem>,SupportPlaceholder<IntegerItem>,Draggable<IntegerItem>,Editable<IntegerItem>,Focusable<IntegerItem>,HandleHotKey<IntegerItem>,HandleKeyboardEvents<IntegerItem>,HandleMouseEvents<IntegerItem>,Touchable<IntegerItem>
Integer item
Input field used to enter integers. The component prompts the user to enter an integer. The component displays an input field on the interface where the user enters only numeric characters. A plus and a minus icon are also displayed in order for the user to increment/decrement the component’s value.
A minimum and a maximum value can also be set for the component. In this case the user is only allowed to enter a value into the component within the specified range and the step of incrementing/decrementing the value is set.
The integer item component is a form item which means the component can be placed on the Form component and the form fully supports its
functionality. The component is also suitable for standalone use, but in this case its values and events must be handled from code.
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,
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, visibleFields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPositionFields inherited from interface com.jbstrap.ui.components.form.SupportAppend
LOG -
Constructor Summary
ConstructorsConstructorDescriptionIntegerItem(DataDescriptorColumn column) Creates an integer input field from a DataDescriptor column.IntegerItem(DataDescriptorColumn column, String language) Creates an integer input field based on the specified DataDescriptor column and language code.IntegerItem(String name, String label) Creates an integer input field with the specified name and label.IntegerItem(String name, String label, String language) Creates an integer input field with the specified name and label according to the specified language code. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe operations to be executed after the drawing of the componentvoiddrawEditor(StringWriter writer) Draws the editor component.final StringGets the style class name for the decrement button.final LongGets the maximum value for the component.final LongGets the minimum value for the componentfinal StringSets the postfix text to be displayed after the input box.final StringGets the prefix text.final NumbergetStep()Gets the increment/decrement value set by the buttons.final StringGets the style class for the increment button.voidinit()The component initialization method.booleanSets if the component is enabled.final booleanSets if the component value is allowed to be modified using the mouse wheel.booleanSets if the input field is read-only.final booleanSets if the increment/decrement buttons are displayed on the interface.final booleanSets if the increment/decrement buttons are displayed below each other.setDefaultValue(Object defaultValue) Sets input field default value.setEnabled(boolean enabled) Enabling/disabling the component on the interface.final IntegerItemsetMaximumValue(Number maxValue) Sets the component’s maximum value.final IntegerItemsetMinimumValue(Number minValue) Sets the minimum value for the component.final IntegerItemsetMousewheelSupport(boolean mousewheel) Sets if mouse wheel is supported.setObjectValue(Object value) Sets the form item’s current value using the object in the parameter.setOriginalObjectValue(Object value) Sets the form item’s original value using the object in the parameter.final IntegerItemsetOriginalValue(Long value) Sets the original value of the componentfinal IntegerItemsetPostfix(String postfixText) Sets the postfix text to be displayed after the input box.final IntegerItemsetPostfix(String postfixText, String postfixStyleClass) Sets the postfix text and the custom style class for the postfix.final IntegerItemSets the input box prefix.final IntegerItemSets the input box prefix and the custom style class of the prefix box.setReadOnly(boolean readOnly) Sets if the field is read-only.final IntegerItemsetShowTouchSpin(boolean showTouchSpin) Sets the appearance of the increment/decrement button.final IntegerItemSets the increment/decrement value specified by the buttons.final IntegerItemsetTouchSpinButtonClass(String downButtonClass, String upButtonClass) Custom style class for the increment/decrement buttons.final IntegerItemsetTouchSpinVertical(boolean vertical) Sets the alignment of the increment/decrement buttons.final IntegerItemSets the current value of the component.Methods inherited from class com.jbstrap.ui.components.form.FormItem
_addComponent, _setReverseShow, _setState, addComponent, addRecalcOnChangeColumn, addRecalcOnChangeColumns, addRecalcOnChangeColumns, addValueChangeHandler, 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, isAssignable, isAutoCalculate, isModified, isRequired, isReverseShow, isShowLabel, isVisible, onFormItemValueChanged, onHotKeyEventHandler, onShow, redraw, removeParam, resetState, runAfterDrawOnAddon, runOnHideOnAddon, runOnShowOnAddon, setCalculateValue, setDataType, setDataType, setDescription, setFocus, setFormItemSize, setLabel, setLabelPosition, setLabelSize, setLabelSize, setMargin, setModified, setPadding, setParam, setParams, setRequired, setShowLabel, setState, setTabIndex, setVisible, triggerFormChange, writeHTMLMethods 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, 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, toggleStyleClassMethods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimationMethods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandlerMethods inherited from interface com.jbstrap.ui.Clickable
addClickHandler, addDoubleClickHandlerMethods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggableMethods inherited from interface com.jbstrap.ui.Editable
addCopyHandler, addCutHandler, addEnterPressedHandler, addInputHandler, addPasteHandlerMethods inherited from interface com.jbstrap.ui.Focusable
addFocusHandler, addFocusInHandler, addFocusOutHandler, addLosesFocusHandler, setFocusMethods inherited from interface com.jbstrap.ui.HandleHotKey
addHotKey, addHotKey, removeHotKey, removeHotKeysMethods inherited from interface com.jbstrap.ui.HandleKeyboardEvents
addKeyDownHandler, addKeyPressHandler, addKeyUpHandlerMethods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandlerMethods inherited from interface com.jbstrap.ui.components.form.SupportAppend
append, append, append, prepend, prepend, prepend, removeAppend, removePrependMethods inherited from interface com.jbstrap.ui.components.form.SupportHelpIcon
getHelpIcon, getHelpText, setHelpIcon, setHelpTextMethods inherited from interface com.jbstrap.ui.components.form.SupportPlaceholder
getPlaceholder, setPlaceholderMethods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Constructor Details
-
IntegerItem
Creates an integer input field with the specified name and label.- Parameters:
name- Input field namelabel- Input field label Ifnullis set, the field has no label.- Throws:
NullPointerException- Thrown if the specified name for the field isnull
-
IntegerItem
Creates an integer input field with the specified name and label according to the specified language code.- Parameters:
name- Input field namelabel- Input field label Ifnullis 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
-
IntegerItem
Creates an integer input field from a DataDescriptor column.
The method creates and sets an integer input field based on the parameter-specified DataDescriptor column. The following parameters of the DataDescriptor are used:
DataDescriptorColumn.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.MIN_VALUE- This parameter specifies the minimum value of the component The parameter must take a value that can be converted toLong. If the parameter is not specified, no lower bound is set for the component value.MetaParamName.MAX_VALUE- This parameter specifies the maximum value of the component. The parameter must take a value that can be converted toLong. If the parameter is not specified, no upper bound is set for the component value.MetaParamName.TOUCHSPIN_STEP- This parameter specifies the increment/decrement step. The default value is 1. The parameter must take a value that can be converted toLong.MetaParamName.TOUCHSPIN_BUTTONUP_CLASS- This parameter specifies the custom CSS class for the increment buttonMetaParamName.TOUCHSPIN_BUTTONDOWN_CLASS- This parameter specifies the custom CSS class for the decrement buttonMetaParamName.TOUCHSPIN_PREFIX- If a text is set in the parameter, it is displayed as a prefix in front of the input field.MetaParamName.TOUCHSPIN_PREFIX_EXTRACLASS- If a prefix is displayed in front of the input field, the custom CSS class containing the prefix is specified hereMetaParamName.TOUCHSPIN_POSTFIX- If a text is specified in the parameter, it is displayed next to the input field as a postfix.MetaParamName.TOUCHSPIN_POSTFIX_EXTRACLASS- If a postfix comes after the input field, the CSS class for the postfix box is specified hereMetaParamName.TOUCHSPIN_VERTICALBUTTONS- If the value is set totrue, increment and decrement buttons are displayed below each other on the right side of the component. By default, the decrement button is displayed on the left side of the input field, whereas the increment button is displayed on the right side of the input field.MetaParamName.MOUSEWHEEL- If the parameter is set totrue, the user is able to change the component value by using the mouse wheel. This function is disabled by default.MetaParamName.PLACEHOLDER- Placeholder text to be used in the 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- Iftrueis 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- Iffalseis set, the field is disabled. In all other cases 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 created- Throws:
NullPointerException- Thrown if the parameter’s specified column is set tonullNumberFormatException- Thrown if the value of the parameters MIN_VALUE, MAX_VALUE vagy a TOUCHSPIN_STEP cannot be parsed toLong.
-
IntegerItem
Creates an integer input field based on the specified DataDescriptor column and language code.
The method creates and sets an integer input field based on the parameter-specified DataDescriptor column. The following parameters of the DataDescriptor are used:
DataDescriptorColumn.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.MIN_VALUE- This parameter specifies the minimum value of the component The parameter must take a value that can be converted toLong. If the parameter is not specified, no lower bound is set for the component value.MetaParamName.MAX_VALUE- This parameter specifies the maximum value of the component. The parameter must take a value that can be converted toLong. If the parameter is not specified, no upper bound is set for the component value.MetaParamName.TOUCHSPIN_STEP- This parameter specifies the increment/decrement step. The default value is 1. The parameter must take a value that can be converted toLong.MetaParamName.TOUCHSPIN_BUTTONUP_CLASS- This parameter specifies the custom CSS class for the increment buttonMetaParamName.TOUCHSPIN_BUTTONDOWN_CLASS- This parameter specifies the custom CSS class for the decrement buttonMetaParamName.TOUCHSPIN_PREFIX- If a text is set in the parameter, it is displayed as a prefix in front of the input field.MetaParamName.TOUCHSPIN_PREFIX_EXTRACLASS- If a prefix is displayed in front of the input field, the custom CSS class containing the prefix is specified hereMetaParamName.TOUCHSPIN_POSTFIX- If a text is specified in the parameter, it is displayed next to the input field as a postfix.MetaParamName.TOUCHSPIN_POSTFIX_EXTRACLASS- If a postfix comes after the input field, the CSS class for the postfix box is specified hereMetaParamName.TOUCHSPIN_VERTICALBUTTONS- If the value is set totrue, increment and decrement buttons are displayed below each other on the right side of the component. By default, the decrement button is displayed on the left side of the input field, whereas the increment button is displayed on the right side * of the input field.MetaParamName.MOUSEWHEEL- If the parameter is set totrue, the user is able to change the component value by using the mouse wheel. This function is disabled by default.MetaParamName.PLACEHOLDER- Placeholder text to be used in the 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- Iftrueis 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- Iffalseis set, the field is disabled. In all other cases 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.MetaParamName.SHOW_BUTTONS- This parameter determines if the buttons are shown on the component. By default, the buttons are not shown. Iftrue, the buttons will be displayed in the component's input field
- 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 tonullNumberFormatException- Thrown if the value of the parameters MIN_VALUE, MAX_VALUE vagy a TOUCHSPIN_STEP cannot be parsed toLong.
-
-
Method Details
-
getMinimumValue
Gets the minimum value for the component- Returns:
- The minimum value for the component or
nullif no minimum value is set
-
setMinimumValue
Sets the minimum value for the component.- Parameters:
minValue- The minimum value of the component No smaller value is allowed to be set for this component.- Returns:
- Integer input component
-
getMaximumValue
Gets the maximum value for the component.- Returns:
- The maximum value for the component or
nullif the maximum value is not specified
-
setMaximumValue
Sets the component’s maximum value.- Parameters:
maxValue- The maximum value for the component No greater value is allowed to be set for this component.- Returns:
- Integer input component
-
setValue
Sets the current value of the component.- Overrides:
setValuein classFormItem<Long,IntegerItem> - Parameters:
value- The current value of the component- Returns:
- Integer input component
-
setOriginalValue
Sets the original value of the component- Overrides:
setOriginalValuein classFormItem<Long,IntegerItem> - Parameters:
value- The current value of the component- Returns:
- Integer input component
-
setObjectValue
Description copied from class:FormItemSets the form item’s current value using the object in the parameter.- Overrides:
setObjectValuein classFormItem<Long,IntegerItem> - Parameters:
value- The current value of the component- Returns:
- Integer input component
- Throws:
NumberFormatException- Thrown if the text equivalent of the specified value cannot be ?????
-
setOriginalObjectValue
Description copied from class:FormItemSets the form item’s original value using the object in the parameter.- Overrides:
setOriginalObjectValuein classFormItem<Long,IntegerItem> - Parameters:
value- The original value of the component- Returns:
- Integer input component
- Throws:
NumberFormatException- Thrown if the text equivalent of the specified value cannot be ?????
-
isShowTouchSpin
public final boolean isShowTouchSpin()Sets if the increment/decrement buttons are displayed on the interface.- Returns:
- If
true, the increment/decrement buttons are visible, otherwisefalse
-
setShowTouchSpin
Sets the appearance of the increment/decrement button. By default, the increment/decrement buttons are hidden on the interface.- Parameters:
showTouchSpin- Iftrueis set, the increment/decrement buttons are visible Iffalseis set, the increment/decrement buttons are not displayed.- Returns:
- Integer input component
-
setStep
Sets the increment/decrement value specified by the buttons. By default, the value is incremented/decremented in a step of 1.- Parameters:
step- Increment/decrement step- Returns:
- Integer input component
-
getStep
Gets the increment/decrement value set by the buttons.- Returns:
- Increment/decrement step
-
setPrefix
Sets the input box prefix.- Parameters:
prefixText- Prefix text- Returns:
- Integer input component
-
setPrefix
Sets the input box prefix and the custom style class of the prefix box.- Parameters:
prefixText- PrefixprefixStyleClass- Prefix box style class- Returns:
- Integer input component
-
getPrefix
Gets the prefix text.- Returns:
- The prefix text or
nullif no prefix is set for the component
-
setPostfix
Sets the postfix text to be displayed after the input box.- Parameters:
postfixText- Postfix text- Returns:
- Integer input component
-
setPostfix
Sets the postfix text and the custom style class for the postfix.- Parameters:
postfixText- Postfix textpostfixStyleClass- The name of the style class for the postfix box- Returns:
- Integer input component
-
getPostfix
Sets the postfix text to be displayed after the input box.- Returns:
- Postfix text or
nullif no postfix is set for the component
-
setTouchSpinButtonClass
Custom style class for the increment/decrement buttons.- Parameters:
downButtonClass- The style class for the decrement buttonupButtonClass- The style class for the increment button- Returns:
- Integer input component
-
getUpButtonStyleClass
Gets the style class for the increment button.- Returns:
- The style class for the increment button or
nullif the increment button has no defined custom style class
-
getDownButtonStyleClass
Gets the style class name for the decrement button.- Returns:
- Style class name for the decrement button or
nullif the decrement button has no custom style class defined
-
setTouchSpinVertical
Sets the alignment of the increment/decrement buttons. By default, increment/decrement buttons are located to the left and right of the input field. This settings may be changed so that buttons are below each other to the right of the input field.- Parameters:
vertical- Iftrueis set, increment/decrement buttons are located below each other to the right of the input field. Iffalseis set , increment/decrement buttons are located to the left and right of the input field.- Returns:
- Integer input component
-
isTouchSpinVertical
public final boolean isTouchSpinVertical()Sets if the increment/decrement buttons are displayed below each other.- Returns:
- If
trueis set, increment/decrement buttons are located below each other to the left of the input field. Otherwisefalse.
-
drawEditor
Description copied from class:FormItemDraws 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:
drawEditorin classFormItem<Long,IntegerItem> - Parameters:
writer- The HTML string writer class instance; write here the HTML code for the input field
-
init
Description copied from class:ComponentThe component initialization method.Empty method, only needs to be overwritten when making a custom component, that needs to call an initializing JavaScript on the client side. The method is called by the framework after the component is drawn, but before the afterDraw() method. The use of this method during application development is not allowed. This method is meant for inner use only.
- Overrides:
initin classFormItem<Long,IntegerItem> - Throws:
JavaScriptLoadError- If there was a JavaScript error during the initialization.
-
setDefaultValue
Sets input field default value.- Specified by:
setDefaultValuein classFormItem<Long,IntegerItem> - Parameters:
defaultValue- The default value for the input field- Returns:
- Form item component
- Throws:
NumberFormatException- Thrown if the specified value cannot be interpreted asLong
-
afterDraw
public void afterDraw()Description copied from class:ComponentThe operations to be executed after the drawing of the componentBy default, this is an empty method. It has to be overwritten on a component or page if additional operations have to be executed after the drawing process. One such operation is data retrieval, which shouldn't run in constructors so that the user could see results of an operation or navigation process.
- Overrides:
afterDrawin classFormItem<Long,IntegerItem>
-
setReadOnly
Sets if the field is read-only. If the field is set to read-only, the user is not allowed to change or modify the input field value using the increment/decrement buttons. Modifications are allowed by default.- Overrides:
setReadOnlyin classFormItem<Long,IntegerItem> - Parameters:
readOnly- Iftrueis set, the field is read-only, otherwise it modifications are allowed- Returns:
- Integer input component
-
isReadOnly
public boolean isReadOnly()Sets if the input field is read-only.- Overrides:
isReadOnlyin classFormItem<Long,IntegerItem> - Returns:
- If
trueis set, the input field is read-only, otherwise modifications are allowed
-
setEnabled
Enabling/disabling the component on the interface. If the component is disabled, the user is not allowed to use it and change its value. By default the component is enabled.- Overrides:
setEnabledin classFormItem<Long,IntegerItem> - Parameters:
enabled- Iftrueis set, the component is enabled, otherwise disabled- Returns:
- Integer input component
-
isEnabled
public boolean isEnabled()Sets if the component is enabled.- Overrides:
isEnabledin classComponent<IntegerItem>- Returns:
- If
trueis set, the component is enabled, otherwise disabled
-
setMousewheelSupport
Sets if mouse wheel is supported. If the mouse wheel is supported, the input box value can be incremented/decremented using the mouse wheel. This function is disabled by default.- Parameters:
mousewheel- Iftrueis set, the mouse wheel can be used to increment/decrement component value, otherwise not.- Returns:
- Integer input component
-
isMousewheelSupport
public final boolean isMousewheelSupport()Sets if the component value is allowed to be modified using the mouse wheel.- Returns:
- If
truethe component value can be modified using the mouse wheel, otherwise not.
-