org.netbeans.modules.jellytools.platform/3 3.13

org.netbeans.jellytools.properties
Class PropertySheetOperator

java.lang.Object
  extended by org.netbeans.jemmy.operators.Operator
      extended by org.netbeans.jemmy.operators.ComponentOperator
          extended by org.netbeans.jemmy.operators.ContainerOperator
              extended by org.netbeans.jemmy.operators.JComponentOperator
                  extended by org.netbeans.jellytools.TopComponentOperator
                      extended by org.netbeans.jellytools.properties.PropertySheetOperator
All Implemented Interfaces:
org.netbeans.jemmy.Outputable, org.netbeans.jemmy.Timeoutable

public class PropertySheetOperator
extends TopComponentOperator

Handles org.openide.explorer.propertysheet.PropertySheet which represents IDE property sheet TopComponent. It includes JTable with properties and optional description area. Use Property class or its descendants to work with properties.

Usage:

        PropertySheetOperator pso = new PropertySheetOperator("Properties of MyClass");
        new Property(pso, "Arguments").setValue("arg1 arg2");
        pso.sortByName();
        System.out.println("Number of properties="+pso.tblSheet().getRowCount());
        pso.sortByCategory();
 

See Also:
Property, PropertiesAction, SortByCategoryAction, SortByNameAction, ShowDescriptionAreaAction, HelpAction

Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.JComponentOperator.JComponentByTipFinder, org.netbeans.jemmy.operators.JComponentOperator.JComponentFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.ContainerOperator.ContainerFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.Operator.ComponentVisualizer, org.netbeans.jemmy.operators.Operator.DefaultPathParser, org.netbeans.jemmy.operators.Operator.DefaultStringComparator, org.netbeans.jemmy.operators.Operator.Finder, org.netbeans.jemmy.operators.Operator.MapAction, org.netbeans.jemmy.operators.Operator.MapBooleanAction, org.netbeans.jemmy.operators.Operator.MapByteAction, org.netbeans.jemmy.operators.Operator.MapCharacterAction, org.netbeans.jemmy.operators.Operator.MapDoubleAction, org.netbeans.jemmy.operators.Operator.MapFloatAction, org.netbeans.jemmy.operators.Operator.MapIntegerAction, org.netbeans.jemmy.operators.Operator.MapLongAction, org.netbeans.jemmy.operators.Operator.MapVoidAction, org.netbeans.jemmy.operators.Operator.NoBlockingAction, org.netbeans.jemmy.operators.Operator.PathParser, org.netbeans.jemmy.operators.Operator.StringComparator
 
Field Summary
static int MODE_NO_PROPERTIES
          "No Properties" property sheet.
static int MODE_PROPERTIES_OF_MULTIPLE_OBJECTS
          "Properties of Multiple Objects" property sheet.
static int MODE_PROPERTIES_OF_ONE_OBJECT
          "Properties of" property sheet.
 
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
PropertySheetOperator()
          Waits for property sheet anywhere in IDE.
PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper)
          Waits for property sheet in specified ContainerOperator.
PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper, int index)
          Waits for index-th property sheet in specified ContainerOperator.
PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper, String sheetName)
          Waits for property sheet with given name in specified container.
PropertySheetOperator(int mode)
          Waits for property sheet with name according to given mode ("No Properties", "Properties of" or "Properties of Multiple Objects").
PropertySheetOperator(int mode, String objectName)
          Waits for property sheet with name according to given mode ("No Properties", "Properties of" or "Properties of Multiple Objects") plus objectName in case of one object property sheet.
PropertySheetOperator(JComponent sheet)
          Generic constructor
PropertySheetOperator(String sheetName)
          Waits for property sheet with given name.
 
Method Summary
 org.netbeans.jemmy.operators.JButtonOperator btHelp()
          Returns JButtonOperator representing help button of description area.
 void clickForPopup()
          Dispatch mouse event directly in org.openide.explorer.propertysheet.PSheet to make it more reliable.
 void close()
          Closes this property sheet and waits until it is not closed.
 String getDescription()
          Gest description from description area.
 String getDescriptionHeader()
          Gets text of header from description area.
 void help()
          Shows help by calling popup menu on property sheet.
static PropertySheetOperator invoke()
          Invokes properties by default action on currently selected object.
 org.netbeans.jemmy.operators.JLabelOperator lblDescriptionHeader()
          Returns JLabelOperator representing header of description area.
 void showDescriptionArea()
          Shows or hides description area depending on whether it is already shown or not.
 void sortByCategory()
          Sorts properties by category by calling of popup menu on property sheet.
 void sortByName()
          Sorts properties by name by calling of popup menu on property sheet.
 org.netbeans.jemmy.operators.JTableOperator tblSheet()
          Returns JTableOperator representing SheetTable of this property sheet.
 org.netbeans.jemmy.operators.JEditorPaneOperator txtDescription()
          Returns JTextAreaOperator representing text from description area.
 void verify()
          Performs verification by accessing all sub-components
 
Methods inherited from class org.netbeans.jellytools.TopComponentOperator
attachTo, attachTo, cloneDocument, closeAllDocuments, closeDiscard, closeWindow, findParentTopComponent, findTabbedAdapter, findTabDisplayer, findTopComponent, findTopComponent, isModified, isOpened, makeComponentVisible, maximize, pushMenuOnTab, restore, save, setUnmodified, waitClosed, waitTopComponent, waitTopComponent
 
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDump, getInsets, getNextFocusableComponent, getOutput, getRegisteredKeyStrokes, getRootPane, getTimeouts, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setOutput, setPreferredSize, setRequestFocusEnabled, setTimeouts, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
 
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 org.netbeans.jemmy.operators.ComponentOperator
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, copyEnvironment, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterY, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
 
Methods inherited from class org.netbeans.jemmy.operators.Operator
addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_NO_PROPERTIES

public static final int MODE_NO_PROPERTIES
"No Properties" property sheet.

See Also:
Constant Field Values

MODE_PROPERTIES_OF_ONE_OBJECT

public static final int MODE_PROPERTIES_OF_ONE_OBJECT
"Properties of" property sheet.

See Also:
Constant Field Values

MODE_PROPERTIES_OF_MULTIPLE_OBJECTS

public static final int MODE_PROPERTIES_OF_MULTIPLE_OBJECTS
"Properties of Multiple Objects" property sheet.

See Also:
Constant Field Values
Constructor Detail

PropertySheetOperator

public PropertySheetOperator(JComponent sheet)
Generic constructor

Parameters:
sheet - instance of PropertySheet

PropertySheetOperator

public PropertySheetOperator()
Waits for property sheet anywhere in IDE.


PropertySheetOperator

public PropertySheetOperator(int mode)
Waits for property sheet with name according to given mode ("No Properties", "Properties of" or "Properties of Multiple Objects").

Parameters:
mode - type of shown properties
See Also:
MODE_NO_PROPERTIES, MODE_PROPERTIES_OF_ONE_OBJECT, MODE_PROPERTIES_OF_MULTIPLE_OBJECTS

PropertySheetOperator

public PropertySheetOperator(int mode,
                             String objectName)
Waits for property sheet with name according to given mode ("No Properties", "Properties of" or "Properties of Multiple Objects") plus objectName in case of one object property sheet. In case of usage new PropertySheetOperator(PropertySheetOperator.MODE_PROPERTIES_OF_ONE_OBJECT, "MyClass"); will be searched property sheet with name "Properties of MyClass" (on English locale).

Parameters:
mode - type of shown properties
objectName - name of object for that properties are shown (e.g. "MyClass")
See Also:
MODE_NO_PROPERTIES, MODE_PROPERTIES_OF_ONE_OBJECT, MODE_PROPERTIES_OF_MULTIPLE_OBJECTS

PropertySheetOperator

public PropertySheetOperator(String sheetName)
Waits for property sheet with given name. Typically sheet name is used as window title.

Parameters:
sheetName - name of sheet to find (e.g. "Properties of MyClass")

PropertySheetOperator

public PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper,
                             String sheetName)
Waits for property sheet with given name in specified container.

Parameters:
contOper - where to find
sheetName - name of sheet to find (e.g. "Properties of MyClass")

PropertySheetOperator

public PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper)
Waits for property sheet in specified ContainerOperator. It is for example PropertySheet in Options window.

Parameters:
contOper - where to find

PropertySheetOperator

public PropertySheetOperator(org.netbeans.jemmy.operators.ContainerOperator contOper,
                             int index)
Waits for index-th property sheet in specified ContainerOperator.

Parameters:
contOper - where to find
index - int index
Method Detail

invoke

public static PropertySheetOperator invoke()
Invokes properties by default action on currently selected object.

Returns:
instance of PropertySheetOperator
See Also:
PropertiesAction

tblSheet

public org.netbeans.jemmy.operators.JTableOperator tblSheet()
Returns JTableOperator representing SheetTable of this property sheet.

Returns:
instance of JTableOperator

lblDescriptionHeader

public org.netbeans.jemmy.operators.JLabelOperator lblDescriptionHeader()
Returns JLabelOperator representing header of description area.

Returns:
instance of JLabelOperator

txtDescription

public org.netbeans.jemmy.operators.JEditorPaneOperator txtDescription()
Returns JTextAreaOperator representing text from description area.

Returns:
instance of JTextAreaOperator

btHelp

public org.netbeans.jemmy.operators.JButtonOperator btHelp()
Returns JButtonOperator representing help button of description area.

Returns:
instance of JButtonOperator

getDescriptionHeader

public String getDescriptionHeader()
Gets text of header from description area.

Returns:
text of header from description area

getDescription

public String getDescription()
Gest description from description area.

Returns:
description from description area.

sortByName

public void sortByName()
Sorts properties by name by calling of popup menu on property sheet.


sortByCategory

public void sortByCategory()
Sorts properties by category by calling of popup menu on property sheet.


showDescriptionArea

public void showDescriptionArea()
Shows or hides description area depending on whether it is already shown or not. It just invokes Show description area popup menu item.


help

public void help()
Shows help by calling popup menu on property sheet.


verify

public void verify()
Performs verification by accessing all sub-components


close

public void close()
Closes this property sheet and waits until it is not closed. In fact it closes container in which this property sheet is placed. It can be a TopComponent in the main window or in a separate frame, or a dialog.

Overrides:
close in class TopComponentOperator

clickForPopup

public void clickForPopup()
Dispatch mouse event directly in org.openide.explorer.propertysheet.PSheet to make it more reliable.

Overrides:
clickForPopup in class org.netbeans.jemmy.operators.ComponentOperator

org.netbeans.modules.jellytools.platform/3 3.13

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.