List of usage examples for com.jgoodies.forms.layout FormLayout FormLayout
public FormLayout(ColumnSpec[] colSpecs)
From source file:com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.SimpleContainsAssertion.java
License:EUPL
private void buildDialog() { XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Contains Assertion"); XForm mainForm = builder.createForm("Basic", new FormLayout("5px,left:pref,5px,fill:default:grow(1.0),5px")); JPanel mainFormPanel = ((SwingXFormImpl) mainForm).getPanel(); FormLayout mainFormLayout = (FormLayout) mainFormPanel.getLayout(); mainForm.addTextField(CONTENT, "Content to check for", XForm.FieldType.TEXTAREA).setWidth(40); mainFormLayout.setRowSpec(mainFormLayout.getRowCount(), new RowSpec("top:default:grow(1.0)")); mainFormPanel.add(mainFormPanel.getComponent(mainFormPanel.getComponents().length - 1), cc.xy(4, mainFormLayout.getRowCount(), "fill,fill")); mainForm.addCheckBox(IGNORE_CASE, "Ignore case in comparison"); mainForm.addCheckBox(USE_REGEX, "Use token as Regular Expression"); dialog = builder.buildDialog(builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_CONTAINS_HELP_URL), "Specify options", UISupport.OPTIONS_ICON); }
From source file:com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.SimpleNotContainsAssertion.java
License:EUPL
private void buildDialog() { XFormDialogBuilder builder = XFormFactory.createDialogBuilder("NotContains Assertion"); XForm mainForm = builder.createForm("Basic", new FormLayout("5px,left:pref,5px,fill:default:grow(1.0),5px")); JPanel mainFormPanel = ((SwingXFormImpl) mainForm).getPanel(); FormLayout mainFormLayout = (FormLayout) mainFormPanel.getLayout(); mainForm.addTextField(CONTENT, "Content to check for", XForm.FieldType.TEXTAREA).setWidth(40); mainFormLayout.setRowSpec(mainFormLayout.getRowCount(), new RowSpec("top:default:grow(1.0)")); mainFormPanel.add(mainFormPanel.getComponent(mainFormPanel.getComponents().length - 1), cc.xy(4, mainFormLayout.getRowCount(), "fill,fill")); mainForm.addCheckBox(IGNORE_CASE, "Ignore case in comparison"); mainForm.addCheckBox(USE_REGEX, "Use token as Regular Expression"); dialog = builder.buildDialog(builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_NOT_CONTAINS_HELP_URL), "Specify options", UISupport.OPTIONS_ICON); }
From source file:com.eviware.soapui.support.components.SimpleForm.java
License:EUPL
public SimpleForm(String columnSpec) { this(new FormLayout(columnSpec), BorderFactory.createEmptyBorder()); }
From source file:com.eviware.soapui.support.components.SimpleForm.java
License:EUPL
public SimpleForm(String columnSpec, Border border) { this(new FormLayout(columnSpec), border); }
From source file:com.eviware.soapui.support.editor.inspectors.auth.AuthorizationSelectionDialog.java
License:EUPL
private void buildAndShowDialog() { FormLayout layout = new FormLayout("5px,100px,5px,left:default,5px:grow(1.0)"); final XFormDialog dialog = ADialogBuilder.buildDialog(AuthorizationTypeForm.class, null, layout); profileNameField = (JTextFieldFormField) dialog .getFormField(AuthorizationTypeForm.OAUTH2_PROFILE_NAME_FIELD); profileNameField.addFormFieldListener(new ProfileNameFieldListener(dialog)); hintTextLabel = (JLabelFormField) dialog .getFormField(AuthorizationTypeForm.OAUTH2_PROFILE_NAME_HINT_TEXT_LABEL); setHintTextColor();//www . jav a 2 s . com setProfileNameAndHintTextVisibility(request.getAuthType()); List<String> authTypes = getBasicAuthenticationTypes(); authTypes.removeAll(request.getBasicAuthenticationProfiles()); if (request instanceof RestRequest) { authTypes.add(CredentialsConfig.AuthType.O_AUTH_2_0.toString()); int nextProfileIndex = getOAuth2ProfileContainer().getOAuth2ProfileList().size() + 1; profileNameField.setValue("Profile " + nextProfileIndex); } setAuthTypeComboBoxOptions(dialog, authTypes); dialog.setValue(AuthorizationTypeForm.AUTHORIZATION_TYPE, request.getAuthType()); if (dialog.show()) { createProfileForSelectedAuthType(dialog); } }
From source file:com.eviware.soapui.support.editor.inspectors.auth.ProfileSelectionForm.java
License:EUPL
private JPanel createAuthorizationLabelAndComboBox() { FormLayout formLayout = new FormLayout("5px:none,left:pref,40px,left:default,5px:grow(1.0)"); JPanel comboBoxPanel = new JPanel(formLayout); comboBoxPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); JLabel authorizationLabel = new JLabel(PROFILE_COMBO_BOX); authorizationLabel.setBorder(BorderFactory.createEmptyBorder(3, 0, 0, 0)); formLayout.appendRow(new RowSpec("top:pref")); comboBoxPanel.add(authorizationLabel, cc.xy(2, 1)); createProfileSelectionComboBox();/*from w w w .j a va2 s . c o m*/ comboBoxPanel.add(profileSelectionComboBox, cc.xy(4, 1)); JPanel wrapperPanel = new JPanel(new BorderLayout(5, 5)); wrapperPanel.add(comboBoxPanel, BorderLayout.LINE_START); helpButton = UISupport.createFormButton(helpActions.get(EMPTY_PANEL)); wrapperPanel.add(helpButton, BorderLayout.AFTER_LINE_ENDS); return wrapperPanel; }
From source file:com.eviware.x.impl.swing.SwingXFormImpl.java
License:EUPL
public SwingXFormImpl(String name, int leftIndent) { this.name = name; layout = new FormLayout(leftIndent + "px,left:pref,5px,left:default,5px:grow(1.0)"); panel = new JPanel(layout); rowSpec = new RowSpec(rowAlignment + ":pref"); }
From source file:com.lyndir.lhunath.opal.gui.template.shade.AbstractUi.java
License:Apache License
private JComponent getSettingsPane() { FormLayout layout = new FormLayout( "20dlu:g(3), r:p, 5dlu, f:100dlu:g(2), 10dlu, r:p, 5dlu, f:100dlu:g(2), 5dlu, l:20dlu:g(4)"); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout, new ScrollPanel()); builder.setBorder(Borders.DLU4_BORDER); builder.setLeadingColumnOffset(1);// w ww . j a v a 2s . c o m builder.appendSeparator(Locale.explain("ui.appearance")); //$NON-NLS-1$ builder.append(Locale.explain("ui.theme"), new ToolTip(Locale.explain("ui.themeTitle") //$NON-NLS-1$ //$NON-NLS-2$ + Locale.explain("ui.themeTip"), themesPanel = new JPanel()), 5); //$NON-NLS-1$ for (MyTheme theme : MyTheme.values()) themesPanel.add(theme.getButton()); themesPanel.setOpaque(false); builder.nextLine(); builder.append(Locale.explain("ui.systray"), new ToolTip(Locale.explain("ui.systrayTitle") //$NON-NLS-1$ //$NON-NLS-2$ + Locale.explain("ui.systrayTip"), //$NON-NLS-1$ systrayButton = new JCheckBox(Locale.explain("ui.enable")))); //$NON-NLS-1$ builder.append(Locale.explain("ui.ontop"), new ToolTip(Locale.explain("ui.ontopTitle") //$NON-NLS-1$ //$NON-NLS-2$ + Locale.explain("ui.ontopTip"), //$NON-NLS-1$ alwaysOnTop = new JCheckBox(Locale.explain("ui.enable")))); //$NON-NLS-1$ builder.nextLine(); builder.append(Locale.explain("ui.startmini"), new ToolTip(Locale.explain("ui.startminiTitle") //$NON-NLS-1$ //$NON-NLS-2$ + Locale.explain("ui.startminiTip"), //$NON-NLS-1$ startMini = new JCheckBox(Locale.explain("ui.enable")))); //$NON-NLS-1$ builder.append(Locale.explain("ui.verbose"), new ToolTip(Locale.explain("ui.verboseTitle") //$NON-NLS-1$ //$NON-NLS-2$ + Locale.explain("ui.verboseTip"), //$NON-NLS-1$ verboseLogs = new JCheckBox(Locale.explain("ui.enable")))); //$NON-NLS-1$ builder.nextLine(); appendCustomSettings(builder); for (Plugin plugin : plugins) { builder.appendSeparator(plugin.getName()); plugin.buildSettings(builder); } systrayButton.addActionListener(this); alwaysOnTop.addActionListener(this); startMini.addActionListener(this); verboseLogs.addActionListener(this); systrayButton.setOpaque(false); alwaysOnTop.setOpaque(false); startMini.setOpaque(false); verboseLogs.setOpaque(false); JScrollPane pane = new JScrollPane(builder.getPanel()); pane.setBorder(Borders.EMPTY_BORDER); builder.getPanel().setOpaque(false); pane.getViewport().setOpaque(false); pane.setOpaque(false); return pane; }