/** Sets given location in text field Location. * @param location Project With Existing Sources location */ public void setLocation(String location) { txtLocation().setText(location); }
/** Sets given object name in the text field. * @param objectName name of object */ public void setObjectName(String objectName) { txtObjectName().setText(objectName); }
/** sets text for txtProject * @param text String text */ public void setProject(String text) { txtProject().setText(text); }
/** sets text for txtProjectFolder * @param text String text */ public void setProjectFolder(String text) { txtProjectFolder().setText(text); }
/** sets text for txtLocation * @param text String text */ public void setProjectLocation(String text) { txtLocation().setText(text); }
/** Sets given name in text field Project Name. * @param name project name */ public void setProjectName(String name) { txtProjectName().setText(name); }
/** sets text for txtJSPFileName * @param text String text */ public void setJSPFileName(String text) { txtJSPFileName().setText(text); }
/** sets text for txtCreatedFile * @param text String text */ public void setCreatedFile(String text) { txtCreatedFile().setText(text); }
/** sets text for txtContextPath * @param text String text */ public void setContextPath(String text) { txtContextPath().setText(text); }
/** sets text for txtBuildScript * @param text String text */ public void setBuildScript(String text) { txtBuildScript().setText(text); }
/** sets text for txtProjectName * @param text String text */ public void setProjectName(String text) { txtProjectName().setText(text); }
/** Sets given location in text field Project Location. * @param location project location */ public void setProjectLocation(String location) { txtProjectLocation().setText(location); }
/** sets text for txtFolder * @param text String text */ public void setFolder(String text) { txtFolder().setText(text); }
/** sets text for txtWebPagesFolder * @param text String text */ public void setWebPagesFolder(String text) { txtWebPagesFolder().setText(text); }
/** sets text for txtContextPath * @param text String text */ public void setContextPath(String text) { txtContextPath().setText(text); }
/** * set a text in a JTextField operator * * @param operator * the container to search in * @param labelText * the label before the JTextField * @param value * the value to insert * @param indexNum * how many JTextFields to skip */ public void setTextInFieldOperator(ContainerOperator operator, String labelText, Object value, int indexNum) { JTextFieldOperator txtField = getJTextFieldComponent(operator, labelText, indexNum); if (!checkOperator(txtField, labelText, "Text Field is disabled!", labelText + "\nTried to insert value " + value)) { return; } txtField.setText(value.toString()); }
/** * Adds GlassFish server using path from glassfish.home property */ public static void addApplicationServer() { String glassfishHome = System.getProperty("glassfish.home"); if (glassfishHome == null) { throw new Error("Can't add GlassFish server. glassfish.home property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("GlassFish")) { // There is no GlassFish node so we'll add it serversNode.performPopupActionNoBlock(addServerMenuItem); WizardOperator addServerInstanceDialog = new WizardOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("GlassFish Server"); addServerInstanceDialog.next(); new JTextFieldOperator(addServerInstanceDialog).setText(glassfishHome); addServerInstanceDialog.next(); addServerInstanceDialog.finish(); } }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
@Test public void testUpdateErrorLabel() { panel.setError("This is a test error message!"); assertFalse(isBlank(error.getText())); final JTextFieldOperator tf = new JTextFieldOperator(frame); tf.setText("secret"); //tf.getQueueTool().waitEmpty(WAIT_EMPTY); assertTrue(isBlank(error.getText())); panel.setError("This is a test error message!"); assertFalse(isBlank(error.getText())); new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_KEY_FILE); // select tab for key files new JButtonOperator(frame, KEY_FILE_CHOOSER).push(); // open file chooser final JFileChooserOperator fc = new TFileChooserOperator(frame); fc.chooseFile(NON_EXISTING_FILE); fc.getQueueTool().waitEmpty(WAIT_EMPTY); assertTrue(isBlank(error.getText())); }