|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.web.test; import org.netbeans.jellytools.NbDialogOperator; import org.netbeans.jellytools.Bundle; import org.netbeans.jemmy.operators.JButtonOperator; import org.netbeans.jemmy.operators.JTreeOperator; import javax.swing.JDialog; /** Enable to manipulate "Extra Files" dialog */ public class ExtraFilesDialogOperator extends NbDialogOperator { private JButtonOperator _btAdd; private JButtonOperator _btRemove; private JButtonOperator _btRemoveAll; JTreeOperator _sourceTree; /** Generic constructor * @param dialog instance of NbDialog */ public ExtraFilesDialogOperator(JDialog dialog) { super(dialog); } /** Creates a new instance of WizardOperator. * It waits for a dialog with given title. * @param title title of a wizard window */ public ExtraFilesDialogOperator(String title) { super(title); } /** Returns operator of "Add >" button. * @return JButtonOperator instance of "Add >" button */ public JButtonOperator btAdd() { if (_btAdd == null) { String addCaption = Bundle.getString("org.netbeans.modules.jarpackager.Bundle", "CTL_AddButton"); _btAdd = new JButtonOperator(this, addCaption); } return _btAdd; } /** Returns operator of "Remove <" button. * @return JButtonOperator instance of "< Remove" button */ public JButtonOperator btRemove() { if (_btRemove == null) { String removeCaption = Bundle.getString("org.netbeans.modules.jarpackager.Bundle", "CTL_RemoveButton"); _btRemove = new JButtonOperator(this, removeCaption); } return _btRemove; } /** Returns operator of "Remove All <<" button. * @return JButtonOperator instance of "Remove All <<" button */ public JButtonOperator btRemoveAll() { if (_btRemoveAll == null) { String removeCaption = Bundle.getString("org.netbeans.modules.jarpackager.Bundle", "CTL_ClearButton"); _btRemoveAll = new JButtonOperator(this, removeCaption); } return _btRemoveAll; } public JTreeOperator sourceTree() { if (_sourceTree == null) { _sourceTree = new JTreeOperator(this); } return _sourceTree; } public void selectItem(String treePath) { sourceTree().selectPath(sourceTree().findPath(treePath, "|")); } /** Pushes "Add >" button. */ public void add() { btAdd().push(); } /** Pushes "Remove <" button. */ public void remove() { btRemove().push(); } /** Pushes "Remove All <<" button. */ public void removeAll() { btRemoveAll().push(); } /** Performs verification by accessing all sub-components */ public void verify() { btAdd(); btRemove(); btRemoveAll(); btOK(); btCancel(); btHelp(); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.