|
Services Builder for Screens | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.attachmate.sc.ssa.DefaultController
Custom Steps Only
This class is the default controller for the IQAScreen.sendKeys. It can be extended for special Host or application
needs. The typical developer does not interact with this class directly
It supports setting text on fields and performing the following actions:
Key | Command|
---|---|
@A | IDirectAccessConstants.ACTION_ALT |
@B | IDirectAccessConstants.ACTION_BACKSPACE |
@C | IDirectAccessConstants.CMD_CLEAR |
@E | IDirectAccessConstants.CMD_TRANSMIT |
@H | IDirectAccessConstants.CMD_HELP |
@P | IDirectAccessConstants.CMD_PRINT |
@R | IDirectAccessConstants.CMD_RESET |
@T | IDirectAccessConstants.ACTION_TAB |
@1 | IDirectAccessConstants.CMD_F1 |
@2 | IDirectAccessConstants.CMD_F2 |
@3 | IDirectAccessConstants.CMD_F3 |
@4 | IDirectAccessConstants.CMD_F4 |
@5 | IDirectAccessConstants.CMD_F5 |
@6 | IDirectAccessConstants.CMD_F6 |
@7 | IDirectAccessConstants.CMD_F7 |
@8 | IDirectAccessConstants.CMD_F8 |
@9 | IDirectAccessConstants.CMD_F9 |
@a | IDirectAccessConstants.CMD_F10 |
@b | IDirectAccessConstants.CMD_F11 |
@c | IDirectAccessConstants.CMD_F12 |
@d | IDirectAccessConstants.CMD_F13 |
@e | IDirectAccessConstants.CMD_F14 |
@f | IDirectAccessConstants.CMD_F15 |
@g | IDirectAccessConstants.CMD_F16 |
@h | IDirectAccessConstants.CMD_F17 |
@i | IDirectAccessConstants.CMD_F18 |
@j | IDirectAccessConstants.CMD_F19 |
@k | IDirectAccessConstants.CMD_F20 |
@l | IDirectAccessConstants.CMD_F21 |
@m | IDirectAccessConstants.CMD_F22 |
@n | IDirectAccessConstants.CMD_F23 |
@o | IDirectAccessConstants.CMD_F24 |
@u | IDirectAccessConstants.CMD_ROLLDOWN |
@v | IDirectAccessConstants.CMD_ROLLUP |
@x | IDirectAccessConstants.CMD_PA1 |
@y | IDirectAccessConstants.CMD_PA2 |
@z | IDirectAccessConstants.CMD_PA3 |
@A@C | IDirectAccessConstants.CMD_TEST |
@A@J | IDirectAccessConstants.ACTION_ERASE_INPUT |
@A@H | IDirectAccessConstants.CMD_SYSTEM_REQUEST |
@A@Q | IDirectAccessConstants.CMD_ATTENTION |
Field Summary | |
static java.lang.String |
ACTION_KEYS
a list of single character commands used by sendkeys. |
static int[] |
ACTION_LIST
a list of commands and actions from IDirectActionConstants that match up with the sendkeys commands in ACTION_KEYS |
protected static int |
BACKWARDS
tabCursor constant for tabbing backwards |
protected static int |
FORWARD
tabCursor constant for tabbing forward |
protected static java.lang.String |
MULTI_COMMAND
a list of sendkey commands that are the prefix to combination commands. |
protected static java.lang.String[] |
SUB_COMMANDS
a list of command suffixes for each character in MULTI_COMMAND. |
protected static int[][] |
SUBKEYS
a list for character in the SUB_COMMANDS list. |
Constructor Summary | |
DefaultController(com.attachmate.sc.ssa.IDirectAccess da)
|
Method Summary | |
protected void |
execute(int command)
Execute a command. |
protected int |
findCurrentField(IFieldData[] fields)
Finds the field where the cursor is currently located. |
Point |
getCursorTrigger()
Sets the cursor trigger. |
IPerformanceTool |
getPerformanceTool()
Gets the current performance tool from the current controller. |
long |
getSettleTime()
Gets the amount of time a read should wait for a settled read. |
long |
getTimeout()
Gets the maximum amount of time a read should take. |
void |
performAction(java.lang.String commands)
Convert the supplied array of commands into actions. |
protected void |
read()
Read data from the host. |
void |
setCursorTrigger(Point p)
Sets the cursor trigger. |
void |
setFieldText(java.lang.String text)
Write the supplied text to where the cursor is sitting. |
void |
setPerformanceTool(IPerformanceTool tool)
Sets the performance tools on the current controller. |
void |
setSettleTime(long milliseconds)
Sets the amount of time a read should wait for a settled read. |
void |
setTimeout(long milliseconds)
Sets the amount of time to perform a read |
protected void |
tabCursor(int direction)
Move the cursor to the next unprotected field |
protected void |
write(int command)
Send a command to the host. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int FORWARD
protected static final int BACKWARDS
public static final java.lang.String ACTION_KEYS
public static final int[] ACTION_LIST
protected static final java.lang.String MULTI_COMMAND
protected static final java.lang.String[] SUB_COMMANDS
protected static final int[][] SUBKEYS
Constructor Detail |
public DefaultController(com.attachmate.sc.ssa.IDirectAccess da)
Method Detail |
public void setFieldText(java.lang.String text) throws ProtectedFieldException
setFieldText
in interface IController
text
- the String to write to the field
ProtectedFieldException
public void performAction(java.lang.String commands) throws com.attachmate.nav.engine.NavException, java.io.IOException
performAction
in interface IController
commands
- a String containing a list of commands.
com.attachmate.nav.engine.CustomStepException
java.io.IOException
com.attachmate.nav.engine.NavException
public void setTimeout(long milliseconds)
setTimeout
in interface IController
milliseconds
- the maximum number of milliseconds the read should take.public long getTimeout()
getTimeout
in interface IController
public void setSettleTime(long milliseconds)
setSettleTime
in interface IController
milliseconds
- the amount of time to wait per read.public long getSettleTime()
getSettleTime
in interface IController
public void setCursorTrigger(Point p)
setCursorTrigger
in interface IController
p
- a Point
containing the cursor coordinate to wait for. If it is set to (0,0), the read will
rely on the timeout and settleTime for exiting the settled read.public Point getCursorTrigger()
getCursorTrigger
in interface IController
Point
containing the cursor coordinate to wait for. If it is set to (0,0), the read will
rely on the timeout and settleTime for exiting the settled read.protected int findCurrentField(IFieldData[] fields)
fields
- an array containing all the screen's fields
protected void tabCursor(int direction)
direction
- either FORWARD
or BACKWARDS
protected void execute(int command) throws java.io.IOException, com.attachmate.nav.engine.NavException
command
- the command to execute on the write. This needs to be a IDirectAccessConstants
CMD command.
java.io.IOException
com.attachmate.nav.engine.NavException
protected void write(int command) throws java.io.IOException
IDirectAccessConstants
command
- the command to send to the host.
java.io.IOException
protected void read() throws java.io.IOException, com.attachmate.nav.engine.NavException
try {
read(timeout);
while (onReadExit(status, bTimedOut)) { read(settleTime);}
} catch (Timeout) { bTimedOut=true }
It uses the onReadExit()
from IPerformanceTool
to decide if another read is necessary.
java.io.IOException
com.attachmate.nav.engine.NavException
public void setPerformanceTool(IPerformanceTool tool)
setPerformanceTool
in interface IController
tool
- a reference to an object that has implemented IPerformanceTool
.public IPerformanceTool getPerformanceTool()
getPerformanceTool
in interface IController
|
Services Builder for Screens | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |