junit.extensions.jfcunit.eventdata
Class JTreeMouseEventDataTagHandler

java.lang.Object
  extended byjunit.extensions.xml.elements.AbstractTagHandler
      extended byjunit.extensions.jfcunit.eventdata.BaseEventDataTagHandler
          extended byjunit.extensions.jfcunit.eventdata.JTreeMouseEventDataTagHandler
All Implemented Interfaces:
EventDataConstants, JFCXMLConstants, XMLConstants

public class JTreeMouseEventDataTagHandler
extends BaseEventDataTagHandler

This is a extension of the click and drag elements. Where the type specified is MouseEventData.

Description

Nothing is invoked directly by this tag handler. The click and drag elements use this tag handler to customize the data specificly for the JTree.

Parameters

Attribute Description Required Default Values
type For this element the type must be set to JTreeMouseEventData Yes N/A N/A
refid Id of a object reference which has been previously found. Yes N/A N/A
node Text of the node to select node or pathrefid N/A Must be string specifying the value of the node.
pathrefid reference to a path of the node to select. node or pathrefid N/A reference to a existing property refered by the refid.
clicks The number of clicks to be executed. No 1 Positive Integer
modifiers The modifiers to be used for this event. No Button1 if popup is false otherwise Button3 alt altgr control meta shift button1 button2 button3
popup True if this is event is using the popup button. No false true false
sleeptime Maximum sleep time No 500 Positive Integer representing the milli-seconds
position Positioning of the mouse within the bounds of the component. No center center north northeast east southeast south southwest west northwest custom percentage
reference Reference point or number for position calculation. No null integers "x,y"

Example

 <click
    type="JTreeMouseEventData"
    refid="Tree"
    node="Music"
 />
 

The above clicks once on the center of the component identified by Tree.

Author:
Kevin Wilson
See Also:
JTreeMouseEventData

Field Summary
 
Fields inherited from class junit.extensions.jfcunit.eventdata.BaseEventDataTagHandler
 
Fields inherited from class junit.extensions.xml.elements.AbstractTagHandler
 
Fields inherited from interface junit.extensions.jfcunit.eventdata.EventDataConstants
CENTER, CUSTOM, DEFAULT_HOLDTIME, DEFAULT_ISPOPUPTRIGGER, DEFAULT_KEY_MODIFIERS, DEFAULT_MOUSE_MODIFIERS, DEFAULT_NUMBEROFCLICKS, DEFAULT_POPUP_MODIFIERS, DEFAULT_POSITION, DEFAULT_SCROLL_AMOUNT, DEFAULT_SLEEPTIME, DEFAULT_WHEEL_ROTATION, DOWN_ARROW_SUBCOMPONENT, EAST, EDITOR_SUBCOMPONENT, INVALID_SUBCOMPONENT, INVALID_TEXT_OFFSET, NORTH, NORTH_EAST, NORTH_WEST, OFFSET, PERCENT, POSITIONSTRINGS, SOUTH, SOUTH_EAST, SOUTH_WEST, UP_ARROW_SUBCOMPONENT, WEST
 
Fields inherited from interface junit.extensions.jfcunit.xml.JFCXMLConstants
ALT, ALTGR, AMOUNT, ASSERTEXIT, AWTTHREAD, BUTTON1, BUTTON2, BUTTON3, CASEINDEPENDENT, CLASS, CLICK, CLICKS, CODE, CONTAINER, CONTAINS, CTRL, DESTINATION, DOWN, DRAG, DURATION, EDITOR, ENDSWITH, EQUALS, FIND, FINDER, FLUSH, ICONDESCRIPTION, ICONFILE, INDEXDELIMITER, INDEXES, KEY, LABEL, MATCH, META, MODIFIERS, NODEVALUE, OPERATION, PATH, PATHDELIMITER, PAUSE, POINT, POPUPTRIGGER, POSITION, RECORDING, REFERENCE, RESUME, ROBOT, ROTATION, SHIFT, SHOW, SLEEP, SLEEPTIME, SOURCE, STARTSWITH, STRING, SUBCOMPONENT, TERMINATOR, TITLE, UP, WAIT
 
Fields inherited from interface junit.extensions.xml.XMLConstants
ACTION, ACTUALOBJ, ACTUALREFID, ADD, ASSERTENABLED, ASSERTEQUALS, ASSERTNOTEQUALS, ASSERTNOTNULL, ASSERTNOTSAME, ASSERTNULL, ASSERTSAME, CALL, CASE, CHOOSE, CLASSNAME, COLUMN, CONFIRM, DEBUG, DEFAULT, DELIMITER, DIALOG, DUMP, ECHO, ENABLED, ENCODING, EVALUATE, EXPECTEDOBJ, EXPECTEDREFID, FAIL, FILE, FOCUS, FOREACH, ID, INDEX, JFCFILELOC, LESSTHAN, LISTITEM, LOG, MARK, MESSAGE, METHOD, MODE, NAME, OTHERWISE, PATHREFID, PROCEDURE, PROPERTY, RECURSIVE, REFID, RELATIVE, REMOVE, ROW, SAVE, STDERR, STDOUT, STOPWATCH, SUITE, SWITCH, TABLECELL, TAGHANDLERS, TAGNAME, TEST, TYPE, USERE, VALUE, WHEN, WHILE
 
Constructor Summary
JTreeMouseEventDataTagHandler(org.w3c.dom.Element element, IXMLTestCase testCase)
          Constructor for JTreeMouseEventDataTagHandler.
 
Method Summary
private  java.lang.String getNodeValue()
          Returns the value of the NODEVALUE attribute for this element.
private  java.lang.String getPathRefid()
          Get the reference id for the path data.
 void processElement()
          This method is used to process the xml Element (i.e.
 void validateElement()
          Sub-classes should implement this method to provide validation of the element attributes, etc.
 
Methods inherited from class junit.extensions.jfcunit.eventdata.BaseEventDataTagHandler
getClicks, getComponent, getEventData, getJFCTestCase, getModifiers, getModifiers, getOffset, getPopupTrigger, getPosition, getReference, getSleepTime, setEventData
 
Methods inherited from class junit.extensions.xml.elements.AbstractTagHandler
checkAtLeastOneRequiredAttribute, checkAtLeastOneRequiredAttribute, checkElementTagName, checkOneRequiredAttribute, checkOneRequiredAttribute, checkRequiredAttribute, checkRequiredAttribute, getBoolean, getBoolean, getBoolean, getBoolean, getElement, getInt, getInt, getLong, getLong, getPoint, getPoint, getString, getString, getString, getString, getTagName, getTest, getTestCase, getXMLTestCase, getXMLTestSuite, resolveVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTreeMouseEventDataTagHandler

public JTreeMouseEventDataTagHandler(org.w3c.dom.Element element,
                                     IXMLTestCase testCase)
Constructor for JTreeMouseEventDataTagHandler.

Parameters:
element - The element to be processed
testCase - The IXMLTestCase that uses this element
Method Detail

processElement

public void processElement()
                    throws XMLException
Description copied from class: AbstractTagHandler
This method is used to process the xml Element (i.e. parsing and setting the attributes on XYZ objects from those parsed values.

Specified by:
processElement in class AbstractTagHandler
Throws:
XMLException - Some kind of Exception might be thrown.
See Also:
AbstractTagHandler.processElement()

validateElement

public void validateElement()
                     throws XMLException
Description copied from class: AbstractTagHandler
Sub-classes should implement this method to provide validation of the element attributes, etc.

Overrides:
validateElement in class BaseEventDataTagHandler
Throws:
XMLException - when the required elements are not present.
See Also:
AbstractTagHandler.validateElement()

getNodeValue

private java.lang.String getNodeValue()
Returns the value of the NODEVALUE attribute for this element.

Returns:
int The value of the NODEVALUE attribute.

getPathRefid

private java.lang.String getPathRefid()
Get the reference id for the path data.

Returns:
String reference id.


Licensed under: GNU Lesser General Public License, Ver 2.1, February 1999