|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.AbstractButtonOperator
public class AbstractButtonOperator
Timeouts used:
AbstractButtonOperator.PushButtonTimeout - time between button pressing and releasing
ComponentOperator.WaitComponentTimeout - time to wait button displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait button enabled
ComponentOperator.WaitStateTimeout - time to wait for text
.
Timeouts
Nested Class Summary | |
---|---|
static class |
AbstractButtonOperator.AbstractButtonByLabelFinder
Allows to find component by text. |
static class |
AbstractButtonOperator.AbstractButtonFinder
Checks component type. |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator |
---|
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator |
---|
ContainerOperator.ContainerFinder |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator |
---|
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator |
Field Summary | |
---|---|
static java.lang.String |
IS_SELECTED_DPROP
Identifier for a selected text property. |
static java.lang.String |
TEXT_DPROP
Identifier for a text property. |
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator |
---|
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP |
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator |
---|
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP |
Fields inherited from class org.netbeans.jemmy.operators.Operator |
---|
CLASS_DPROP, TO_STRING_DPROP |
Constructor Summary | |
---|---|
AbstractButtonOperator(javax.swing.AbstractButton b)
Constructor. |
|
AbstractButtonOperator(ContainerOperator cont)
Constructor. |
|
AbstractButtonOperator(ContainerOperator cont,
ComponentChooser chooser)
Constructs an AbstractButtonOperator object. |
|
AbstractButtonOperator(ContainerOperator cont,
ComponentChooser chooser,
int index)
Constructs an AbstractButtonOperator object. |
|
AbstractButtonOperator(ContainerOperator cont,
int index)
Constructor. |
|
AbstractButtonOperator(ContainerOperator cont,
java.lang.String text)
Constructor. |
|
AbstractButtonOperator(ContainerOperator cont,
java.lang.String text,
int index)
Constructor. |
Method Summary | |
---|---|
void |
addActionListener(java.awt.event.ActionListener actionListener)
Maps AbstractButton.addActionListener(ActionListener) through queue |
void |
addChangeListener(javax.swing.event.ChangeListener changeListener)
Maps AbstractButton.addChangeListener(ChangeListener) through queue |
void |
addItemListener(java.awt.event.ItemListener itemListener)
Maps AbstractButton.addItemListener(ItemListener) through queue |
void |
changeSelection(boolean selected)
Changes selection if necessary. |
void |
changeSelectionNoBlock(boolean selected)
Runs changeSelection(boolean) method in a separate thread. |
void |
copyEnvironment(Operator anotherOperator)
Copies all environment (output, timeouts, visualizer) from another operator. |
void |
doClick()
Maps AbstractButton.doClick() through queue |
void |
doClick(int i)
Maps AbstractButton.doClick(int) through queue |
static javax.swing.AbstractButton |
findAbstractButton(java.awt.Container cont,
ComponentChooser chooser)
Searches for the first AbstractButton in a container. |
static javax.swing.AbstractButton |
findAbstractButton(java.awt.Container cont,
ComponentChooser chooser,
int index)
Searches AbstractButton in a container. |
static javax.swing.AbstractButton |
findAbstractButton(java.awt.Container cont,
java.lang.String text,
boolean ce,
boolean ccs)
Searches AbstractButton by text. |
static javax.swing.AbstractButton |
findAbstractButton(java.awt.Container cont,
java.lang.String text,
boolean ce,
boolean ccs,
int index)
Searches AbstractButton by text. |
java.lang.String |
getActionCommand()
Maps AbstractButton.getActionCommand() through queue |
javax.swing.Icon |
getDisabledIcon()
Maps AbstractButton.getDisabledIcon() through queue |
javax.swing.Icon |
getDisabledSelectedIcon()
Maps AbstractButton.getDisabledSelectedIcon() through queue |
java.util.Hashtable |
getDump()
Returns information about component. |
int |
getHorizontalAlignment()
Maps AbstractButton.getHorizontalAlignment() through queue |
int |
getHorizontalTextPosition()
Maps AbstractButton.getHorizontalTextPosition() through queue |
javax.swing.Icon |
getIcon()
Maps AbstractButton.getIcon() through queue |
java.awt.Insets |
getMargin()
Maps AbstractButton.getMargin() through queue |
int |
getMnemonic()
Maps AbstractButton.getMnemonic() through queue |
javax.swing.ButtonModel |
getModel()
Maps AbstractButton.getModel() through queue |
TestOut |
getOutput()
Returns print output streams or writers. |
javax.swing.Icon |
getPressedIcon()
Maps AbstractButton.getPressedIcon() through queue |
javax.swing.Icon |
getRolloverIcon()
Maps AbstractButton.getRolloverIcon() through queue |
javax.swing.Icon |
getRolloverSelectedIcon()
Maps AbstractButton.getRolloverSelectedIcon() through queue |
javax.swing.Icon |
getSelectedIcon()
Maps AbstractButton.getSelectedIcon() through queue |
java.lang.Object[] |
getSelectedObjects()
Maps AbstractButton.getSelectedObjects() through queue |
java.lang.String |
getText()
Maps AbstractButton.getText() through queue |
Timeouts |
getTimeouts()
Return current timeouts. |
javax.swing.plaf.ButtonUI |
getUI()
Maps AbstractButton.getUI() through queue |
int |
getVerticalAlignment()
Maps AbstractButton.getVerticalAlignment() through queue |
int |
getVerticalTextPosition()
Maps AbstractButton.getVerticalTextPosition() through queue |
boolean |
isBorderPainted()
Maps AbstractButton.isBorderPainted() through queue |
boolean |
isContentAreaFilled()
Maps AbstractButton.isContentAreaFilled() through queue |
boolean |
isFocusPainted()
Maps AbstractButton.isFocusPainted() through queue |
boolean |
isRolloverEnabled()
Maps AbstractButton.isRolloverEnabled() through queue |
boolean |
isSelected()
Maps AbstractButton.isSelected() through queue |
void |
press()
Press the button by mouse. |
void |
push()
Pushs the button using a ButtonDriver registered for this operator. |
void |
pushNoBlock()
Runs push() method in a separate thread. |
void |
release()
Releases the button by mouse. |
void |
removeActionListener(java.awt.event.ActionListener actionListener)
Maps AbstractButton.removeActionListener(ActionListener) through queue |
void |
removeChangeListener(javax.swing.event.ChangeListener changeListener)
Maps AbstractButton.removeChangeListener(ChangeListener) through queue |
void |
removeItemListener(java.awt.event.ItemListener itemListener)
Maps AbstractButton.removeItemListener(ItemListener) through queue |
void |
setActionCommand(java.lang.String string)
Maps AbstractButton.setActionCommand(String) through queue |
void |
setBorderPainted(boolean b)
Maps AbstractButton.setBorderPainted(boolean) through queue |
void |
setContentAreaFilled(boolean b)
Maps AbstractButton.setContentAreaFilled(boolean) through queue |
void |
setDisabledIcon(javax.swing.Icon icon)
Maps AbstractButton.setDisabledIcon(Icon) through queue |
void |
setDisabledSelectedIcon(javax.swing.Icon icon)
Maps AbstractButton.setDisabledSelectedIcon(Icon) through queue |
void |
setFocusPainted(boolean b)
Maps AbstractButton.setFocusPainted(boolean) through queue |
void |
setHorizontalAlignment(int i)
Maps AbstractButton.setHorizontalAlignment(int) through queue |
void |
setHorizontalTextPosition(int i)
Maps AbstractButton.setHorizontalTextPosition(int) through queue |
void |
setIcon(javax.swing.Icon icon)
Maps AbstractButton.setIcon(Icon) through queue |
void |
setMargin(java.awt.Insets insets)
Maps AbstractButton.setMargin(Insets) through queue |
void |
setMnemonic(char c)
Maps AbstractButton.setMnemonic(char) through queue |
void |
setMnemonic(int i)
Maps AbstractButton.setMnemonic(int) through queue |
void |
setModel(javax.swing.ButtonModel buttonModel)
Maps AbstractButton.setModel(ButtonModel) through queue |
void |
setOutput(TestOut out)
Defines print output streams or writers. |
void |
setPressedIcon(javax.swing.Icon icon)
Maps AbstractButton.setPressedIcon(Icon) through queue |
void |
setRolloverEnabled(boolean b)
Maps AbstractButton.setRolloverEnabled(boolean) through queue |
void |
setRolloverIcon(javax.swing.Icon icon)
Maps AbstractButton.setRolloverIcon(Icon) through queue |
void |
setRolloverSelectedIcon(javax.swing.Icon icon)
Maps AbstractButton.setRolloverSelectedIcon(Icon) through queue |
void |
setSelected(boolean b)
Maps AbstractButton.setSelected(boolean) through queue |
void |
setSelectedIcon(javax.swing.Icon icon)
Maps AbstractButton.setSelectedIcon(Icon) through queue |
void |
setText(java.lang.String string)
Maps AbstractButton.setText(String) through queue |
void |
setTimeouts(Timeouts timeouts)
Defines current timeouts. |
void |
setUI(javax.swing.plaf.ButtonUI buttonUI)
Maps AbstractButton.setUI(ButtonUI) through queue |
void |
setVerticalAlignment(int i)
Maps AbstractButton.setVerticalAlignment(int) through queue |
void |
setVerticalTextPosition(int i)
Maps AbstractButton.setVerticalTextPosition(int) through queue |
static javax.swing.AbstractButton |
waitAbstractButton(java.awt.Container cont,
ComponentChooser chooser)
Waits 0'th AbstractButton in container. |
static javax.swing.AbstractButton |
waitAbstractButton(java.awt.Container cont,
ComponentChooser chooser,
int index)
Waits AbstractButton in container. |
static javax.swing.AbstractButton |
waitAbstractButton(java.awt.Container cont,
java.lang.String text,
boolean ce,
boolean ccs)
Waits AbstractButton by text. |
static javax.swing.AbstractButton |
waitAbstractButton(java.awt.Container cont,
java.lang.String text,
boolean ce,
boolean ccs,
int index)
Waits AbstractButton by text. |
void |
waitSelected(boolean selected)
Waits for button to be selected. |
void |
waitText(java.lang.String text)
Waits for text. |
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator |
---|
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEXT_DPROP
getDump()
,
Constant Field Valuespublic static final java.lang.String IS_SELECTED_DPROP
getDump()
,
Constant Field ValuesConstructor Detail |
---|
public AbstractButtonOperator(javax.swing.AbstractButton b)
b
- The java.awt.AbstractButton
managed by
this instance.public AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser, int index)
cont
- containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.public AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser)
cont
- containerchooser
- a component chooser specifying searching criteria.public AbstractButtonOperator(ContainerOperator cont, java.lang.String text, int index)
index+1
'th
javax.swing.AbstractButton
that shows, lies below
the container in the display containment hierarchy,
and that has the desired text. Uses cont's timeout and output
for waiting and to init this operator.
cont
- The operator for a container containing the sought for button.text
- Button text.index
- Ordinal component index. The first component has index
0.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public AbstractButtonOperator(ContainerOperator cont, java.lang.String text)
javax.swing.AbstractButton
that shows, lies below
the container in the display containment hierarchy,
and that has the desired text. Uses cont's timeout and output
for waiting and to init this operator.
cont
- The operator for a container containing the sought for button.text
- Button text.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public AbstractButtonOperator(ContainerOperator cont, int index)
cont
- The operator for a container containing the sought for button.index
- Ordinal component index.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public AbstractButtonOperator(ContainerOperator cont)
cont
- The operator for a container containing the sought for button.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
Method Detail |
---|
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
cont
- Container in which to search for the component. The container
lies above the component in the display containment hierarchy. The containment
need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and
applying search criteria.index
- Ordinal component index. The first index
is 0.
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, ComponentChooser chooser)
cont
- Container in which to search for the component. The container
lies above the component in the display containment hierarchy. The containment
need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and
applying search criteria.
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.
Operator.isCaptionEqual(String, String, boolean, boolean)
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.
Operator.isCaptionEqual(String, String, boolean, boolean)
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.
TimeoutExpiredException
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, ComponentChooser chooser)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.
TimeoutExpiredException
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.
TimeoutExpiredException
Operator.isCaptionEqual(String, String, boolean, boolean)
public void setTimeouts(Timeouts timeouts)
Timeoutable
setTimeouts
in interface Timeoutable
setTimeouts
in class JComponentOperator
timeouts
- A collection of timeout assignments.Timeoutable.getTimeouts()
public Timeouts getTimeouts()
Timeoutable
getTimeouts
in interface Timeoutable
getTimeouts
in class JComponentOperator
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
public void setOutput(TestOut out)
Outputable
setOutput
in interface Outputable
setOutput
in class JComponentOperator
out
- Identify the streams or writers used for print output.Outputable.getOutput()
public TestOut getOutput()
Outputable
getOutput
in interface Outputable
getOutput
in class JComponentOperator
Outputable.setOutput(org.netbeans.jemmy.TestOut)
public void copyEnvironment(Operator anotherOperator)
Operator
copyEnvironment
in class ComponentOperator
anotherOperator
- an operator to copy the environment to.public void push()
public void pushNoBlock()
push()
method in a separate thread.
public void changeSelection(boolean selected)
push()
method in order to do so.
selected
- a button selection.public void changeSelectionNoBlock(boolean selected)
changeSelection(boolean)
method in a separate thread.
selected
- a button selection.public void press()
TimeoutExpiredException
public void release()
TimeoutExpiredException
public void waitSelected(boolean selected)
selected
- a button selection.public void waitText(java.lang.String text)
text
- Text to wait for.public java.util.Hashtable getDump()
getDump
in class JComponentOperator
public void addActionListener(java.awt.event.ActionListener actionListener)
AbstractButton.addActionListener(ActionListener)
through queue
public void addChangeListener(javax.swing.event.ChangeListener changeListener)
AbstractButton.addChangeListener(ChangeListener)
through queue
public void addItemListener(java.awt.event.ItemListener itemListener)
AbstractButton.addItemListener(ItemListener)
through queue
public void doClick()
AbstractButton.doClick()
through queue
public void doClick(int i)
AbstractButton.doClick(int)
through queue
public java.lang.String getActionCommand()
AbstractButton.getActionCommand()
through queue
public javax.swing.Icon getDisabledIcon()
AbstractButton.getDisabledIcon()
through queue
public javax.swing.Icon getDisabledSelectedIcon()
AbstractButton.getDisabledSelectedIcon()
through queue
public int getHorizontalAlignment()
AbstractButton.getHorizontalAlignment()
through queue
public int getHorizontalTextPosition()
AbstractButton.getHorizontalTextPosition()
through queue
public javax.swing.Icon getIcon()
AbstractButton.getIcon()
through queue
public java.awt.Insets getMargin()
AbstractButton.getMargin()
through queue
public int getMnemonic()
AbstractButton.getMnemonic()
through queue
public javax.swing.ButtonModel getModel()
AbstractButton.getModel()
through queue
public javax.swing.Icon getPressedIcon()
AbstractButton.getPressedIcon()
through queue
public javax.swing.Icon getRolloverIcon()
AbstractButton.getRolloverIcon()
through queue
public javax.swing.Icon getRolloverSelectedIcon()
AbstractButton.getRolloverSelectedIcon()
through queue
public javax.swing.Icon getSelectedIcon()
AbstractButton.getSelectedIcon()
through queue
public java.lang.Object[] getSelectedObjects()
AbstractButton.getSelectedObjects()
through queue
public java.lang.String getText()
AbstractButton.getText()
through queue
public javax.swing.plaf.ButtonUI getUI()
AbstractButton.getUI()
through queue
public int getVerticalAlignment()
AbstractButton.getVerticalAlignment()
through queue
public int getVerticalTextPosition()
AbstractButton.getVerticalTextPosition()
through queue
public boolean isBorderPainted()
AbstractButton.isBorderPainted()
through queue
public boolean isContentAreaFilled()
AbstractButton.isContentAreaFilled()
through queue
public boolean isFocusPainted()
AbstractButton.isFocusPainted()
through queue
public boolean isRolloverEnabled()
AbstractButton.isRolloverEnabled()
through queue
public boolean isSelected()
AbstractButton.isSelected()
through queue
public void removeActionListener(java.awt.event.ActionListener actionListener)
AbstractButton.removeActionListener(ActionListener)
through queue
public void removeChangeListener(javax.swing.event.ChangeListener changeListener)
AbstractButton.removeChangeListener(ChangeListener)
through queue
public void removeItemListener(java.awt.event.ItemListener itemListener)
AbstractButton.removeItemListener(ItemListener)
through queue
public void setActionCommand(java.lang.String string)
AbstractButton.setActionCommand(String)
through queue
public void setBorderPainted(boolean b)
AbstractButton.setBorderPainted(boolean)
through queue
public void setContentAreaFilled(boolean b)
AbstractButton.setContentAreaFilled(boolean)
through queue
public void setDisabledIcon(javax.swing.Icon icon)
AbstractButton.setDisabledIcon(Icon)
through queue
public void setDisabledSelectedIcon(javax.swing.Icon icon)
AbstractButton.setDisabledSelectedIcon(Icon)
through queue
public void setFocusPainted(boolean b)
AbstractButton.setFocusPainted(boolean)
through queue
public void setHorizontalAlignment(int i)
AbstractButton.setHorizontalAlignment(int)
through queue
public void setHorizontalTextPosition(int i)
AbstractButton.setHorizontalTextPosition(int)
through queue
public void setIcon(javax.swing.Icon icon)
AbstractButton.setIcon(Icon)
through queue
public void setMargin(java.awt.Insets insets)
AbstractButton.setMargin(Insets)
through queue
public void setMnemonic(char c)
AbstractButton.setMnemonic(char)
through queue
public void setMnemonic(int i)
AbstractButton.setMnemonic(int)
through queue
public void setModel(javax.swing.ButtonModel buttonModel)
AbstractButton.setModel(ButtonModel)
through queue
public void setPressedIcon(javax.swing.Icon icon)
AbstractButton.setPressedIcon(Icon)
through queue
public void setRolloverEnabled(boolean b)
AbstractButton.setRolloverEnabled(boolean)
through queue
public void setRolloverIcon(javax.swing.Icon icon)
AbstractButton.setRolloverIcon(Icon)
through queue
public void setRolloverSelectedIcon(javax.swing.Icon icon)
AbstractButton.setRolloverSelectedIcon(Icon)
through queue
public void setSelected(boolean b)
AbstractButton.setSelected(boolean)
through queue
public void setSelectedIcon(javax.swing.Icon icon)
AbstractButton.setSelectedIcon(Icon)
through queue
public void setText(java.lang.String string)
AbstractButton.setText(String)
through queue
public void setUI(javax.swing.plaf.ButtonUI buttonUI)
AbstractButton.setUI(ButtonUI)
through queue
public void setVerticalAlignment(int i)
AbstractButton.setVerticalAlignment(int)
through queue
public void setVerticalTextPosition(int i)
AbstractButton.setVerticalTextPosition(int)
through queue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |