com.appperfect.devcommon.script.javaelement
Interface SwingToggleButton

All Superinterfaces:
AwtComponent, AwtContainer, IScript, JavaComponent, SwingComponent

public interface SwingToggleButton
extends SwingComponent

SwingToggleButton is created to represent javax.swing.JToggleButton component

The following code fragment illustrates how to create an SwingToggleButton element.

 var element = engine.createSwingToggleButton(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 boolean isSelected()
 Checks if the button is selected.
 boolean setPressed(boolean pressed)
 Sets the pressed state of the toggle button.
 boolean setSelected(boolean selected)
 Sets the selected state of the button.
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

isSelected

boolean isSelected()
Checks if the button is selected.

Returns:
selected state of toggle button

setPressed

boolean setPressed(boolean pressed)
Sets the pressed state of the toggle button.

Parameters:
pressed - true or false
Returns:
true if event was executed successfully, returns false if there is any failure during execution

setSelected

boolean setSelected(boolean selected)
Sets the selected state of the button.

Parameters:
selected - true selects the toggle button, false deselects the toggle button.
Returns:
true if event was executed successfully, returns false if there is any failure during execution


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.