|
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-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.jellytools.modules.db; import org.netbeans.jemmy.operators.*; /** Class implementing all necessary methods for handling "Database is not supported by the system" UnsupportedDatabaseDialog. * * @author Patrik Knakal * @version 1.0 */ public class DatabaseIsNotSupportedByTheSystemOperator extends JDialogOperator { /** Creates new DatabaseIsNotSupportedByTheSystemOperator that can handle it. */ public DatabaseIsNotSupportedByTheSystemOperator() { super("Database is not supported by the system"); //NOI18N } private JRadioButtonOperator _rbConnectAsGenericDatabaseSystem; private JRadioButtonOperator _rbConnectInReadOnlyMode; private JButtonOperator _btOK; private JButtonOperator _btCancel; //****************************** // Subcomponents definition part //****************************** /** Tries to find "Connect as generic database system" JRadioButton in this dialog. * @return JRadioButtonOperator */ public JRadioButtonOperator rbConnectAsGenericDatabaseSystem() { if (_rbConnectAsGenericDatabaseSystem==null) { _rbConnectAsGenericDatabaseSystem = new JRadioButtonOperator(this, "Connect as generic database system"); //NOI18N } return _rbConnectAsGenericDatabaseSystem; } /** Tries to find "Connect in read-only mode" JRadioButton in this dialog. * @return JRadioButtonOperator */ public JRadioButtonOperator rbConnectInReadOnlyMode() { if (_rbConnectInReadOnlyMode==null) { _rbConnectInReadOnlyMode = new JRadioButtonOperator(this, "Connect in read-only mode"); //NOI18N } return _rbConnectInReadOnlyMode; } /** Tries to find "OK" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btOK() { if (_btOK==null) { _btOK = new JButtonOperator(this, "OK"); //NOI18N } return _btOK; } /** Tries to find "Cancel" JButton in this dialog. * @return JButtonOperator */ public JButtonOperator btCancel() { if (_btCancel==null) { _btCancel = new JButtonOperator(this, "Cancel"); //NOI18N } return _btCancel; } //**************************************** // Low-level functionality definition part //**************************************** /** clicks on "Connect as generic database system" JRadioButton */ public void connectAsGenericDatabaseSystem() { rbConnectAsGenericDatabaseSystem().push(); } /** clicks on "Connect in read-only mode" JRadioButton */ public void connectInReadOnlyMode() { rbConnectInReadOnlyMode().push(); } /** clicks on "OK" JButton */ public void oK() { btOK().push(); } /** clicks on "Cancel" JButton */ public void cancel() { btCancel().push(); } //***************************************** // High-level functionality definition part //***************************************** /** Performs verification of DatabaseIsNotSupportedByTheSystemOperator by accessing all its components. */ public void verify() { rbConnectAsGenericDatabaseSystem(); rbConnectInReadOnlyMode(); btOK(); btCancel(); } /** Performs simple test of DatabaseIsNotSupportedByTheSystemOperator * @param args the command line arguments */ public static void main(String args[]) { new DatabaseIsNotSupportedByTheSystemOperator().verify(); System.out.println("DatabaseIsNotSupportedByTheSystemOperator 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.