/** * locate a radio button by a given String or int and return the operator to * it * * @param operator * the container to look inside * @param identifier * the text\index number * @return */ public JRadioButtonOperator getRadioButtonOpertaor( ContainerOperator operator, Object identifier) { JRadioButtonOperator button = null; if (identifier instanceof String) { button = new JRadioButtonOperator(operator, (String) identifier); } else { // int button = new JRadioButtonOperator(operator, Integer .parseInt(identifier.toString())); } return button; }
/** clicks on "JSP Document (XML Syntax)" JRadioButton */ public void jSPDocumentXMLSyntax() { rbJSPDocumentXMLSyntax().push(); }
@RobotKeyword public void enableRadioButton(String identifier) { JRadioButtonOperator operator = createOperator(identifier); operator.setEnabled(true); }
@RobotKeyword public void disableRadioButton(String identifier) { JRadioButtonOperator operator = createOperator(identifier); operator.setEnabled(false); }
/** Tries to find "JSP Document (XML Syntax)" JRadioButton in this dialog. * @return JRadioButtonOperator */ public JRadioButtonOperator rbJSPDocumentXMLSyntax() { if (_rbJSPDocumentXMLSyntax==null) { _rbJSPDocumentXMLSyntax = new JRadioButtonOperator(this, Bundle.getStringTrimmed( "org.netbeans.modules.web.wizards.Bundle", "OPT_XmlSyntax")); } return _rbJSPDocumentXMLSyntax; }
/** clicks on "JSP File (Standard Syntax)" JRadioButton */ public void jSPFileStandardSyntax() { rbJSPFileStandardSyntax().push(); }
/** Tries to find "JSP File (Standard Syntax)" JRadioButton in this dialog. * @return JRadioButtonOperator */ public JRadioButtonOperator rbJSPFileStandardSyntax() { if (_rbJSPFileStandardSyntax==null) { _rbJSPFileStandardSyntax = new JRadioButtonOperator(this, Bundle.getStringTrimmed( "org.netbeans.modules.web.wizards.Bundle", "OPT_JspSyntax")); } return _rbJSPFileStandardSyntax; }
/** * locate a radio button by a given identifier (name\index) * * @param operator * the operator to search in * @param identifier * the name\index to locate radioButton by */ public void pushRadioButton(ContainerOperator operator, Object identifier) { JRadioButtonOperator button = getRadioButtonOpertaor(operator, identifier); if (!checkOperator(button, identifier, "Button is disabled!", identifier)) { return; } button.push(); }
@Override public AbstractButtonOperator createOperatorByIndex(int index) { return coerceToRadioButtonOperator(new JRadioButtonOperator((ContainerOperator) Context.getContext(), index)); }
private JRadioButtonOperator createOperator(String nameOrText) { return new JRadioButtonOperator((ContainerOperator) Context.getContext(), new ByNameOrTextComponentChooser(nameOrText)); } }
@Override public AbstractButtonOperator createOperatorByName(String name) { return coerceToRadioButtonOperator(new JRadioButtonOperator((ContainerOperator) Context.getContext(), new ByNameOrTextComponentChooser(name))); }