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) 

Source Link

Document

Sets column and row origins; sets width and height to 1; uses the default alignments.

Examples:

 cc.xy(1, 1); cc.xy(1, 3); 

Usage

From source file:com.devdaily.heidi.ApplyLicenseDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    headerTitle = new JLabel();
    headerHelpText = new JLabel();
    fileTextfieldLabel = new JLabel();
    fileTextField = new JTextField();
    browseButton = new JButton();
    ///*from  www  .j av  a  2  s .c om*/
    // AJA
    // 
    //needALicenseLabel = new JLabel();
    buttonBar = new JPanel();
    cancelButton = new JButton();
    applyLicenseButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    //
    // AJA
    //
    setTitle("Hyde Licensing");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.PARAGRAPH_GAP_ROWSPEC }));

            //---- headerTitle ----
            headerTitle.setText("Licensing");
            headerTitle.setFont(new Font("Lucida Grande", Font.BOLD, 14));
            contentPanel.add(headerTitle, cc.xywh(1, 1, 5, 1));

            //---- headerHelpText ----
            headerHelpText.setText("Select the license file from your system, and click \"Apply License\".");
            contentPanel.add(headerHelpText, cc.xywh(1, 3, 5, 1));

            //---- fileTextfieldLabel ----
            fileTextfieldLabel.setText("Choose license file:");
            contentPanel.add(fileTextfieldLabel, cc.xywh(1, 7, 5, 1));
            contentPanel.add(fileTextField, cc.xywh(1, 9, 4, 1));

            //---- browseButton ----
            browseButton.setText("Browse...");
            contentPanel.add(browseButton, cc.xy(5, 9));

            //---- needALicenseLabel ----
            //
            // AJA
            // 
            //needALicenseLabel.setText("Need a license? Click here to get started.");
            needALicenseLabel.setForeground(Color.gray);
            contentPanel.add(needALicenseLabel, cc.xywh(1, 13, 5, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                    FormFactory.MIN_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            buttonBar.add(cancelButton, cc.xy(4, 1));

            //---- applyLicenseButton ----
            applyLicenseButton.setText("Apply License");
            buttonBar.add(applyLicenseButton, cc.xy(6, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.devdaily.heidi.LicenseReminderDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    htmlMessageScrollPane = new JScrollPane();
    htmlMessageArea = new JEditorPane();
    closeButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {/* ww  w.ja  va  2 s  . c om*/
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.GLUE_COLSPEC,
                                            new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW),
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW),
                                            new ColumnSpec(Sizes.dluX(0)), FormFactory.GLUE_COLSPEC },
                                    new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //======== htmlMessageScrollPane ========
            {

                //---- htmlMessageArea ----
                htmlMessageArea.setContentType("text/html");
                htmlMessageArea.setEditable(false);
                htmlMessageArea.setFont(new Font("Monaco", Font.PLAIN, 13));
                htmlMessageArea.setMargin(new Insets(4, 4, 4, 4));
                htmlMessageArea.setMinimumSize(new Dimension(360, 240));
                htmlMessageArea.setPreferredSize(new Dimension(360, 240));
                htmlMessageScrollPane.setViewportView(htmlMessageArea);
            }
            contentPanel.add(htmlMessageScrollPane, cc.xy(3, 3));

            //---- closeButton ----
            closeButton.setText("Close");
            contentPanel.add(closeButton, cc.xywh(3, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

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

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    fontColorSwatch = new JLabel();
    fontColorLabel = new JLabel();
    backgroundColorSwatch = new JLabel();
    backgroundColorLabel = new JLabel();
    textAreaScrollPane = new JScrollPane();
    sampleTextArea = new JTextPane();
    buttonBar = new JPanel();
    resetButton = new JButton();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("Modify the Editor Colors");
    setResizable(false);/*from  ww  w  .  j  a v  a  2  s  .  c  o m*/
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setPreferredSize(new Dimension(388, 237));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                    new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.PARAGRAPH_GAP_ROWSPEC,
                            new RowSpec(RowSpec.CENTER, Sizes.PREFERRED, FormSpec.DEFAULT_GROW),
                            FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //---- fontColorSwatch ----
            fontColorSwatch.setPreferredSize(new Dimension(60, 20));
            fontColorSwatch.setForeground(Color.green);
            fontColorSwatch.setBackground(Color.green);
            fontColorSwatch.setOpaque(true);
            fontColorSwatch.setBorder(new EtchedBorder());
            fontColorSwatch.setToolTipText("Click to change the font color");
            contentPanel.add(fontColorSwatch, cc.xy(3, 3));

            //---- fontColorLabel ----
            fontColorLabel.setText("Font Color");
            fontColorLabel.setToolTipText("Click to change the font color");
            contentPanel.add(fontColorLabel, cc.xy(5, 3));

            //---- backgroundColorSwatch ----
            backgroundColorSwatch.setPreferredSize(new Dimension(60, 20));
            backgroundColorSwatch.setBackground(Color.black);
            backgroundColorSwatch.setOpaque(true);
            backgroundColorSwatch.setBorder(new MatteBorder(1, 1, 1, 1, Color.black));
            backgroundColorSwatch.setToolTipText("Click to change the background color");
            contentPanel.add(backgroundColorSwatch, cc.xy(3, 5));

            //---- backgroundColorLabel ----
            backgroundColorLabel.setText("Background Color");
            backgroundColorLabel.setToolTipText("Click to change the background color");
            contentPanel.add(backgroundColorLabel, cc.xy(5, 5));

            //======== textAreaScrollPane ========
            {
                textAreaScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
                textAreaScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                textAreaScrollPane.setToolTipText("This is an example of your colors with the current font.");
                textAreaScrollPane.setPreferredSize(new Dimension(300, 60));

                //---- sampleTextArea ----
                sampleTextArea.setText("Four score and seven years ago");
                sampleTextArea.setEditable(false);
                sampleTextArea.setPreferredSize(new Dimension(200, 60));
                sampleTextArea.setToolTipText("Sample area to demonstrate your color choices");
                textAreaScrollPane.setViewportView(sampleTextArea);
            }
            contentPanel.add(textAreaScrollPane, cc.xywh(3, 7, 3, 2));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(new FormLayout(
                    new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                            FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC,
                            FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC },
                    RowSpec.decodeSpecs("pref")));

            //---- resetButton ----
            resetButton.setText("Reset");
            resetButton.setToolTipText("Reset to the system default colors");
            buttonBar.add(resetButton, cc.xy(2, 1));

            //---- okButton ----
            okButton.setText("OK");
            okButton.setToolTipText("Accept your color changes");
            buttonBar.add(okButton, cc.xy(4, 1));

            //---- cancelButton ----
            cancelButton.setText("Cancel");
            cancelButton.setToolTipText("Cancel your color changes");
            buttonBar.add(cancelButton, cc.xy(6, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

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

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    scrollPane = new JScrollPane();

    // NEW - this was a JTextPane
    DocumentLookAhead lookAhead = new DocumentLookAhead();
    editorPane = new LookAheadTextPane(lookAhead);

    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBackground(Color.black);/*from  ww w  .  j a v a 2 s  . c om*/
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout(
            new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.30000000000000004),
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("660px"),
                    FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.30000000000000004) },
            new RowSpec[] {
                    // NEW
                    new RowSpec("96px"), FormFactory.LINE_GAP_ROWSPEC,
                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                    FormFactory.LINE_GAP_ROWSPEC, new RowSpec("60px") }));

    //======== scrollPane ========
    {
        scrollPane.setBackground(Color.black);
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane.setAutoscrolls(true);
        scrollPane.setBorder(null);
        scrollPane.setFocusable(false);
        scrollPane.setRequestFocusEnabled(false);
        scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane.setViewportBorder(null);

        //---- editorPane ----
        editorPane.setBackground(new Color(12, 12, 12));
        editorPane.setForeground(Color.green);
        editorPane.setFont(new Font("Monaco", Font.PLAIN, 13));
        editorPane.setCaretColor(Color.green);
        editorPane.setSelectedTextColor(Color.green);
        editorPane.setBorder(null);
        editorPane.setSelectionColor(Color.darkGray);
        scrollPane.setViewportView(editorPane);
    }
    contentPane.add(scrollPane, cc.xy(3, 3));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.facetoe.jreader.ui.NewProfileWindow.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  w  w .j a va2s .  c o  m*/
 */
private void $$$setupUI$$$() {
    parentPanel = new JPanel();
    parentPanel.setLayout(new FormLayout("fill:d:grow",
            "center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:grow,top:4dlu: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"));
    parentPanel
            .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null));
    pnlName = new JPanel();
    pnlName.setLayout(new FormLayout("fill:104px:noGrow,left:17dlu:noGrow,fill:d:grow",
            "center:d:noGrow,top:4dlu:noGrow,center:d:grow"));
    CellConstraints cc = new CellConstraints();
    parentPanel.add(pnlName, cc.xy(1, 5));
    pnlName.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
    txtName = new JTextField();
    txtName.setPreferredSize(new Dimension(350, 20));
    txtName.setToolTipText("Name for this profile");
    pnlName.add(txtName, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.FILL));
    final JLabel label1 = new JLabel();
    label1.setText("Profile Name:");
    pnlName.add(label1, cc.xy(1, 1));
    final Spacer spacer1 = new Spacer();
    pnlName.add(spacer1, cc.xy(3, 3, CellConstraints.DEFAULT, CellConstraints.FILL));
    pnlDocs = new JPanel();
    pnlDocs.setLayout(new FormLayout(
            "fill:101px:noGrow,left:19dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "center:d:noGrow"));
    parentPanel.add(pnlDocs, cc.xy(1, 7));
    pnlDocs.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
    final JLabel label2 = new JLabel();
    label2.setPreferredSize(new Dimension(300, 14));
    label2.setText("Javadoc Directory:");
    pnlDocs.add(label2, cc.xyw(1, 1, 2));
    txtDocs = new JTextField();
    txtDocs.setText("");
    txtDocs.setToolTipText("Path to the Javadocs");
    pnlDocs.add(txtDocs, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    btnDocs = new JButton();
    btnDocs.setText("...");
    btnDocs.setToolTipText("Choose directory");
    pnlDocs.add(btnDocs, cc.xy(5, 1));
    pnlSrc = new JPanel();
    pnlSrc.setLayout(new FormLayout(
            "fill:101px:noGrow,left:19dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "center:d:noGrow"));
    parentPanel.add(pnlSrc, cc.xy(1, 9));
    pnlSrc.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
    final JLabel label3 = new JLabel();
    label3.setPreferredSize(new Dimension(300, 14));
    label3.setText("Source Directory:");
    pnlSrc.add(label3, cc.xyw(1, 1, 2));
    txtSrc = new JTextField();
    txtSrc.setToolTipText("Path to the source code");
    pnlSrc.add(txtSrc, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    btnSrc = new JButton();
    btnSrc.setText("...");
    btnSrc.setToolTipText("Choose directory");
    pnlSrc.add(btnSrc, cc.xy(5, 1));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(
            new FormLayout("fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:d:noGrow"));
    parentPanel.add(panel1, cc.xy(1, 11));
    btnOK = new JButton();
    btnOK.setText("OK");
    panel1.add(btnOK, cc.xy(1, 1));
    btnCancel = new JButton();
    btnCancel.setText("Cancel");
    panel1.add(btnCancel, cc.xy(3, 1));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new FormLayout("fill:d:grow",
            "center:d:grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow"));
    parentPanel.add(panel2, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    final JLabel label4 = new JLabel();
    label4.setFont(new Font(label4.getFont().getName(), Font.BOLD, label4.getFont().getSize()));
    label4.setText("Select a name, source and documentation directory for this profile.");
    panel2.add(label4, cc.xy(1, 3));
    progressBar = new JProgressBar();
    progressBar.setVerifyInputWhenFocusTarget(true);
    progressBar.setVisible(false);
    panel2.add(progressBar, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.DEFAULT));
    lblStatus = new JLabel();
    lblStatus.setText("Preparing to parse...");
    lblStatus.setVisible(false);
    panel2.add(lblStatus, cc.xy(1, 7));
    final Spacer spacer2 = new Spacer();
    parentPanel.add(spacer2, cc.xy(1, 3, CellConstraints.DEFAULT, CellConstraints.FILL));
}

From source file:com.gui.account.AccountEditorDialog.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("com.resource.locale");
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    editorPane = new JPanel();
    editorContent = new JPanel();
    separator1 = compFactory.createSeparator(bundle.getString("AccountEditorDialog.separator1.text"));
    label1 = new JLabel();
    textField1 = BasicComponentFactory/*from   w  w w . j  a v a2  s  .  co m*/
            .createTextField(this.accountPresentationModel.getBufferedModel("pseudo"));
    label2 = new JLabel();
    textField2 = BasicComponentFactory
            .createTextField(this.accountPresentationModel.getBufferedModel("password"));
    separator2 = compFactory.createSeparator(bundle.getString("AccountEditorDialog.separator2.text"));
    label3 = new JLabel();
    textField3 = BasicComponentFactory
            .createTextField(this.accountPresentationModel.getBufferedModel("description"));
    label4 = new JLabel();
    textField4 = BasicComponentFactory
            .createTextField(this.accountPresentationModel.getBufferedModel("initDate"));
    label5 = new JLabel();
    textField5 = new JTextField();
    editorButtons = new JPanel();
    editorOk = new JButton();
    editorCancel = new JButton();
    actionOk = new EditorOk();
    actionCancel = new EditorCancel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("AccountEditorDialog.this.title"));
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== editorPane ========
    {
        editorPane.setBorder(Borders.DIALOG_BORDER);
        editorPane.setLayout(new BorderLayout());

        //======== editorContent ========
        {
            editorContent.setBorder(Borders.DLU4_BORDER);
            editorContent.setLayout(new FormLayout("right:[50dlu,default], $lcgap, [100dlu,default]",
                    "6*(default, $lgap), default"));
            editorContent.add(separator1, cc.xywh(1, 1, 3, 1));

            //---- label1 ----
            label1.setText(bundle.getString("AccountEditorDialog.label1.text"));
            editorContent.add(label1, cc.xy(1, 3));
            editorContent.add(textField1, cc.xy(3, 3));

            //---- label2 ----
            label2.setText(bundle.getString("AccountEditorDialog.label2.text"));
            editorContent.add(label2, cc.xy(1, 5));
            editorContent.add(textField2, cc.xy(3, 5));
            editorContent.add(separator2, cc.xywh(1, 7, 3, 1));

            //---- label3 ----
            label3.setText(bundle.getString("AccountEditorDialog.label3.text"));
            editorContent.add(label3, cc.xy(1, 9));
            editorContent.add(textField3, cc.xy(3, 9));

            //---- label4 ----
            label4.setText(bundle.getString("AccountEditorDialog.label4.text"));
            editorContent.add(label4, cc.xy(1, 11));

            //---- textField4 ----
            textField4.setEditable(false);
            editorContent.add(textField4, cc.xy(3, 11));

            //---- label5 ----
            label5.setText(bundle.getString("AccountEditorDialog.label5.text"));
            editorContent.add(label5, cc.xy(1, 13));

            //---- textField5 ----
            textField5.setEditable(false);
            editorContent.add(textField5, cc.xy(3, 13));
        }
        editorPane.add(editorContent, BorderLayout.CENTER);

        //======== editorButtons ========
        {
            editorButtons.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            editorButtons.setLayout(new FormLayout("$glue, $button, $rgap, $button", "pref"));

            //---- editorOk ----
            editorOk.setMnemonic(bundle.getString("AccountEditorDialog.editorOk.mnemonic").charAt(0));
            editorOk.setAction(actionOk);
            editorButtons.add(editorOk, cc.xy(2, 1));

            //---- editorCancel ----
            editorCancel.setMnemonic(bundle.getString("AccountEditorDialog.editorCancel.mnemonic").charAt(0));
            editorCancel.setAction(actionCancel);
            editorButtons.add(editorCancel, cc.xy(4, 1));
        }
        editorPane.add(editorButtons, BorderLayout.SOUTH);
    }
    contentPane.add(editorPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.gui.IHM.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Van Fanel
    ResourceBundle bundle = ResourceBundle.getBundle("com.resource.locale");
    menuTop = new JMenuBar();
    menu1 = new JMenu();
    menuItem1 = new JMenuItem();
    menuItem2 = new JMenuItem();
    menu2 = new JMenu();
    menuItem6 = new JMenuItem();
    menu3 = new JMenu();
    menuItem5 = new JMenuItem();
    menu4 = new JMenu();
    menu5 = new JMenu();
    menuItem4 = new JMenuItem();
    menu6 = new JMenu();
    menuItem3 = new JMenuItem();
    uIFSplitPane1 = new UIFSplitPane();
    frameLeft = new SimpleInternalFrame();
    tabsLeft = new JTabbedPane();
    uIFSplitPane2 = new UIFSplitPane();
    uIFSplitPane3 = new UIFSplitPane();
    frameCenter = new SimpleInternalFrame();
    tabsCenter = new JTabbedPane();
    panelGoban = new JPanel();
    frameRight = new SimpleInternalFrame();
    tabsRight = new JTabbedPane();
    frameBottom = new SimpleInternalFrame();
    tabsBottom = new JTabbedPane();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("IHM.this.title"));
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("[1010px,default]", "[710px,default]"));

    //======== menuTop ========
    {// w  ww . ja v a2 s. com

        //======== menu1 ========
        {
            menu1.setText(bundle.getString("IHM.menu1.text"));

            //---- menuItem1 ----
            menuItem1.setText(bundle.getString("IHM.menuItem1.text"));
            menu1.add(menuItem1);

            //---- menuItem2 ----
            menuItem2.setText(bundle.getString("IHM.menuItem2.text"));
            menu1.add(menuItem2);
        }
        menuTop.add(menu1);

        //======== menu2 ========
        {
            menu2.setText(bundle.getString("IHM.menu2.text"));

            //---- menuItem6 ----
            menuItem6.setText(bundle.getString("IHM.menuItem6.text"));
            menu2.add(menuItem6);
        }
        menuTop.add(menu2);

        //======== menu3 ========
        {
            menu3.setText(bundle.getString("IHM.menu3.text"));

            //---- menuItem5 ----
            menuItem5.setText(bundle.getString("IHM.menuItem5.text"));
            menu3.add(menuItem5);
        }
        menuTop.add(menu3);

        //======== menu4 ========
        {
            menu4.setText(bundle.getString("IHM.menu4.text"));
        }
        menuTop.add(menu4);

        //======== menu5 ========
        {
            menu5.setText(bundle.getString("IHM.menu5.text"));

            //---- menuItem4 ----
            menuItem4.setText(bundle.getString("IHM.menuItem4.text"));
            menu5.add(menuItem4);
        }
        menuTop.add(menu5);

        //======== menu6 ========
        {
            menu6.setText(bundle.getString("IHM.menu6.text"));

            //---- menuItem3 ----
            menuItem3.setText(bundle.getString("IHM.menuItem3.text"));
            menu6.add(menuItem3);
        }
        menuTop.add(menu6);
    }
    setJMenuBar(menuTop);

    //======== uIFSplitPane1 ========
    {

        //======== frameLeft ========
        {
            frameLeft.setTitle(bundle.getString("IHM.frameLeft.title"));

            // JFormDesigner evaluation mark
            frameLeft.setBorder(new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    frameLeft.getBorder()));
            frameLeft.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent e) {
                    if ("border".equals(e.getPropertyName()))
                        throw new RuntimeException();
                }
            });

            Container frameLeftContentPane = frameLeft.getContentPane();
            frameLeftContentPane.setLayout(new FormLayout("default", "default"));
            frameLeftContentPane.add(tabsLeft, cc.xy(1, 1));
        }
        uIFSplitPane1.setLeftComponent(frameLeft);

        //======== uIFSplitPane2 ========
        {
            uIFSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);

            //======== uIFSplitPane3 ========
            {

                //======== frameCenter ========
                {
                    frameCenter.setTitle(bundle.getString("IHM.frameCenter.title"));
                    Container frameCenterContentPane = frameCenter.getContentPane();
                    frameCenterContentPane.setLayout(new FormLayout("default", "default"));

                    //======== tabsCenter ========
                    {

                        //======== panelGoban ========
                        {
                            panelGoban.setLayout(new GridBagLayout());
                            ((GridBagLayout) panelGoban.getLayout()).columnWidths = new int[] { 0, 0, 0, 0, 0,
                                    0, 0, 0, 0, 0, 0, 0, 0, 0 };
                            ((GridBagLayout) panelGoban.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0, 0,
                                    0, 0, 0, 0, 0, 0, 0, 0 };
                            ((GridBagLayout) panelGoban.getLayout()).columnWeights = new double[] { 0.0, 0.0,
                                    0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
                            ((GridBagLayout) panelGoban.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0,
                                    0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
                        }
                        tabsCenter.addTab(bundle.getString("IHM.panelGoban.tab.title"), panelGoban);

                    }
                    frameCenterContentPane.add(tabsCenter, cc.xy(1, 1));
                }
                uIFSplitPane3.setLeftComponent(frameCenter);

                //======== frameRight ========
                {
                    frameRight.setTitle(bundle.getString("IHM.frameRight.title"));
                    Container frameRightContentPane = frameRight.getContentPane();
                    frameRightContentPane.setLayout(new FormLayout("default", "default"));
                    frameRightContentPane.add(tabsRight, cc.xy(1, 1));
                }
                uIFSplitPane3.setRightComponent(frameRight);
            }
            uIFSplitPane2.setTopComponent(uIFSplitPane3);

            //======== frameBottom ========
            {
                frameBottom.setTitle(bundle.getString("IHM.frameBottom.title"));
                Container frameBottomContentPane = frameBottom.getContentPane();
                frameBottomContentPane.setLayout(new FormLayout("default", "default"));
                frameBottomContentPane.add(tabsBottom, cc.xy(1, 1));
            }
            uIFSplitPane2.setBottomComponent(frameBottom);
        }
        uIFSplitPane1.setRightComponent(uIFSplitPane2);
    }
    contentPane.add(uIFSplitPane1, cc.xy(1, 1));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.imaginea.betterdocs.BetterDocsSettings.java

License:Apache License

@Nullable
@Override/*from   w  ww . ja  v  a 2 s  . com*/
public JComponent createComponent() {
    FormLayout layout = new FormLayout(COLUMN_SPECS, ROW_SPECS);

    PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();

    CellConstraints cc = new CellConstraints();

    JLabel esURL = new JLabel(ELASTIC_SEARCH_URL);
    esURL.setVisible(true);

    JLabel size = new JLabel(RESULTS_SIZE);
    size.setVisible(true);

    JLabel distance = new JLabel(DISTANCE_FROM_CURSOR);
    distance.setVisible(true);

    esURLText = new JTextField();
    esURLText.setEditable(true);
    esURLText.setVisible(true);

    if (propertiesComponent.isValueSet(BetterDocsAction.ES_URL)) {
        esURLText.setText(propertiesComponent.getValue(BetterDocsAction.ES_URL));
    } else {
        esURLText.setText(BetterDocsAction.ES_URL_DEFAULT);
    }

    sizeText = new JTextField();
    sizeText.setEditable(true);
    sizeText.setVisible(true);

    sizeText.setText(propertiesComponent.getValue(BetterDocsAction.SIZE,
            String.valueOf(BetterDocsAction.SIZE_DEFAULT_VALUE)));

    distanceText = new JTextField();
    distanceText.setEditable(true);
    distanceText.setVisible(true);

    distanceText.setText(propertiesComponent.getValue(BetterDocsAction.DISTANCE,
            String.valueOf(BetterDocsAction.DISTANCE_DEFAULT_VALUE)));

    JPanel jPanel = new JPanel(layout);
    jPanel.add(esURL, cc.xy(1, 3));
    jPanel.add(esURLText, cc.xy(2, 3));
    jPanel.add(size, cc.xy(1, 2));
    jPanel.add(sizeText, cc.xy(2, 2));
    jPanel.add(distance, cc.xy(1, 1));
    jPanel.add(distanceText, cc.xy(2, 1));

    return jPanel;
}

From source file:com.imaginea.betterdocs.BetterDocsWindow.java

License:Apache License

@Override
public void createToolWindowContent(Project project, ToolWindow toolWindow) {
    toolWindow.setIcon(Messages.getInformationIcon());
    DefaultMutableTreeNode root = new DefaultMutableTreeNode(PROJECTS);

    JTree jTree = new JTree(root);
    jTree.setVisible(false);/*from   ww w. j  av  a 2 s .c  o  m*/
    jTree.setAutoscrolls(true);
    jTree.setForeground(new JBColor(new Color(100, 155, 155), new Color(100, 155, 155)));

    Document document = EditorFactory.getInstance().createDocument("");
    Editor windowEditor = EditorFactory.getInstance().createEditor(document, project,
            FileTypeManager.getInstance().getFileTypeByExtension("java"), false);

    BetterDocsAction action = new BetterDocsAction();
    action.setTree(jTree);
    action.setWindowEditor(windowEditor);

    DefaultActionGroup group = new DefaultActionGroup();
    group.add(action);
    JComponent toolBar = ActionManager.getInstance().createActionToolbar("BetterDocs", group, true)
            .getComponent();

    EditorToggleAction toggleAction = new EditorToggleAction();
    DefaultActionGroup moveGroup = new DefaultActionGroup();
    moveGroup.add(toggleAction);

    FormLayout layout = new FormLayout(PREF_PREF_GROW, PREF_PREF);

    CellConstraints cc = new CellConstraints();

    JBScrollPane jTreeScrollPane = new JBScrollPane();
    jTreeScrollPane.setViewportView(jTree);
    jTreeScrollPane.setAutoscrolls(true);
    jTreeScrollPane.setBackground(new Color(255, 0, 0));
    jTreeScrollPane.setPreferredSize(new Dimension(200, 300));

    JPanel jPanel = new JPanel(layout);
    jPanel.setVisible(true);
    jPanel.add(toolBar, cc.xy(1, 1));
    jPanel.add(jTreeScrollPane, cc.xy(2, 1));

    JBScrollPane jbScrollPane = new JBScrollPane();
    jbScrollPane.setViewportView(windowEditor.getComponent());

    final JSplitPane jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, jbScrollPane, jPanel);
    jSplitPane.setDividerLocation(0.5);
    toggleAction.setjSplitPane(jSplitPane);

    toolWindow.getComponent().getParent().add(jSplitPane);
}

From source file:com.isencia.passerelle.hmi.form.CheckableComponent.java

License:Open Source License

public CheckableComponent(Component c, Object subject, boolean isChecked) {
    super(new FormLayout("pref,10px,pref", "pref"));
    this.checkedComponent = c;
    this.checkBox = new JCheckBox();
    this.subject = subject;
    checkBox.setSelected(isChecked);//from   w  ww.j a va 2  s.  c  o  m
    checkBox.addActionListener(new ComponentVisualizer());

    // for some reason, if we put it as not visible here
    // the component can not be set visible later on
    // when we're checking the checkbox...
    checkedComponent.setEnabled(isChecked);
    CellConstraints cc = new CellConstraints();
    add(this.checkBox, cc.xy(1, 1));
    add(this.checkedComponent, cc.xy(3, 1));
}