com.wrq.vhi.script.api
Interface EntityMoveCursorEvent

All Superinterfaces:
EntityEvent, Event, HostSessionEvent, ModelEvent

public interface EntityMoveCursorEvent
extends EntityEvent, HostSessionEvent

Entity move cursor event information.

See Also:
EntityEventHandler.moveCursor(com.wrq.vhi.script.api.EntityMoveCursorEvent)

Method Summary
 void defaultMoveCursor()
          Moves the cursor using the default algorithm.
 CursorPosition getEventCursorPosition()
          Gets the cursor position when the event fired.
 CursorPosition getTargetCursorPosition()
          Gets the target cursor position.
 
Methods inherited from interface com.wrq.vhi.script.api.EntityEvent
getEntityName, getTabStops
 
Methods inherited from interface com.wrq.vhi.script.api.HostSessionEvent
getHostSession
 
Methods inherited from interface com.wrq.vhi.script.api.ModelEvent
getClientSession, getCurrentOperation, getCurrentProcedure, getModelContext
 
Methods inherited from interface com.wrq.vhi.script.api.Event
checkForTimeout, createErrorMessage, createErrorMessage, createHostSession, createUserErrorMessage, getEventStack, getHandlerProperty, getLogger, isDesignEnvironment
 

Method Detail

getEventCursorPosition

CursorPosition getEventCursorPosition()
Gets the cursor position when the event fired. If the cursor position changes during the course if this event, it will not be reflected in the value returned.

Returns:
the cursor position

getTargetCursorPosition

CursorPosition getTargetCursorPosition()
Gets the target cursor position.

Returns:
the target cursor position

defaultMoveCursor

void defaultMoveCursor()
                       throws ApptrieveException
Moves the cursor using the default algorithm. For character mode hosts this means one of two methods will be used. The method selected depends on the presence of a move cursor forward event handler or command list.

If a move cursor forward event handler is defined or a move cursor forward command list is defined, VHI will iteratively use this event handler or command list to move the cursor until it reaches the desired location. If tab stops are defined on the entity, the request to move the cursor will fail immediately if the location is not at a tab stop. If the cursor returns to the starting location before stopping at the requested location, the cursor movement also fails.

If a method to move the cursor forward is not defined, VHI will use the arrow keys to move the cursor. VHI will calculate how far vertically and horizontally the cursor needs to move and issue the appropriate number of arrow keys in each direction.

If the selected method of cursor movement fails to position the cursor at the requested location, an ApptrieveException will be thrown.

Throws:
ApptrieveException - if the cursor move fails