Class AbstractInputAgentBuilder.AbstractInputAgentImpl
- java.lang.Object
-
- org.zkoss.zats.mimic.impl.operation.AgentDelegator<ComponentAgent>
-
- org.zkoss.zats.mimic.impl.operation.input.AbstractInputAgentBuilder.AbstractInputAgentImpl
-
- All Implemented Interfaces:
Agent,InputAgent,OperationAgent
- Direct Known Subclasses:
DateInputAgentBuilder.InputAgentImpl,TimeInputAgentBuilder.InputAgentImpl
- Enclosing class:
- AbstractInputAgentBuilder
public abstract static class AbstractInputAgentBuilder.AbstractInputAgentImpl extends AgentDelegator<ComponentAgent> implements InputAgent
-
-
Field Summary
-
Fields inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
target
-
-
Constructor Summary
Constructors Constructor Description AbstractInputAgentImpl(ComponentAgent target)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidinput(Object value)To input value into a component.protected abstract voidputValue(ComponentAgent target, String raw, Map<String,Object> data)sub-class should put parsed value(s) into AU datavoidselect(int start, int end)To select (highlight) a range to text of an InputElement by specifying 2 indexes.protected abstract StringtoRawString(ComponentAgent target, Object value)sub-class should convert value into raw string to set toInputAgent.type(String)voidtype(String value)To type text into a component.voidtyping(String value)To simulate typing data into a component and it will send onChanging event to server.-
Methods inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
getClient, getDelegatee
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
-
-
-
Constructor Detail
-
AbstractInputAgentImpl
public AbstractInputAgentImpl(ComponentAgent target)
-
-
Method Detail
-
putValue
protected abstract void putValue(ComponentAgent target, String raw, Map<String,Object> data)
sub-class should put parsed value(s) into AU data
-
toRawString
protected abstract String toRawString(ComponentAgent target, Object value)
sub-class should convert value into raw string to set toInputAgent.type(String)
-
input
public void input(Object value)
Description copied from interface:InputAgentTo input value into a component. This method generalizes various input operation to a InputElement, e.g. typing in a Textbox, or scrolling a Slider. For those components that you cannot type text in, e.g. Slider is inputed by scrolling its bar. you can use this method to mimic the special input operation other than typing.
You can pass in an Integer for a a intbox, Double for a doublebox, and Date for a datebox. Parameter's type depends on target component.- Specified by:
inputin interfaceInputAgent- Parameters:
value- the input value
-
type
public void type(String value)
Description copied from interface:InputAgentTo type text into a component. The value should be valid for target component, e.g. Intbox only accepts integer. If the target is Datebox or Timebox, your input text format should match "format" attribute's pattern.- Specified by:
typein interfaceInputAgent- Parameters:
value- the input value
-
typing
public void typing(String value)
Description copied from interface:InputAgentTo simulate typing data into a component and it will send onChanging event to server.- Specified by:
typingin interfaceInputAgent- Parameters:
value- the typing value.
-
select
public void select(int start, int end)Description copied from interface:InputAgentTo select (highlight) a range to text of an InputElement by specifying 2 indexes.- Specified by:
selectin interfaceInputAgent- Parameters:
start- the beginning index,start from 0, inclusive.end- the ending index, exclusive.
-
-