Interface ITextboxBase<I extends ITextboxBase>
-
- All Superinterfaces:
IChildrenOfInputgroup<I>,IComponent<I>,IHtmlBasedComponent<I>,IInputElement<I,java.lang.String>,IReadonly<I>,IXulElement<I>
public interface ITextboxBase<I extends ITextboxBase> extends IInputElement<I,java.lang.String>
ImmutableTextboxbase component.- Author:
- jumperchen
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classITextboxBase.TypeSpecifies the values to the textbox's type.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetRows()Returns the rows.default java.lang.StringgetType()Returns the type.default booleanisMultiline()Returns whether it is multiline.default booleanisSubmitByEnter()Returns whether it is submitByEnter, If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.default booleanisTabbable()Returns whether TAB is allowed.IwithMultiline(boolean multiline)Returns a copy ofthisimmutable component with the specifiedmultiline.IwithRows(int rows)Returns a copy ofthisimmutable component with the specifiedrows.IwithSubmitByEnter(boolean submitByEnter)Returns a copy ofthisimmutable component with the specifiedsubmitByEnter.IwithTabbable(boolean tabbable)Returns a copy ofthisimmutable component with the specifiedtabbable.IwithType(java.lang.String type)Returns a copy ofthisimmutable component with the specifiedtype.default IwithType(ITextboxBase.Type type)Returns a copy ofthisimmutable component with the specifiedtype.IwithValue(java.lang.String value)Returns a copy ofthisimmutable component with the specifiedvalue.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IInputElement
getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholder
-
Methods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonly, withReadonly
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Method Detail
-
withValue
I withValue(@Nullable java.lang.String value)
Description copied from interface:IInputElementReturns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the input component.
- Specified by:
withValuein interfaceIInputElement<I extends ITextboxBase,java.lang.String>- Parameters:
value- The value of the input component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
isMultiline
default boolean isMultiline()
Returns whether it is multiline.Default:
false.
-
withMultiline
I withMultiline(boolean multiline)
Returns a copy ofthisimmutable component with the specifiedmultiline.Sets whether it is multiline.
- Parameters:
multiline-trueto enable multiline.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getRows
default int getRows()
Returns the rows.Default:
1.
-
withRows
I withRows(int rows)
Returns a copy ofthisimmutable component with the specifiedrows.Sets the rows.
Note: Not allowed to set rows and height/vflex at the same time
- Parameters:
rows- The number of the row to display.Default:
1.- Returns:
- A modified copy of the
thisobject
-
isTabbable
default boolean isTabbable()
Returns whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.Default:
false.
-
withTabbable
I withTabbable(boolean tabbable)
Returns a copy ofthisimmutable component with the specifiedtabbable.Sets whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.
- Parameters:
tabbable-trueto enable TAB in the textbox.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getType
default java.lang.String getType()
Returns the type.Default:
"text".
-
withType
I withType(java.lang.String type)
Returns a copy ofthisimmutable component with the specifiedtype.Sets the type of the textbox. Acceptable values are
"text","password","tel","email", and"url"- Parameters:
type- The type of the textbox.Default:
"text".- Returns:
- A modified copy of the
thisobject
-
withType
default I withType(ITextboxBase.Type type)
Returns a copy ofthisimmutable component with the specifiedtype.Sets the type of the textbox. Acceptable values are
ITextboxBase.Type- Parameters:
type- The type of the textbox.Default:
"text".- Returns:
- A modified copy of the
thisobject - See Also:
ITextboxBase.Type
-
isSubmitByEnter
default boolean isSubmitByEnter()
Returns whether it is submitByEnter, If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.Default: false.
-
withSubmitByEnter
I withSubmitByEnter(boolean submitByEnter)
Returns a copy ofthisimmutable component with the specifiedsubmitByEnter.Sets whether it is submitByEnter. If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.
- Parameters:
submitByEnter-trueto enable whether it is submitByEnterDefault:
false.- Returns:
- A modified copy of the
thisobject
-
-