Example usage for com.jgoodies.forms.layout CellConstraints xy

List of usage examples for com.jgoodies.forms.layout CellConstraints xy

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints xy.

Prototype

public CellConstraints xy(int col, int row, Alignment colAlign, Alignment rowAlign) 

Source Link

Document

Sets the column and row origins; sets width and height to 1; set horizontal and vertical alignment using the specified objects.

Examples:

 cc.xy(1, 3, CellConstraints.LEFT,   CellConstraints.BOTTOM); cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.FILL); 

Usage

From source file:ca.parkie.portfinder.client.NetworkInterfaceDialog.java

License:GNU General Public License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL/*www. j a v a  2 s  . c  om*/
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    contentPane.setPreferredSize(new Dimension(370, 51));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:d:noGrow,left:4dlu:noGrow,fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "center:30px:noGrow"));
    CellConstraints cc = new CellConstraints();
    contentPane.add(panel1, new CellConstraints(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.FILL,
            new Insets(11, 11, 11, 11)));
    final JLabel label1 = new JLabel();
    label1.setText("Select the network interface to use:");
    panel1.add(label1, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    networkInterfaceCombo = new JComboBox();
    panel1.add(networkInterfaceCombo, cc.xy(3, 1));
    okButton = new JButton();
    okButton.setEnabled(false);
    okButton.setText("Ok");
    panel1.add(okButton, cc.xy(5, 1));
    label1.setLabelFor(networkInterfaceCombo);
}

From source file:com.archivas.clienttools.arcmover.gui.properties.FilePropertiesDialog.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
 * call it in your code!//from  w ww .jav a 2  s .  c  o  m
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new FormLayout(
            "fill:max(d;4dlu):noGrow,left:150dlu:grow,fill:d:noGrow,fill:50dlu:noGrow,fill:max(d;4dlu):noGrow,fill:d:noGrow",
            "top:110px:grow,top:m:noGrow,top:4dlu:noGrow,top:15dlu:noGrow,top:4dlu:noGrow"));
    contentPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new FormLayout("fill:max(d;4px):noGrow", "center:d:noGrow"));
    CellConstraints cc = new CellConstraints();
    contentPane.add(panel1, cc.xyw(2, 2, 5));
    final JScrollPane scrollPane1 = new JScrollPane();
    contentPane.add(scrollPane1, cc.xyw(2, 1, 3, CellConstraints.FILL, CellConstraints.FILL));
    propertyTable = new JTable();
    propertyTable.setCellSelectionEnabled(true);
    propertyTable.setFillsViewportHeight(true);
    propertyTable.setRowSelectionAllowed(true);
    scrollPane1.setViewportView(propertyTable);
    closeButton = new JButton();
    closeButton.setText("Close");
    contentPane.add(closeButton, cc.xy(4, 4, CellConstraints.FILL, CellConstraints.FILL));
}

From source file:com.archivas.clienttools.arcmover.gui.properties.ObjectPropertiesDialog.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
 * call it in your code!/*from w w w  .ja  va2s.c o  m*/
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new FormLayout("left:4dlu:noGrow,left:250dlu:grow,left:5dlu:noGrow",
            "center:4dlu:noGrow,center:150dlu:grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow"));
    propertiesTabs = new JTabbedPane();
    propertiesTabs.setToolTipText("Core Metadata");
    CellConstraints cc = new CellConstraints();
    contentPane.add(propertiesTabs, cc.xy(2, 2, CellConstraints.FILL, CellConstraints.FILL));
    sMetadataTab = new JScrollPane();
    sMetadataTab.setToolTipText("Filesystem Metadata");
    propertiesTabs.addTab("System Metadata", sMetadataTab);
    sMetadataTab.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), null));
    systemMetadataTable = new JTable();
    systemMetadataTable.setCellSelectionEnabled(true);
    systemMetadataTable.setFillsViewportHeight(true);
    sMetadataTab.setViewportView(systemMetadataTable);
    cMetadataTab = new JScrollPane();
    cMetadataTab.setToolTipText("Custom Metadata");
    propertiesTabs.addTab("Custom Metadata", cMetadataTab);
    cMetadataTab.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), null));
    customMetadataText = new JTextPane();
    customMetadataText.setEditable(true);
    customMetadataText.putClientProperty("JEditorPane.honorDisplayProperties", Boolean.TRUE);
    cMetadataTab.setViewportView(customMetadataText);
    cACLTab = new JScrollPane();
    cACLTab.setToolTipText("ACL");
    propertiesTabs.addTab("ACL", cACLTab);
    cACLTab.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), null));
    aclText = new JTextPane();
    aclText.setEditable(true);
    aclText.putClientProperty("JEditorPane.honorDisplayProperties", Boolean.TRUE);
    cACLTab.setViewportView(aclText);
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new FormLayout(
            "fill:50dlu:noGrow,left:4dlu:noGrow,fill:max(d;4px):grow,left:4dlu:noGrow,fill:50dlu:noGrow",
            "center:15dlu:noGrow"));
    contentPane.add(panel1, cc.xy(2, 4, CellConstraints.FILL, CellConstraints.DEFAULT));
    closeButton = new JButton();
    closeButton.setHorizontalAlignment(0);
    closeButton.setText("Close");
    panel1.add(closeButton, cc.xy(5, 1, CellConstraints.FILL, CellConstraints.FILL));
    saveButton = new JButton();
    saveButton.setText("Save");
    panel1.add(saveButton, cc.xy(1, 1));
}

From source file:com.archivas.clienttools.arcmover.gui.settings.DefaultNamespaceSettingsForm.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
 * call it in your code!/*ww w .ja va  2s.  c o  m*/
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    defaultNamespaceTab = new JPanel();
    defaultNamespaceTab.setLayout(new FormLayout(
            "fill:4dlu:noGrow,fill:max(d;4px):noGrow,left:max(d;4px):noGrow,fill:max(d;4px):grow,fill:d:noGrow",
            "center:4dlu:noGrow,center:max(d;4px):noGrow,top:15px:noGrow,center:max(d;4px):noGrow,top:5dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(m;4px):grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow"));
    CellConstraints cc = new CellConstraints();
    contentPane.add(defaultNamespaceTab, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));
    final JLabel label1 = new JLabel();
    label1.setFont(new Font(label1.getFont().getName(), Font.BOLD, 14));
    label1.setText("POSIX Ownership and Permissions");
    defaultNamespaceTab.add(label1, cc.xyw(2, 2, 3));
    uidCheckbox = new JCheckBox();
    uidCheckbox.setText("UID");
    uidCheckbox.setToolTipText("Enable setting UID");
    defaultNamespaceTab.add(uidCheckbox, cc.xy(2, 6));
    uidTextField = new JTextField();
    uidTextField.setEnabled(false);
    uidTextField.setToolTipText("Number to set for UID");
    defaultNamespaceTab.add(uidTextField, cc.xy(4, 6, CellConstraints.FILL, CellConstraints.DEFAULT));
    gidCheckbox = new JCheckBox();
    gidCheckbox.setText("GID");
    gidCheckbox.setToolTipText("Enable setting GID");
    defaultNamespaceTab.add(gidCheckbox, cc.xy(2, 8));
    fileModeCheckbox = new JCheckBox();
    fileModeCheckbox.setText("Object permissions");
    fileModeCheckbox.setToolTipText("Enable setting object permissions");
    defaultNamespaceTab.add(fileModeCheckbox, cc.xy(2, 10, CellConstraints.DEFAULT, CellConstraints.TOP));
    dirModeCheckbox = new JCheckBox();
    dirModeCheckbox.setText("Directory permissions");
    dirModeCheckbox.setToolTipText("Enable setting directory permissions");
    defaultNamespaceTab.add(dirModeCheckbox, cc.xy(2, 12, CellConstraints.DEFAULT, CellConstraints.TOP));
    gidTextField = new JTextField();
    gidTextField.setEnabled(false);
    gidTextField.setToolTipText("Number to set for GID");
    defaultNamespaceTab.add(gidTextField, cc.xy(4, 8, CellConstraints.FILL, CellConstraints.DEFAULT));
    final JLabel label2 = new JLabel();
    label2.setFont(new Font(label2.getFont().getName(), label2.getFont().getStyle(), 12));
    label2.setText("These settings apply only to the HCP default namespace and HCAP 2.x.");
    defaultNamespaceTab.add(label2, cc.xyw(2, 3, 3));
    objectPermissionsForm = new PermissionsForm();
    defaultNamespaceTab.add(objectPermissionsForm.$$$getRootComponent$$$(),
            cc.xy(4, 10, CellConstraints.FILL, CellConstraints.FILL));
    dirPermissionsForm = new PermissionsForm();
    defaultNamespaceTab.add(dirPermissionsForm.$$$getRootComponent$$$(),
            cc.xy(4, 12, CellConstraints.FILL, CellConstraints.FILL));
}

From source file:com.archivas.clienttools.arcmover.gui.ssl.SSLCertificateForm.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
 * call it in your code!//from   w  ww.  j a  va 2s .  c  o  m
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    contentPane.setMinimumSize(new Dimension(400, 390));
    tabbedPane1 = new JTabbedPane();
    tabbedPane1.setMinimumSize(new Dimension(400, 200));
    tabbedPane1.setOpaque(false);
    tabbedPane1.setPreferredSize(new Dimension(400, 200));
    CellConstraints cc = new CellConstraints();
    contentPane.add(tabbedPane1, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new FormLayout("fill:6dlu:noGrow,right:d:noGrow,fill:d:grow,left:5dlu:noGrow",
            "center:7dlu:noGrow,center:max(d;4px):noGrow,center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:16px:noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:8dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,top:15px:grow,top:4dlu:noGrow,center:d:grow,center:18px:noGrow,top:15dlu:noGrow"));
    panel1.setMinimumSize(new Dimension(400, 220));
    panel1.setPreferredSize(new Dimension(400, 220));
    tabbedPane1.addTab("General", panel1);
    final JLabel label1 = new JLabel();
    label1.setName("Issued to:");
    label1.setText("Common Name (CN)");
    panel1.add(label1, cc.xy(2, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    issuedToCommonNameLabel = new JLabel();
    issuedToCommonNameLabel.setText("Issued to Value");
    panel1.add(issuedToCommonNameLabel, cc.xy(3, 3));
    final JLabel label2 = new JLabel();
    label2.setText("Common Name (CN)");
    panel1.add(label2, cc.xy(2, 14));
    issuedByCommonNameLabel = new JLabel();
    issuedByCommonNameLabel.setText("Issued by Value");
    panel1.add(issuedByCommonNameLabel, cc.xy(3, 14));
    final JLabel label3 = new JLabel();
    label3.setText("Valid From");
    panel1.add(label3, cc.xy(2, 22));
    validDateRangeLabel = new JLabel();
    validDateRangeLabel.setAutoscrolls(false);
    validDateRangeLabel.setText("Valid from Value");
    panel1.add(validDateRangeLabel, cc.xy(3, 22));
    final JLabel label4 = new JLabel();
    label4.setText("MD5 Fingerprint");
    panel1.add(label4, cc.xy(2, 27));
    md5FingerprintLabel = new JLabel();
    md5FingerprintLabel.setAutoscrolls(true);
    md5FingerprintLabel.setEnabled(true);
    md5FingerprintLabel.setText("MD5 Fingerprint value");
    panel1.add(md5FingerprintLabel, cc.xy(3, 27));
    final JLabel label5 = new JLabel();
    label5.setText("Organization (O)");
    panel1.add(label5, cc.xy(2, 5));
    issuedToOrganizationLabel = new JLabel();
    issuedToOrganizationLabel.setText("Organization Value");
    panel1.add(issuedToOrganizationLabel, cc.xy(3, 5));
    final JLabel label6 = new JLabel();
    label6.setFont(new Font(label6.getFont().getName(), Font.BOLD, label6.getFont().getSize()));
    label6.setText("Issued To");
    panel1.add(label6, cc.xy(2, 2, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final JLabel label7 = new JLabel();
    label7.setFont(new Font(label7.getFont().getName(), Font.BOLD, label7.getFont().getSize()));
    label7.setText("Issued By");
    panel1.add(label7, cc.xy(2, 11, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final JLabel label8 = new JLabel();
    label8.setText("Organization (O)");
    panel1.add(label8, cc.xy(2, 16));
    issuedByOrganizationLabel = new JLabel();
    issuedByOrganizationLabel.setText("Organization Value");
    panel1.add(issuedByOrganizationLabel, cc.xy(3, 16));
    final JLabel label9 = new JLabel();
    label9.setText("Organizational Unit (OU)");
    panel1.add(label9, cc.xy(2, 7));
    issuedToOrganizationalUnitLabel = new JLabel();
    issuedToOrganizationalUnitLabel.setText("Organizational Unit Value");
    panel1.add(issuedToOrganizationalUnitLabel, cc.xy(3, 7));
    final JLabel label10 = new JLabel();
    label10.setText("Organizational Unit (OU)");
    panel1.add(label10, cc.xy(2, 18));
    issuedByOrganizationalUnitLabel = new JLabel();
    issuedByOrganizationalUnitLabel.setText("Organizational Unit Value");
    panel1.add(issuedByOrganizationalUnitLabel, cc.xy(3, 18));
    final JLabel label11 = new JLabel();
    label11.setFont(new Font(label11.getFont().getName(), Font.BOLD, label11.getFont().getSize()));
    label11.setText("Validity");
    panel1.add(label11, cc.xy(2, 20, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final JLabel label12 = new JLabel();
    label12.setFont(new Font(label12.getFont().getName(), Font.BOLD, label12.getFont().getSize()));
    label12.setText("Fingerprints");
    panel1.add(label12, cc.xy(2, 24, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final JLabel label13 = new JLabel();
    label13.setText("Serial Number");
    panel1.add(label13, cc.xy(2, 9));
    serialNumberLabel = new JLabel();
    serialNumberLabel.setEnabled(true);
    serialNumberLabel.setText("Serial Number Value");
    panel1.add(serialNumberLabel, cc.xy(3, 9));
    final JLabel label14 = new JLabel();
    label14.setText("SHA1 Fingerprint");
    panel1.add(label14, cc.xy(2, 25));
    shaFingerprintLabel = new JLabel();
    shaFingerprintLabel.setText("SHA1 Fingerprint vale");
    panel1.add(shaFingerprintLabel, cc.xy(3, 25));
    permStoreCertCheckBox = new JCheckBox();
    permStoreCertCheckBox.setEnabled(false);
    permStoreCertCheckBox.setText("Permanently store this exception");
    permStoreCertCheckBox.setToolTipText("Save this exception permanently");
    permStoreCertCheckBox.setVisible(true);
    panel1.add(permStoreCertCheckBox, cc.xy(2, 33));
    final JLabel label15 = new JLabel();
    label15.setFont(new Font(label15.getFont().getName(), Font.BOLD, label15.getFont().getSize()));
    label15.setText("Other Warnings");
    panel1.add(label15, cc.xy(2, 30, CellConstraints.LEFT, CellConstraints.DEFAULT));
    otherWarnings = new JTextPane();
    otherWarnings.setBackground(UIManager.getColor("Label.background"));
    otherWarnings.setEditable(false);
    panel1.add(otherWarnings, cc.xyw(2, 32, 2, CellConstraints.CENTER, CellConstraints.CENTER));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    tabbedPane1.addTab("Details", panel2);
    final JScrollPane scrollPane1 = new JScrollPane();
    panel2.add(scrollPane1, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));
    detailsTextArea = new JTextArea();
    detailsTextArea.setEditable(false);
    detailsTextArea.setEnabled(true);
    scrollPane1.setViewportView(detailsTextArea);
}

From source file:com.atlassian.theplugin.idea.AboutForm.java

License:Apache License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//from  w w w .  ja va 2 s.  c  o m
 */
private void $$$setupUI$$$() {
    mainPanel = new JPanel();
    mainPanel
            .setLayout(new FormLayout("fill:d:grow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow"));
    mainPanel.setBackground(new Color(-1));
    mainPanel.setMaximumSize(new Dimension(600, 500));
    mainPanel.setMinimumSize(new Dimension(600, 500));
    mainPanel.setPreferredSize(new Dimension(600, 500));
    aboutText = new JEditorPane();
    aboutText.setMaximumSize(new Dimension(500, 250));
    aboutText.setMinimumSize(new Dimension(500, 250));
    aboutText.setPreferredSize(new Dimension(500, 250));
    CellConstraints cc = new CellConstraints();
    mainPanel.add(aboutText, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.FILL));
    iconLabel = new JLabel();
    iconLabel.setMaximumSize(new Dimension(500, 216));
    iconLabel.setMinimumSize(new Dimension(500, 216));
    iconLabel.setPreferredSize(new Dimension(500, 216));
    iconLabel.setRequestFocusEnabled(false);
    iconLabel.setText("Label");
    mainPanel.add(iconLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.TOP));
}

From source file:com.atlassian.theplugin.idea.config.serverconfig.BambooGeneralForm.java

License:Apache License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//  w ww . ja va  2  s.  c  om
 */
private void $$$setupUI$$$() {
    rootComponent = new JPanel();
    rootComponent.setLayout(new FormLayout(
            "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:d:grow",
            "center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:grow"));
    rootComponent
            .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12), null));
    allFailuresFirstSuccess = new JRadioButton();
    allFailuresFirstSuccess.setSelected(true);
    allFailuresFirstSuccess.setText("All Build Failures and First Build Success");
    CellConstraints cc = new CellConstraints();
    rootComponent.add(allFailuresFirstSuccess, cc.xy(3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    firstFailureFirstSuccess = new JRadioButton();
    firstFailureFirstSuccess.setText("First Build Failure and First Build Success");
    rootComponent.add(firstFailureFirstSuccess, cc.xy(3, 3, CellConstraints.LEFT, CellConstraints.DEFAULT));
    never = new JRadioButton();
    never.setText("Never");
    rootComponent.add(never, cc.xy(3, 5, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final Spacer spacer1 = new Spacer();
    rootComponent.add(spacer1, cc.xy(3, 11, CellConstraints.DEFAULT, CellConstraints.FILL));
    final Spacer spacer2 = new Spacer();
    rootComponent.add(spacer2, cc.xy(5, 11, CellConstraints.FILL, CellConstraints.DEFAULT));
    final JLabel label1 = new JLabel();
    label1.setText("Popups:");
    rootComponent.add(label1, cc.xy(1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    final JLabel label2 = new JLabel();
    label2.setText("Background refresh  every:");
    rootComponent.add(label2, cc.xy(1, 9));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
    rootComponent.add(panel1, cc.xy(3, 9));
    pollTimeSpinner = new JSpinner();
    panel1.add(pollTimeSpinner,
            new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
                    new Dimension(50, -1), null, 0, false));
    final JLabel label3 = new JLabel();
    label3.setText("minute(s)");
    panel1.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
            GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer3 = new Spacer();
    panel1.add(spacer3,
            new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    onlyMyBuilds = new JCheckBox();
    onlyMyBuilds.setText("Only for My Builds");
    onlyMyBuilds.setToolTipText(
            "Shows notification popup only for builds triggered by commit of the logged in user");
    rootComponent.add(onlyMyBuilds, new CellConstraints(3, 7, 1, 1, CellConstraints.DEFAULT,
            CellConstraints.DEFAULT, new Insets(0, 20, 0, 0)));
    label3.setLabelFor(pollTimeSpinner);
    ButtonGroup buttonGroup;
    buttonGroup = new ButtonGroup();
    buttonGroup.add(allFailuresFirstSuccess);
    buttonGroup.add(firstFailureFirstSuccess);
    buttonGroup.add(never);
}

From source file:com.atlassian.theplugin.idea.jira.PerformIssueActionForm.java

License:Apache License

private void createContent(final List<JIRAActionField> fieldList) {

    String columns = "3dlu, right:pref, 3dlu, fill:1dlu:grow, 3dlu";
    String rows = "3dlu";

    Collection<JIRAActionField> sortedFieldList = JiraActionFieldType.sortFieldList(fieldList);

    JIRAServerModel jiraServerModel = IdeaHelper.getJIRAServerModel(project);

    List<ActionFieldEditor> editors = Lists.newArrayList();
    List<String> unsupportedFields = Lists.newArrayList();

    for (JIRAActionField field : sortedFieldList) {

        ActionFieldEditor editor = null;
        String row = null;/* ww  w  .  ja  va  2  s  .c o  m*/

        switch (JiraActionFieldType.getFieldTypeForFieldId(field)) {
        case SUMMARY:
            editor = new FieldTextField(issue.getSummary(), field);
            row = ", pref, 3dlu";
            break;
        case DESCRIPTION:
            editor = new FieldTextArea(Html2text.translate(issue.getWikiDescription()), field);
            row = ", fill:pref:grow, 3dlu";
            break;
        case ISSUE_TYPE:
            editor = new FieldIssueType(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case RESOLUTION:
            editor = new FieldResolution(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case ASSIGNEE:
            editor = new FieldUser(jiraServerModel, issue.getJiraServerData(), issue.getAssigneeId(), field);
            row = ", p, 3dlu";
            break;
        case PRIORITY:
            editor = new FieldPriority(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case VERSIONS:
            editor = new FieldAffectsVersion(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case FIX_VERSIONS:
            editor = new FieldFixForVersion(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case COMPONENTS:
            editor = new FieldComponents(jiraServerModel, issue, field, this);
            row = ", p, 3dlu";
            break;
        case REPORTER:
            editor = new FieldUser(jiraServerModel, issue.getJiraServerData(), issue.getReporterId(), field);
            row = ", p, 3dlu";
            break;
        case ENVIRONMENT:
            //                    editor = new FieldTextArea(field.getValues().get(0), field);
            editor = new FieldTextArea(Html2text.translate(issue.getEnvironment()), field);
            row = ", fill:pref:grow, 3dlu";
            break;
        case TIMETRACKING:
            editor = new FieldTimeTracking(field.getValues().get(0), issue, field, this);
            row = ", p, 3dlu";
            break;
        case DUE_DATE:
            String content = "";
            if (field.getValues() != null && field.getValues().size() > 0) {
                content = field.getValues().get(0);
            }
            editor = new FieldDueDate(content, field, this);
            row = ", p, 3dlu";
            break;
        case CUSTOM_FIELD:
            for (JiraCustomField custom : issue.getCustomFields()) {
                if (custom.getId().equals(field.getFieldId())) {
                    List<String> values = custom.getValues();
                    String val = values != null && values.size() > 0 ? values.get(0) : null;
                    switch (custom.getTypeKey()) {
                    case NUMERIC:
                        editor = new FieldTextField(val, field);
                        row = ", p, 3dlu";
                        break;
                    case TEXT:
                        editor = new FieldTextField(val, field);
                        row = ", p, 3dlu";
                        break;
                    case TEXT_AREA:
                        //                                    editor = new FieldEditorPane(custom.getValues().get(0).replaceAll("<br/>", "\n"), field, true);
                        editor = new FieldTextArea(val != null ? val.replaceAll("<br/>", "") : "", field);
                        row = ", p, 3dlu";
                        break;
                    case DATE_PICKER:
                        editor = new FieldDueDate(custom.getFormattedValue(), field, this);
                        row = ", p, 3dlu";
                        break;
                    case URL:
                        editor = new FieldTextField(custom.getFormattedValue(), field);
                        row = ", p, 3dlu";
                    case UNSUPPORTED:
                    default:
                        break;
                    }
                }
            }
            break;
        case UNSUPPORTED:
        default:
            unsupportedFields.add(field.getName());
            break;
        }

        if (editor != null) {
            editors.add(editor);
            rows += row;
        }
    }

    rows += ", fill:pref:grow, 3dlu"; // Comments text area

    if (!unsupportedFields.isEmpty()) {
        rows += ", pref, 3dlu"; // warning status line about not handled
    }

    contentPanel.setLayout(new FormLayout(columns, rows));
    final CellConstraints cc = new CellConstraints();

    int y = 2;

    for (ActionFieldEditor editor : editors) {
        final JLabel label = new JLabel(editor.getFieldName() + ":");
        contentPanel.add(label, cc.xy(2, y, CellConstraints.RIGHT, CellConstraints.TOP));
        contentPanel.add(editor.getComponent(), cc.xy(4, y));
        createdFieldEditors.add(editor);
        y += 2;
    }

    final JLabel label = new JLabel("Comment :");
    contentPanel.add(label, cc.xy(2, y, CellConstraints.RIGHT, CellConstraints.TOP));
    // todo create field for Comments
    commentTextArea = new CommentTextArea();
    contentPanel.add(commentTextArea, cc.xy(4, y));

    y += 2;

    if (!unsupportedFields.isEmpty()) {
        String warning = issue.usesRest() ? "Unsupported fields (skipped): "
                : "Unsupported fields (original values copied): ";
        warning += StringUtils.join(unsupportedFields, ", ");
        contentPanel.add(new JLabel(warning), cc.xyw(2, y, 3, CellConstraints.LEFT, CellConstraints.CENTER));
    }

    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            contentPanel.validate();
        }
    });
}

From source file:com.aw.swing.mvp.cmp.pick.FrmPick.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//from   w ww .  j  a v a 2  s.  co  m
 */
private void $$$setupUI$$$() {
    createUIComponents();
    pnlMain = new JPanel();
    pnlMain.setLayout(new FormLayout(
            "left:25dlu:noGrow,fill:52dlu:noGrow,left:8dlu:noGrow,fill:85dlu:noGrow,left:58dlu:noGrow,fill:10px:noGrow,fill:50dlu:noGrow,left:22dlu:noGrow",
            "center:12dlu:noGrow,top:4dlu:noGrow,center:12dlu:noGrow,top:5dlu:noGrow,center:18px:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:188dlu:noGrow,top:4dlu:noGrow,top:12dlu:noGrow,center:max(d;4dlu):noGrow,center:12dlu:noGrow"));
    pnlMain.setMinimumSize(new Dimension(501, 425));
    pnlMain.setOpaque(true);
    pnlMain.setPreferredSize(new Dimension(501, 425));
    lblSearch = new JLabel();
    lblSearch.setText("Descripcin");
    lblSearch.setDisplayedMnemonic('D');
    lblSearch.setDisplayedMnemonicIndex(0);
    CellConstraints cc = new CellConstraints();
    pnlMain.add(lblSearch, cc.xy(2, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    btnSearch = new JButton();
    btnSearch.setText("Buscar");
    btnSearch.setMnemonic('B');
    btnSearch.setDisplayedMnemonicIndex(0);
    pnlMain.add(btnSearch, cc.xy(7, 3));
    footerPanel.setLayout(
            new FormLayout("fill:73dlu:noGrow,left:191dlu:noGrow,fill:48dlu:noGrow", "center:12dlu:noGrow"));
    pnlMain.add(footerPanel, cc.xyw(1, 12, 8, CellConstraints.DEFAULT, CellConstraints.FILL));
    lblF10 = new JLabel();
    lblF10.setText(" [F10] Aceptar");
    footerPanel.add(lblF10, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    lblEsc = new JLabel();
    lblEsc.setText(" [Esc] Salir");
    footerPanel.add(lblEsc, cc.xy(3, 1));
    sepCriterioBusqueda.setSeparatorTitle("Criterio de Bsqueda");
    pnlMain.add(sepCriterioBusqueda, cc.xyw(1, 1, 8, CellConstraints.FILL, CellConstraints.FILL));
    pnlTitGrid.setLayout(
            new FormLayout("fill:204dlu:noGrow,left:88dlu:noGrow,fill:15dlu:noGrow", "center:12dlu:noGrow"));
    pnlMain.add(pnlTitGrid, cc.xyw(1, 7, 8, CellConstraints.FILL, CellConstraints.FILL));
    lblTitGrid = new JLabel();
    lblTitGrid.setText(" Relacin :");
    lblTitGrid.setDisplayedMnemonic('R');
    lblTitGrid.setDisplayedMnemonicIndex(1);
    pnlTitGrid.add(lblTitGrid, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    chkSel = new JCheckBox();
    chkSel.setBackground(new Color(-16747105));
    chkSel.setText("");
    pnlTitGrid.add(chkSel, cc.xy(3, 1));
    final JScrollPane scrollPane1 = new JScrollPane();
    scrollPane1.setMinimumSize(new Dimension(454, 418));
    pnlMain.add(scrollPane1, cc.xyw(1, 8, 8, CellConstraints.FILL, CellConstraints.FILL));
    tblGrid = new JTable();
    tblGrid.setMinimumSize(new Dimension(450, 400));
    scrollPane1.setViewportView(tblGrid);
    final JLabel label1 = new JLabel();
    label1.setText(" Nmero de Registros:");
    pnlMain.add(label1, cc.xyw(1, 10, 3));
    lblNumRegistros = new JLabel();
    lblNumRegistros.setText("Label");
    pnlMain.add(lblNumRegistros, cc.xyw(4, 10, 3));
    txtSearch = new JTextField();
    pnlMain.add(txtSearch, cc.xyw(4, 3, 2, CellConstraints.FILL, CellConstraints.DEFAULT));
    lblSearch2 = new JLabel();
    lblSearch2.setText("Descripcin2");
    lblSearch2.setDisplayedMnemonic('D');
    lblSearch2.setDisplayedMnemonicIndex(0);
    pnlMain.add(lblSearch2, cc.xy(2, 5, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    cmbAlmacen = new JComboBox();
    pnlMain.add(cmbAlmacen, cc.xy(4, 5));
    lblSearch.setLabelFor(txtSearch);
    lblSearch2.setLabelFor(txtSearch);
}

From source file:com.devdaily.justwrite.view.OpenRecentFileDialog.java

License:Open Source License

private void doLayoutForm() {
    FormLayout layout = new FormLayout("fill:pref, 3dlu, fill:80dlu:grow, 3dlu, left:pref",
            "pref, 6dlu, pref, 6dlu, pref");
    JPanel panel = new JPanel();
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel);
    builder.setDefaultDialogBorder();//  w ww .j  ava  2 s . co  m
    CellConstraints cc = new CellConstraints();

    builder.addSeparator("Recent Files", cc.xyw(1, 1, 5));
    builder.add(scrollPane, cc.xyw(1, 3, 5));
    builder.add(ButtonBarFactory.buildCenteredBar(cancelButton, okButton),
            cc.xy(3, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));
    //builder.add(okButton, cc.xy(3,5,CellConstraints.CENTER, CellConstraints.DEFAULT));
    this.setContentPane(builder.getPanel());
}