|
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. */ /* * ErrorExpressionOperator.java * * Created on 12/18/02 4:04 PM */ package org.netbeans.jellytools.modules.java; import org.netbeans.jellytools.Bundle; import org.netbeans.jemmy.operators.*; /** Class implementing all necessary methods for handling "Error Expression" NbDialog. * * @author jb105785 * @version 1.0 */ public class ErrorExpressionOperator extends JDialogOperator { /** Creates new ErrorExpressionOperator that can handle it. */ public ErrorExpressionOperator() { super(Bundle.getString("org.netbeans.modules.java.settings.Bundle", "ERROREXPR_PROP")); } private JLabelOperator _lblPresetName; private JLabelOperator _lblErrorExpression; private JLabelOperator _lblFilePositionBackreference; private JLabelOperator _lblLinePositionBackreference; private JLabelOperator _lblColumnPositionBackreference; private JLabelOperator _lblMesssagePositionBackreference; private JLabelOperator _lblErrorDescriptions; private JTextFieldOperator _txtPresetName; private JTextFieldOperator _txtErrorExpression; private JTextFieldOperator _txtFilePositionBackreference; private JTextFieldOperator _txtLinePositionBackreference; private JTextFieldOperator _txtColumnPositionBackreference; private JTextFieldOperator _txtMesssagePositionBackreference; private JListOperator _lstErrorDescriptions; public static final String ITEM_IBMJIKESE = Bundle.getString("org.openide.compiler.Bundle", "CTL_Jikes"); public static final String ITEM_MICROSOFTJVC = Bundle.getString("org.openide.compiler.Bundle", "CTL_Microsoft"); public static final String ITEM_SUNJAVAC = Bundle.getString("org.openide.compiler.Bundle", "CTL_Sun"); private JButtonOperator _btAdd; private JButtonOperator _btChange; private JButtonOperator _btRemove; private JButtonOperator _btOK; private JButtonOperator _btCancel; private JButtonOperator _btHelp; //****************************** // Subcomponents definition part //****************************** /** Tries to find "Preset Name:" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblPresetName() { if (_lblPresetName==null) { _lblPresetName = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Preset_label")); } return _lblPresetName; } /** Tries to find "Error Expression:" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblErrorExpression() { if (_lblErrorExpression==null) { _lblErrorExpression = new JLabelOperator(this,Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Error_label")); } return _lblErrorExpression; } /** Tries to find "File Position (backreference #):" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblFilePositionBackreference() { if (_lblFilePositionBackreference==null) { _lblFilePositionBackreference = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_File_label")); } return _lblFilePositionBackreference; } /** Tries to find "Line Position (backreference #):" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblLinePositionBackreference() { if (_lblLinePositionBackreference==null) { _lblLinePositionBackreference = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Line_label")); } return _lblLinePositionBackreference; } /** Tries to find "Column Position (backreference #):" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblColumnPositionBackreference() { if (_lblColumnPositionBackreference==null) { _lblColumnPositionBackreference = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Column_label")); } return _lblColumnPositionBackreference; } /** Tries to find "Messsage Position (backreference #):" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblMesssagePositionBackreference() { if (_lblMesssagePositionBackreference==null) { _lblMesssagePositionBackreference = new JLabelOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Description_label")); } return _lblMesssagePositionBackreference; } /** Tries to find "Error Descriptions" JLabel in this dialog. * @return JLabelOperator */ public JLabelOperator lblErrorDescriptions() { if (_lblErrorDescriptions==null) { _lblErrorDescriptions = new JLabelOperator(this, Bundle.getString("org.openide.explorer.propertysheet.editors.Bundle", "CTL_Descriptions")); } return _lblErrorDescriptions; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtPresetName() { if (_txtPresetName==null) { _txtPresetName = new JTextFieldOperator(this); } return _txtPresetName; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtErrorExpression() { if (_txtErrorExpression==null) { _txtErrorExpression = new JTextFieldOperator(this, 1); } return _txtErrorExpression; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtFilePositionBackreference() { if (_txtFilePositionBackreference==null) { _txtFilePositionBackreference = new JTextFieldOperator(this, 2); } return _txtFilePositionBackreference; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtLinePositionBackreference() { if (_txtLinePositionBackreference==null) { _txtLinePositionBackreference = new JTextFieldOperator(this, 3); } return _txtLinePositionBackreference; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtColumnPositionBackreference() { if (_txtColumnPositionBackreference==null) { _txtColumnPositionBackreference = new JTextFieldOperator(this, 4); } return _txtColumnPositionBackreference; } /** Tries to find null JTextField in this dialog. * @return JTextFieldOperator */ public JTextFieldOperator txtMesssagePositionBackreference() { if (_txtMesssagePositionBackreference==null) { _txtMesssagePositionBackreference = new JTextFieldOperator(this, 5); } return _txtMesssagePositionBackreference; } /** Tries to find null JList in this dialog. * @return JListOperator */ public JListOperator lstErrorDescriptions() { if (_lstErrorDescriptions==null) { _lstErrorDescriptions = new JListOperator(this); } return _lstErrorDescriptions; } /** Tries to find "Add" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btAdd() { if (_btAdd==null) { _btAdd = new JButtonOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Add")); } return _btAdd; } /** Tries to find "Change" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btChange() { if (_btChange==null) { _btChange = new JButtonOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Set")); } return _btChange; } /** Tries to find "Remove" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btRemove() { if (_btRemove==null) { _btRemove = new JButtonOperator(this, Bundle.getString("org.netbeans.modules.java.settings.Bundle", "CTL_Remove")); } return _btRemove; } /** Tries to find "OK" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btOK() { if (_btOK==null) { _btOK = new JButtonOperator(this, Bundle.getString("org.netbeans.core.execution.beaninfo.editors.Bundle", "CTL_Approve_Button_Title")); } return _btOK; } /** Tries to find "Cancel" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btCancel() { if (_btCancel==null) { _btCancel = new JButtonOperator(this, Bundle.getString("org.openide.Bundle", "CTL_CANCEL")); } return _btCancel; } /** Tries to find "Help" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btHelp() { if (_btHelp==null) { _btHelp = new JButtonOperator(this, Bundle.getString("org.openide.Bundle", "CTL_HelpName")); } return _btHelp; } //**************************************** // Low-level functionality definition part //**************************************** /** gets text for txtPresetName * @return String text */ public String getPresetName() { return txtPresetName().getText(); } /** sets text for txtPresetName * @param text String text */ public void setPresetName(String text) { txtPresetName().setText(text); } /** types text for txtPresetName * @param text String text */ public void typePresetName(String text) { txtPresetName().typeText(text); } /** gets text for txtErrorExpression * @return String text */ public String getErrorExpression() { return txtErrorExpression().getText(); } /** sets text for txtErrorExpression * @param text String text */ public void setErrorExpression(String text) { txtErrorExpression().setText(text); } /** types text for txtErrorExpression * @param text String text */ public void typeErrorExpression(String text) { txtErrorExpression().typeText(text); } /** gets text for txtFilePositionBackreference * @return String text */ public String getFilePositionBackreference() { return txtFilePositionBackreference().getText(); } /** sets text for txtFilePositionBackreference * @param text String text */ public void setFilePositionBackreference(String text) { txtFilePositionBackreference().setText(text); } /** types text for txtFilePositionBackreference * @param text String text */ public void typeFilePositionBackreference(String text) { txtFilePositionBackreference().typeText(text); } /** gets text for txtLinePositionBackreference * @return String text */ public String getLinePositionBackreference() { return txtLinePositionBackreference().getText(); } /** sets text for txtLinePositionBackreference * @param text String text */ public void setLinePositionBackreference(String text) { txtLinePositionBackreference().setText(text); } /** types text for txtLinePositionBackreference * @param text String text */ public void typeLinePositionBackreference(String text) { txtLinePositionBackreference().typeText(text); } /** gets text for txtColumnPositionBackreference * @return String text */ public String getColumnPositionBackreference() { return txtColumnPositionBackreference().getText(); } /** sets text for txtColumnPositionBackreference * @param text String text */ public void setColumnPositionBackreference(String text) { txtColumnPositionBackreference().setText(text); } /** types text for txtColumnPositionBackreference * @param text String text */ public void typeColumnPositionBackreference(String text) { txtColumnPositionBackreference().typeText(text); } /** gets text for txtMesssagePositionBackreference * @return String text */ public String getMesssagePositionBackreference() { return txtMesssagePositionBackreference().getText(); } /** sets text for txtMesssagePositionBackreference * @param text String text */ public void setMesssagePositionBackreference(String text) { txtMesssagePositionBackreference().setText(text); } /** types text for txtMesssagePositionBackreference * @param text String text */ public void typeMesssagePositionBackreference(String text) { txtMesssagePositionBackreference().typeText(text); } /** clicks on "Add" JButton */ public void add() { btAdd().push(); } /** clicks on "Change" JButton */ public void change() { btChange().push(); } /** clicks on "Remove" JButton */ public void remove() { btRemove().push(); } /** clicks on "OK" JButton */ public void ok() { btOK().push(); } /** clicks on "Cancel" JButton */ public void cancel() { btCancel().push(); } /** clicks on "Help" JButton */ public void help() { btHelp().push(); } //***************************************** // High-level functionality definition part //***************************************** /** Performs verification of ErrorExpressionOperator by accessing all its components. */ public void verify() { lblPresetName(); lblErrorExpression(); lblFilePositionBackreference(); lblLinePositionBackreference(); lblColumnPositionBackreference(); lblMesssagePositionBackreference(); lblErrorDescriptions(); txtPresetName(); txtErrorExpression(); txtFilePositionBackreference(); txtLinePositionBackreference(); txtColumnPositionBackreference(); txtMesssagePositionBackreference(); lstErrorDescriptions(); btAdd(); btChange(); btRemove(); btOK(); btCancel(); btHelp(); } /** Performs simple test of ErrorExpressionOperator * @param args the command line arguments */ public static void main(String args[]) { new ErrorExpressionOperator().verify(); System.out.println("ErrorExpressionOperator verification finished."); //NOI18N } } |
... 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.