|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.extensions.jfcunit.eventdata.AbstractEventData junit.extensions.jfcunit.eventdata.AbstractMouseEventData junit.extensions.jfcunit.eventdata.JTabbedPaneMouseEventData
Data container class that holds all the data necessary for jfcUnit to fire mouse events. This class is specific to events on a JTabbedPane.
Field Summary | |
static boolean |
DEFAULT_ISPOPUPTRIGGER
Default value specifying whether the mouse event being fired would trigger a popup or not. |
static java.lang.String |
DEFAULT_TITLE
Default value for the tab title. |
private int |
m_tabIndex
The zero-based tab index of the specific tab on which to trigger the event. |
private javax.swing.JTabbedPane |
m_tabPane
The JTabbedPane on which to trigger the event. |
private java.lang.String |
m_title
The title of the specific tab on which to trigger the event. |
Fields inherited from class junit.extensions.jfcunit.eventdata.AbstractMouseEventData |
|
Fields inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
|
Fields inherited from interface junit.extensions.jfcunit.eventdata.EventDataConstants |
CENTER, CUSTOM, DEFAULT_HOLDTIME, 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 |
Constructor Summary | |
JTabbedPaneMouseEventData()
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
int numberOfClicks)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
int numberOfClicks,
boolean isPopupTrigger)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
int numberOfClicks,
boolean isPopupTrigger,
long sleepTime)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
int numberOfClicks,
long sleepTime)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
boolean isPopupTrigger)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
boolean isPopupTrigger,
long sleepTime)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime,
int position)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime,
int position,
java.awt.Point referencePoint)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime,
java.awt.Point referencePoint)
Constructor. |
|
JTabbedPaneMouseEventData(JFCTestCase testCase,
javax.swing.JTabbedPane tabPane,
int tabIndex,
java.lang.String title,
int numberOfClicks,
long sleepTime)
Constructor. |
Method Summary | |
boolean |
canConsume(java.awt.AWTEvent ae)
Check if this event can consume the event given. |
boolean |
consume(java.awt.AWTEvent ae)
Consume the event. |
boolean |
equals(java.lang.Object o)
Compare to event datas and deterime if they are equal. |
java.awt.Component |
getComponent()
The component on which the event has to be fired. |
javax.swing.JTabbedPane |
getSource()
Get the attribute value. |
int |
getTabIndex()
Get the attribute value. |
java.lang.String |
getTitle()
Get the attribute value. |
int |
hashCode()
Get the hashCode of this object. |
void |
populate(org.w3c.dom.Element e)
Populate the XML Element with this object attributes. |
boolean |
prepareComponent()
Prepare the component to receive the event. |
void |
setSource(javax.swing.JTabbedPane tabPane)
Set the attribute value. |
void |
setTabIndex(int tabIndex)
Set the attribute value. |
void |
setTitle(java.lang.String title)
Set the attribute value. |
java.lang.String |
toString()
Get string description of event. |
Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractMouseEventData |
getDefaultModifiers, getDefaultModifiers, getDefaultNumberOfClicks, getDefaultPopupTrigger, getModifierText, getNumberOfClicks, getPopupTrigger, sameSource, setNumberOfClicks, setPopupTrigger |
Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
calculatePoint, getDefaultPosition, getDefaultSleepTime, getLocationOnScreen, getModifiers, getPosition, getReferencePoint, getRoot, getRoot, getSleepTime, getTestCase, isMetaChar, isValid, isValidForProcessing, setLocationOnScreen, setModifiers, setPosition, setReferencePoint, setSleepTime, setTestCase, setValid |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final boolean DEFAULT_ISPOPUPTRIGGER
public static final java.lang.String DEFAULT_TITLE
private javax.swing.JTabbedPane m_tabPane
private java.lang.String m_title
private int m_tabIndex
Constructor Detail |
public JTabbedPaneMouseEventData()
public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, int numberOfClicks)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, int numberOfClicks, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)sleepTime
- The wait time in ms between each event.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)sleepTime
- The wait time in ms between each event.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, int numberOfClicks, boolean isPopupTrigger)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)isPopupTrigger
- boolean specifying whether this event will show a popup.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, boolean isPopupTrigger)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)isPopupTrigger
- boolean specifying whether this event will show a popup.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, int numberOfClicks, boolean isPopupTrigger, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, boolean isPopupTrigger, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, int modifiers, boolean isPopupTrigger, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)modifiers
- The modifier key values that need to be passed onto the event.isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, int modifiers, boolean isPopupTrigger, long sleepTime, int position)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)modifiers
- The modifier key values that need to be passed onto the event.isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.position
- The relative mouse position within the cell.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, int modifiers, boolean isPopupTrigger, long sleepTime, java.awt.Point referencePoint)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)modifiers
- The modifier key values that need to be passed onto the event.isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.referencePoint
- The CUSTOM mouse position within the cell.public JTabbedPaneMouseEventData(JFCTestCase testCase, javax.swing.JTabbedPane tabPane, int tabIndex, java.lang.String title, int numberOfClicks, int modifiers, boolean isPopupTrigger, long sleepTime, int position, java.awt.Point referencePoint)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.tabPane
- The component on which to trigger the event.tabIndex
- The zero-based tab index of the specific tab on which to trigger the event.title
- The title of the specific tab on which to trigger the event.numberOfClicks
- Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)modifiers
- The modifier key values that need to be passed onto the event.isPopupTrigger
- boolean specifying whether this event will show a popup.sleepTime
- The wait time in ms between each event.position
- The relative mouse position within the cell.referencePoint
- If position is CUSTOM then the point is a offset from
the location of the component. If the position is PERCENT
then the location is a percentage offset of the hight and width.
Otherwise, the referencePoint is unused.
Note: Due to defect in the JRE fopr 1.2.2 and 1.3, the last
tab click placement will always be 10 pixels over in the center
of the height. The getCellRect in these levels of the JRE return a
bogus size for the last tab.Method Detail |
public final void setSource(javax.swing.JTabbedPane tabPane)
tabPane
- The new value of the attribute.public final javax.swing.JTabbedPane getSource()
public java.awt.Component getComponent()
getComponent
in class AbstractEventData
public final void setTabIndex(int tabIndex)
tabIndex
- The new value of the attribute.public final int getTabIndex()
public final void setTitle(java.lang.String title)
title
- The new value of the attribute.public final java.lang.String getTitle()
public boolean canConsume(java.awt.AWTEvent ae)
canConsume
in class AbstractMouseEventData
ae
- AWTEvent to be consumed.
public boolean consume(java.awt.AWTEvent ae)
consume
in class AbstractMouseEventData
ae
- AWTEvent to be consumed.
public boolean equals(java.lang.Object o)
equals
in class AbstractMouseEventData
o
- Object to be compared.
public int hashCode()
hashCode
in class AbstractMouseEventData
public void populate(org.w3c.dom.Element e)
populate
in class AbstractMouseEventData
e
- element to be populated.public boolean prepareComponent()
prepareComponent
in class AbstractEventData
public java.lang.String toString()
toString
in class AbstractMouseEventData
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |