Example usage for com.jgoodies.forms.layout Sizes bounded

List of usage examples for com.jgoodies.forms.layout Sizes bounded

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout Sizes bounded.

Prototype

public static Size bounded(Size basis, Size lowerBound, Size upperBound) 

Source Link

Document

Creates and returns a BoundedSize for the given basis using the specified lower and upper bounds.

Usage

From source file:org.archiviststoolkit.dialog.UserPreferencesDialog.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    panel2 = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    panel1 = new JPanel();
    contentPanel = new JPanel();
    label1 = new JLabel();
    connectionUrl = new JComboBox();
    label2 = new JLabel();
    userName = new JTextField();
    label3 = new JLabel();
    password = new JPasswordField();
    label4 = new JLabel();
    databaseTypes = ATBasicComponentFactory.createUnboundComboBox(SessionFactory.getDatabaseTypesList(true));
    buttonBar = new JPanel();
    openDBFileButton = new JButton();
    saveButton = new JButton();
    okButton = new JButton();
    cancelButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setModal(true);/*from  ww  w  .  ja va 2 s .  co  m*/
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setPreferredSize(new Dimension(600, 238));
        dialogPane.setMinimumSize(new Dimension(600, 238));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== panel2 ========
            {
                panel2.setBackground(new Color(80, 69, 57));
                panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Administration");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                panel2.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel2, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Connection Settings");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== panel1 ========
        {
            panel1.setOpaque(false);
            panel1.setBorder(Borders.DIALOG_BORDER);
            panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("max(default;400px):grow"), new RowSpec[] {
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //======== contentPanel ========
            {
                contentPanel.setBorder(
                        new TitledBorder(null, "Database Properties", TitledBorder.LEADING, TitledBorder.TOP));
                contentPanel.setOpaque(false);
                contentPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.MINIMUM, 0.1),
                                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW) },
                                        new RowSpec[] { FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                                FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

                //---- label1 ----
                label1.setText("Connection URL");
                contentPanel.add(label1, new CellConstraints(1, 1, 1, 1, CellConstraints.FILL,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));

                //---- connectionUrl ----
                connectionUrl.setEditable(true);
                connectionUrl.addItemListener(new ItemListener() {
                    public void itemStateChanged(ItemEvent e) {
                        updateConnectionUrlInformation();
                    }
                });
                contentPanel.add(connectionUrl, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));

                //---- label2 ----
                label2.setText("Username");
                contentPanel.add(label2, new CellConstraints(1, 3, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));
                contentPanel.add(userName, new CellConstraints(3, 3, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));

                //---- label3 ----
                label3.setText("Password");
                contentPanel.add(label3, new CellConstraints(1, 5, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));
                contentPanel.add(password, new CellConstraints(3, 5, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));

                //---- label4 ----
                label4.setText("Database Type");
                contentPanel.add(label4, new CellConstraints(1, 7, 1, 1, CellConstraints.DEFAULT,
                        CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));

                //---- databaseTypes ----
                databaseTypes.setOpaque(false);
                databaseTypes.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        databaseTypesActionPerformed();
                    }
                });
                contentPanel.add(databaseTypes, cc.xy(3, 7, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            panel1.add(contentPanel, cc.xy(1, 1));

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

                //---- openDBFileButton ----
                openDBFileButton.setText("Open Internal Database File");
                openDBFileButton.setVisible(false);
                openDBFileButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        openDBFileButtonActionPerformed();
                    }
                });
                buttonBar.add(openDBFileButton, cc.xy(2, 1));

                //---- saveButton ----
                saveButton.setText("Save");
                saveButton.setOpaque(false);
                saveButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        storeConnectionUrlInformation();
                    }
                });
                buttonBar.add(saveButton, cc.xy(4, 1));

                //---- okButton ----
                okButton.setText("OK");
                okButton.setOpaque(false);
                okButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        okButtonActionPerformed(e);
                    }
                });
                buttonBar.add(okButton, cc.xy(6, 1));

                //---- cancelButton ----
                cancelButton.setText("Cancel");
                cancelButton.setOpaque(false);
                cancelButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        cancelButtonActionPerformed(e);
                    }
                });
                buttonBar.add(cancelButton, cc.xy(8, 1));
            }
            panel1.add(buttonBar, cc.xy(1, 3));
        }
        dialogPane.add(panel1, BorderLayout.CENTER);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.editor.rde.RapidResourceComponentDataEntry.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    panel2 = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPanel = new JPanel();
    panel4 = new JPanel();
    label_resourcesLevel = new JLabel();
    level = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils
            .getLookupListValues(ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_LEVEL));
    internalOnly = new JCheckBox();
    restrictionsApply = new JCheckBox();
    panel13 = new JPanel();
    label_resourcesTitle2 = new JLabel();
    componentTitle = new JTextField();
    label_resourcesLevel2 = new JLabel();
    componentUniqueIdentifier = new JTextField();
    panel5 = new JPanel();
    label_resourcesDateExpression = new JLabel();
    dateExpression = new JTextField();
    label_resourcesDateBegin = new JLabel();
    dateBegin = ATBasicComponentFactory.createUnboundIntegerField(false);
    label_resourcesDateEnd = new JLabel();
    dateEnd = ATBasicComponentFactory.createUnboundIntegerField(false);
    panel6 = new JPanel();
    label_resourcesExtentNumber = new JLabel();
    extent = ATBasicComponentFactory.createUnboundDoubleField();
    label_resourcesExtentNumber2 = new JLabel();
    extentType = ATBasicComponentFactory.createUnboundComboBox(
            LookupListUtils.getLookupListValues(Resources.class, Resources.PROPERTYNAME_EXTENT_TYPE));
    separator3 = new JSeparator();
    panel9 = new JPanel();
    label_resourcesExtentNumber4 = new JLabel();
    noteType1 = ATBasicComponentFactory.createUnboundComboBox(NoteEtcTypesUtils.getNotesOnlyTypesList(true));
    scrollPane1 = new JScrollPane();
    note1 = new JTextArea();
    separator4 = new JSeparator();
    panel10 = new JPanel();
    label_resourcesExtentNumber6 = new JLabel();
    noteType2 = ATBasicComponentFactory.createUnboundComboBox(NoteEtcTypesUtils.getNotesOnlyTypesList(true));
    scrollPane2 = new JScrollPane();
    note2 = new JTextArea();
    separator5 = new JSeparator();
    panel11 = new JPanel();
    label_resourcesExtentNumber7 = new JLabel();
    noteType3 = ATBasicComponentFactory.createUnboundComboBox(NoteEtcTypesUtils.getNotesOnlyTypesList(true));
    scrollPane3 = new JScrollPane();
    note3 = new JTextArea();
    separator6 = new JSeparator();
    panel12 = new JPanel();
    label_resourcesExtentNumber3 = new JLabel();
    instanceType = new JComboBox();
    panel7 = new JPanel();
    label_subjectTermType = new JLabel();
    container1Type = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues(
            ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_TYPE));
    label_subjectSource = new JLabel();
    container1Number = ATBasicComponentFactory.createUnboundDoubleField();
    label_subjectSource3 = new JLabel();
    container1AlphaNum = new JTextField();
    panel8 = new JPanel();
    label_subjectTermType2 = new JLabel();
    container2Type = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues(
            ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_TYPE));
    label_subjectSource2 = new JLabel();
    container2Number = ATBasicComponentFactory.createUnboundDoubleField();
    label_subjectSource4 = new JLabel();
    container2AlphaNum = new JTextField();
    panel14 = new JPanel();
    label_resourcesExtentNumber5 = new JLabel();
    barcode = new JTextField();
    panel1 = new JPanel();
    separator2 = new JSeparator();
    buttonPanel = new JPanel();
    cancelButton = new JButton();
    okButton = new JButton();
    okAndAnotherButton = new JButton();
    cancelButtonLabel = new JLabel();
    okButtonLabel = new JLabel();
    okAndAnotherButtonLabel = new JLabel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBackground(new Color(200, 205, 232));
    setModal(true);/*w w  w . j  a va2s.c  o m*/
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new BorderLayout());

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== panel2 ========
            {
                panel2.setBackground(new Color(73, 43, 104));
                panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Resources");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                panel2.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel2, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Rapid Data Entry");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, BorderLayout.NORTH);

        //======== contentPanel ========
        {
            contentPanel.setOpaque(false);
            contentPanel.setBorder(Borders.DIALOG_BORDER);
            contentPanel
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                            FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW) },
                                    new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                                            new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW),
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

            //======== panel4 ========
            {
                panel4.setOpaque(false);
                panel4.setLayout(
                        new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("default")));

                //---- label_resourcesLevel ----
                label_resourcesLevel.setText("Level");
                label_resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesLevel, Resources.class,
                        Resources.PROPERTYNAME_LEVEL);
                panel4.add(label_resourcesLevel,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- level ----
                level.setOpaque(false);
                panel4.add(level, cc.xy(3, 1));

                //---- internalOnly ----
                internalOnly.setText("Internal Only");
                internalOnly.setOpaque(false);
                internalOnly.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                internalOnly.setText(ATFieldInfo.getLabel(ResourcesComponents.class,
                        ResourcesComponents.PROPERTYNAME_INTERNAL_ONLY));
                panel4.add(internalOnly, cc.xy(5, 1));

                //---- restrictionsApply ----
                restrictionsApply.setText("Restrictions Apply");
                restrictionsApply.setOpaque(false);
                restrictionsApply.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                restrictionsApply.setText(ATFieldInfo.getLabel(ResourcesComponents.class,
                        ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY));
                panel4.add(restrictionsApply, cc.xy(7, 1));
            }
            contentPanel.add(panel4, cc.xywh(1, 1, 3, 1));

            //======== panel13 ========
            {
                panel13.setOpaque(false);
                panel13.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesTitle2 ----
                label_resourcesTitle2.setText("Title");
                label_resourcesTitle2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesTitle2, Resources.class,
                        Resources.PROPERTYNAME_TITLE);
                panel13.add(label_resourcesTitle2, cc.xy(1, 1));
                panel13.add(componentTitle, cc.xy(3, 1));
            }
            contentPanel.add(panel13, cc.xywh(1, 3, 3, 1));

            //---- label_resourcesLevel2 ----
            label_resourcesLevel2.setText("Component Unique Identifier");
            label_resourcesLevel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            ATFieldInfo.assignLabelInfo(label_resourcesLevel2, ResourcesComponents.class,
                    ResourcesComponents.PROPERTYNAME_UNIQUE_IDENTIFIER);
            contentPanel.add(label_resourcesLevel2,
                    cc.xywh(1, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
            contentPanel.add(componentUniqueIdentifier, cc.xy(3, 5));

            //======== panel5 ========
            {
                panel5.setOpaque(false);
                panel5.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,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesDateExpression ----
                label_resourcesDateExpression.setText("Date Expression");
                label_resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesDateExpression, Resources.class,
                        Resources.PROPERTYNAME_DATE_EXPRESSION);
                panel5.add(label_resourcesDateExpression,
                        cc.xywh(1, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
                panel5.add(dateExpression, cc.xy(3, 1));

                //---- label_resourcesDateBegin ----
                label_resourcesDateBegin.setText("Begin");
                label_resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesDateBegin, Resources.class,
                        Resources.PROPERTYNAME_DATE_BEGIN);
                panel5.add(label_resourcesDateBegin, cc.xy(5, 1));

                //---- dateBegin ----
                dateBegin.setColumns(5);
                panel5.add(dateBegin, cc.xywh(7, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_resourcesDateEnd ----
                label_resourcesDateEnd.setText("End");
                label_resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesDateEnd, Resources.class,
                        Resources.PROPERTYNAME_DATE_END);
                panel5.add(label_resourcesDateEnd, cc.xy(9, 1));

                //---- dateEnd ----
                dateEnd.setColumns(5);
                panel5.add(dateEnd, cc.xywh(11, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel5, cc.xywh(1, 7, 3, 1));

            //======== panel6 ========
            {
                panel6.setOpaque(false);
                panel6.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                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) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber ----
                label_resourcesExtentNumber.setText("Extent");
                label_resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber, Resources.class,
                        Resources.PROPERTYNAME_EXTENT_NUMBER);
                panel6.add(label_resourcesExtentNumber,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- extent ----
                extent.setColumns(5);
                panel6.add(extent, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_resourcesExtentNumber2 ----
                label_resourcesExtentNumber2.setText("Extent Type");
                label_resourcesExtentNumber2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber2, Resources.class,
                        Resources.PROPERTYNAME_EXTENT_TYPE);
                panel6.add(label_resourcesExtentNumber2,
                        cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- extentType ----
                extentType.setOpaque(false);
                panel6.add(extentType, cc.xywh(7, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel6, cc.xywh(1, 9, 3, 1));

            //---- separator3 ----
            separator3.setBackground(new Color(220, 220, 232));
            separator3.setForeground(new Color(147, 131, 86));
            separator3.setMinimumSize(new Dimension(1, 10));
            separator3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(separator3, cc.xywh(1, 11, 3, 1));

            //======== panel9 ========
            {
                panel9.setOpaque(false);
                panel9.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber4 ----
                label_resourcesExtentNumber4.setText("Note 1");
                label_resourcesExtentNumber4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel9.add(label_resourcesExtentNumber4,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- noteType1 ----
                noteType1.setOpaque(false);
                noteType1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel9.add(noteType1, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel9, cc.xywh(1, 13, 3, 1));

            //======== scrollPane1 ========
            {

                //---- note1 ----
                note1.setRows(4);
                note1.setWrapStyleWord(true);
                note1.setLineWrap(true);
                scrollPane1.setViewportView(note1);
            }
            contentPanel.add(scrollPane1, cc.xywh(1, 15, 3, 1));

            //---- separator4 ----
            separator4.setBackground(new Color(220, 220, 232));
            separator4.setForeground(new Color(147, 131, 86));
            separator4.setMinimumSize(new Dimension(1, 10));
            separator4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(separator4, cc.xywh(1, 17, 3, 1));

            //======== panel10 ========
            {
                panel10.setOpaque(false);
                panel10.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber6 ----
                label_resourcesExtentNumber6.setText("Note 2");
                label_resourcesExtentNumber6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel10.add(label_resourcesExtentNumber6,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- noteType2 ----
                noteType2.setOpaque(false);
                noteType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel10.add(noteType2, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel10, cc.xywh(1, 19, 3, 1));

            //======== scrollPane2 ========
            {

                //---- note2 ----
                note2.setRows(4);
                note2.setWrapStyleWord(true);
                note2.setLineWrap(true);
                scrollPane2.setViewportView(note2);
            }
            contentPanel.add(scrollPane2, cc.xywh(1, 21, 3, 1));

            //---- separator5 ----
            separator5.setBackground(new Color(220, 220, 232));
            separator5.setForeground(new Color(147, 131, 86));
            separator5.setMinimumSize(new Dimension(1, 10));
            separator5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(separator5, cc.xywh(1, 23, 3, 1));

            //======== panel11 ========
            {
                panel11.setOpaque(false);
                panel11.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber7 ----
                label_resourcesExtentNumber7.setText("Note 3");
                label_resourcesExtentNumber7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel11.add(label_resourcesExtentNumber7,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- noteType3 ----
                noteType3.setOpaque(false);
                noteType3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel11.add(noteType3, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel11, cc.xywh(1, 25, 3, 1));

            //======== scrollPane3 ========
            {

                //---- note3 ----
                note3.setRows(4);
                note3.setWrapStyleWord(true);
                note3.setLineWrap(true);
                scrollPane3.setViewportView(note3);
            }
            contentPanel.add(scrollPane3, cc.xywh(1, 27, 3, 1));

            //---- separator6 ----
            separator6.setBackground(new Color(220, 220, 232));
            separator6.setForeground(new Color(147, 131, 86));
            separator6.setMinimumSize(new Dimension(1, 10));
            separator6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.add(separator6, cc.xywh(1, 29, 3, 1));

            //======== panel12 ========
            {
                panel12.setOpaque(false);
                panel12.setLayout(
                        new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber3 ----
                label_resourcesExtentNumber3.setText("Instance Type");
                label_resourcesExtentNumber3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber3, ArchDescriptionInstances.class,
                        ArchDescriptionInstances.PROPERTYNAME_INSTANCE_TYPE);
                panel12.add(label_resourcesExtentNumber3,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

                //---- instanceType ----
                instanceType.setOpaque(false);
                panel12.add(instanceType, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel12, cc.xywh(1, 31, 3, 1));

            //======== panel7 ========
            {
                panel7.setOpaque(false);
                panel7.setPreferredSize(new Dimension(900, 27));
                panel7.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                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) },
                        RowSpec.decodeSpecs("default")));

                //---- label_subjectTermType ----
                label_subjectTermType.setText("Container 1 Type");
                label_subjectTermType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectTermType, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_TYPE);
                panel7.add(label_subjectTermType, cc.xy(1, 1));

                //---- container1Type ----
                container1Type.setOpaque(false);
                panel7.add(container1Type, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_subjectSource ----
                label_subjectSource.setText("Container 1 Numeric Indicator");
                label_subjectSource.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectSource, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_NUMERIC_INDICATOR);
                panel7.add(label_subjectSource, cc.xy(5, 1));

                //---- container1Number ----
                container1Number.setColumns(5);
                panel7.add(container1Number,
                        cc.xywh(7, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_subjectSource3 ----
                label_subjectSource3.setText("Container 1 Alphanumeric Indicator");
                label_subjectSource3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectSource3, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_ALPHA_NUMERIC_INDICATOR);
                panel7.add(label_subjectSource3, cc.xy(9, 1));
                panel7.add(container1AlphaNum,
                        cc.xywh(11, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel7, cc.xywh(1, 33, 3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

            //======== panel8 ========
            {
                panel8.setOpaque(false);
                panel8.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                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) },
                        RowSpec.decodeSpecs("default")));

                //---- label_subjectTermType2 ----
                label_subjectTermType2.setText("Container 2 Type");
                label_subjectTermType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectTermType2, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_TYPE);
                panel8.add(label_subjectTermType2, cc.xy(1, 1));

                //---- container2Type ----
                container2Type.setOpaque(false);
                panel8.add(container2Type, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_subjectSource2 ----
                label_subjectSource2.setText("Container 2 Numeric Indicator");
                label_subjectSource2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectSource2, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_NUMERIC_INDICATOR);
                panel8.add(label_subjectSource2, cc.xy(5, 1));

                //---- container2Number ----
                container2Number.setColumns(5);
                panel8.add(container2Number,
                        cc.xywh(7, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

                //---- label_subjectSource4 ----
                label_subjectSource4.setText("Container 2 Alphanumeric Indicator");
                label_subjectSource4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_subjectSource4, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_ALPHA_NUMERIC_INDICATOR);
                panel8.add(label_subjectSource4, cc.xy(9, 1));
                panel8.add(container2AlphaNum,
                        cc.xywh(11, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel8, cc.xywh(1, 35, 3, 1));

            //======== panel14 ========
            {
                panel14.setOpaque(false);
                panel14.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        RowSpec.decodeSpecs("default")));

                //---- label_resourcesExtentNumber5 ----
                label_resourcesExtentNumber5.setText("Barcode");
                label_resourcesExtentNumber5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber5, ArchDescriptionAnalogInstances.class,
                        ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE);
                panel14.add(label_resourcesExtentNumber5,
                        cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
                panel14.add(barcode, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
            }
            contentPanel.add(panel14, cc.xywh(1, 37, 3, 1));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== panel1 ========
        {
            panel1.setOpaque(false);
            panel1.setBorder(Borders.DLU2_BORDER);
            panel1.setLayout(new FormLayout("default:grow", "default, default:grow"));

            //---- separator2 ----
            separator2.setBackground(new Color(220, 220, 232));
            separator2.setForeground(new Color(147, 131, 86));
            separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            panel1.add(separator2, cc.xy(1, 1));

            //======== buttonPanel ========
            {
                buttonPanel.setBorder(null);
                buttonPanel.setBackground(new Color(200, 205, 232));
                buttonPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.setMinimumSize(new Dimension(380, 60));
                buttonPanel
                        .setLayout(new FormLayout(
                                new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                        FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                                RowSpec.decodeSpecs("default, default")));

                //---- cancelButton ----
                cancelButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/cancel.jpg")));
                cancelButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                cancelButton.setOpaque(false);
                cancelButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        cancelButtonActionPerformed();
                    }
                });
                buttonPanel.add(cancelButton, cc.xy(1, 1));

                //---- okButton ----
                okButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/ok.jpg")));
                okButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                okButton.setOpaque(false);
                okButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        okButtonActionPerformed();
                    }
                });
                buttonPanel.add(okButton, cc.xy(3, 1));

                //---- okAndAnotherButton ----
                okAndAnotherButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/okPlus1.jpg")));
                okAndAnotherButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                okAndAnotherButton.setOpaque(false);
                okAndAnotherButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        okAndAnotherButtonActionPerformed();
                    }
                });
                buttonPanel.add(okAndAnotherButton, cc.xy(5, 1));

                //---- cancelButtonLabel ----
                cancelButtonLabel.setText("Cancel");
                cancelButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(cancelButtonLabel,
                        cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

                //---- okButtonLabel ----
                okButtonLabel.setText("OK");
                okButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(okButtonLabel,
                        cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

                //---- okAndAnotherButtonLabel ----
                okAndAnotherButtonLabel.setText("OK + 1");
                okAndAnotherButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(okAndAnotherButtonLabel,
                        cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
            }
            panel1.add(buttonPanel, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(panel1, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.editor.rde.RapidResourceComponentDataEntry2.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    HeaderPanel = new JPanel();
    panel2 = new JPanel();
    mainHeaderLabel = new JLabel();
    panel3 = new JPanel();
    subHeaderLabel = new JLabel();
    contentPanel = new JPanel();
    temp = new JButton();
    panel1 = new JPanel();
    separator2 = new JSeparator();
    buttonPanel = new JPanel();
    autoSaveCheckBox = new JCheckBox();
    cancelButton = new JButton();
    okButton = new JButton();
    okAndAnotherButton = new JButton();
    cancelButtonLabel = new JLabel();
    okButtonLabel = new JLabel();
    okAndAnotherButtonLabel = new JLabel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBackground(new Color(200, 205, 232));
    setModal(true);//from   ww  w  .  j av  a2s .  c  om
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(null);
        dialogPane.setBackground(new Color(200, 205, 232));
        dialogPane.setLayout(new FormLayout("default:grow", "fill:default, fill:default:grow, fill:default"));

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel
                    .setLayout(new FormLayout(
                            new ColumnSpec[] {
                                    new ColumnSpec(
                                            Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))),
                                    new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                            RowSpec.decodeSpecs("default")));

            //======== panel2 ========
            {
                panel2.setBackground(new Color(73, 43, 104));
                panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel2.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Resources");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                panel2.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel2, cc.xy(1, 1));

            //======== panel3 ========
            {
                panel3.setBackground(new Color(66, 60, 111));
                panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                panel3.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Rapid Data Entry");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                panel3.add(subHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(panel3, cc.xy(2, 1));
        }
        dialogPane.add(HeaderPanel, cc.xy(1, 1));

        //======== contentPanel ========
        {
            contentPanel.setOpaque(false);
            contentPanel.setBorder(Borders.DLU4_BORDER);
            contentPanel.setMaximumSize(new Dimension(1000, 600));
            contentPanel.setBackground(new Color(200, 205, 232));
            contentPanel.setLayout(new FormLayout("center:default:grow", "top:default:grow"));

            //---- temp ----
            temp.setText("text");
            temp.setBackground(new Color(200, 205, 232));
            contentPanel.add(temp, cc.xy(1, 1));
        }
        dialogPane.add(contentPanel, cc.xy(1, 2));

        //======== panel1 ========
        {
            panel1.setOpaque(false);
            panel1.setBorder(Borders.DLU2_BORDER);
            panel1.setLayout(new FormLayout("default:grow", "default, default:grow"));

            //---- separator2 ----
            separator2.setBackground(new Color(220, 220, 232));
            separator2.setForeground(new Color(147, 131, 86));
            separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            panel1.add(separator2, cc.xy(1, 1));

            //======== buttonPanel ========
            {
                buttonPanel.setBorder(null);
                buttonPanel.setBackground(new Color(200, 205, 232));
                buttonPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel
                        .setLayout(
                                new FormLayout(
                                        new ColumnSpec[] {
                                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                        FormSpec.DEFAULT_GROW),
                                                FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                                FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                                FormFactory.UNRELATED_GAP_COLSPEC,
                                                FormFactory.DEFAULT_COLSPEC },
                                        RowSpec.decodeSpecs("default, default")));

                //---- autoSaveCheckBox ----
                autoSaveCheckBox.setText("Auto Save");
                autoSaveCheckBox.setSelected(true);
                autoSaveCheckBox.setOpaque(false);
                buttonPanel.add(autoSaveCheckBox, cc.xy(1, 1));

                //---- cancelButton ----
                cancelButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/cancel.jpg")));
                cancelButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                cancelButton.setOpaque(false);
                cancelButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        cancelButtonActionPerformed();
                    }
                });
                buttonPanel.add(cancelButton, cc.xy(3, 1));

                //---- okButton ----
                okButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/ok.jpg")));
                okButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                okButton.setOpaque(false);
                okButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        okButtonActionPerformed();
                    }
                });
                buttonPanel.add(okButton, cc.xy(5, 1));

                //---- okAndAnotherButton ----
                okAndAnotherButton.setIcon(new ImageIcon(
                        getClass().getResource("/org/archiviststoolkit/resources/images/okPlus1.jpg")));
                okAndAnotherButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                okAndAnotherButton.setOpaque(false);
                okAndAnotherButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        okAndAnotherButtonActionPerformed();
                    }
                });
                buttonPanel.add(okAndAnotherButton, cc.xy(7, 1));

                //---- cancelButtonLabel ----
                cancelButtonLabel.setText("Cancel");
                cancelButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(cancelButtonLabel,
                        cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

                //---- okButtonLabel ----
                okButtonLabel.setText("OK");
                okButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(okButtonLabel,
                        cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

                //---- okAndAnotherButtonLabel ----
                okAndAnotherButtonLabel.setText("+ 1");
                okAndAnotherButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                buttonPanel.add(okAndAnotherButtonLabel,
                        cc.xywh(7, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
            }
            panel1.add(buttonPanel, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        dialogPane.add(panel1, cc.xy(1, 3));
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(1000, 840);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.swing.StandardEditor.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    mainPanel = new JPanel();
    HeaderPanel = new JPanel();
    mainHeaderPanel = new JPanel();
    mainHeaderLabel = new JLabel();
    subHeaderPanel = new JPanel();
    subHeaderLabel = new JLabel();
    recordPosition = new JLabel();
    contentPanel = new JPanel();
    button1 = new JButton();
    separator1 = new JSeparator();
    buttonPanel = new JPanel();
    firstButton = new JButton();
    previousButton = new JButton();
    nextButton = new JButton();
    lastButton = new JButton();
    printButton = new JButton();
    cancelButton = new JButton();
    okButton = new JButton();
    saveButton = new JButton();
    okAndAnotherButton = new JButton();
    firstLabel = new JLabel();
    previousLabel = new JLabel();
    nextLabel = new JLabel();
    lastLabel = new JLabel();
    printLabel = new JLabel();
    cancelButtonLabel = new JLabel();
    okButtonLabel = new JLabel();
    saveButtonLabel = new JLabel();
    okAndAnotherButtonLabel = new JLabel();
    separator2 = new JSeparator();
    gradientPanel2 = new JPanel();
    auditLabel = new JLabel();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    setBackground(new Color(200, 205, 232));
    setModal(true);//from   www.  ja v a  2  s  . co  m
    setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            thisWindowClosing(e);
        }
    });
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("default:grow", "top:default:grow"));

    //======== mainPanel ========
    {
        mainPanel.setBackground(new Color(200, 205, 232));
        mainPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
                        FormFactory.LINE_GAP_ROWSPEC,
                        new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                        FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                        FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                        FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

        //======== HeaderPanel ========
        {
            HeaderPanel.setBackground(new Color(80, 69, 57));
            HeaderPanel.setOpaque(false);
            HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            HeaderPanel.setPreferredSize(new Dimension(300, 30));
            HeaderPanel
                    .setLayout(
                            new FormLayout(
                                    new ColumnSpec[] {
                                            new ColumnSpec(Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100),
                                                    Sizes.dluX(200))),
                                            new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT,
                                                    FormSpec.DEFAULT_GROW) },
                                    RowSpec.decodeSpecs("fill:default")));

            //======== mainHeaderPanel ========
            {
                mainHeaderPanel.setBackground(new Color(80, 69, 57));
                mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                mainHeaderPanel.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- mainHeaderLabel ----
                mainHeaderLabel.setText("Main Header");
                mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                mainHeaderLabel.setForeground(Color.white);
                mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2));
            }
            HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1));

            //======== subHeaderPanel ========
            {
                subHeaderPanel.setBackground(new Color(66, 60, 111));
                subHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
                subHeaderPanel.setLayout(new FormLayout(
                        new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC,
                                new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
                                FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
                                FormFactory.UNRELATED_GAP_COLSPEC },
                        new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC,
                                FormFactory.RELATED_GAP_ROWSPEC }));

                //---- subHeaderLabel ----
                subHeaderLabel.setText("Sub Header");
                subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
                subHeaderLabel.setForeground(Color.white);
                subHeaderPanel.add(subHeaderLabel, cc.xy(2, 2));

                //---- recordPosition ----
                recordPosition.setText("record x of n");
                recordPosition.setForeground(Color.white);
                subHeaderPanel.add(recordPosition,
                        cc.xywh(4, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
            }
            HeaderPanel.add(subHeaderPanel, cc.xy(2, 1));
        }
        mainPanel.add(HeaderPanel, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));

        //======== contentPanel ========
        {
            contentPanel.setBorder(Borders.DLU4_BORDER);
            contentPanel.setBackground(new Color(200, 205, 232));
            contentPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            contentPanel.setLayout(new FormLayout("center:default:grow", "top:default:grow"));

            //---- button1 ----
            button1.setText("text");
            contentPanel.add(button1, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL));
        }
        mainPanel.add(contentPanel, cc.xy(1, 3));

        //---- separator1 ----
        separator1.setBackground(new Color(220, 220, 232));
        separator1.setForeground(new Color(147, 131, 86));
        separator1.setMinimumSize(new Dimension(1, 10));
        separator1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        mainPanel.add(separator1, cc.xy(1, 5));

        //======== buttonPanel ========
        {
            buttonPanel.setBorder(null);
            buttonPanel.setBackground(new Color(200, 205, 232));
            buttonPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.setMinimumSize(new Dimension(380, 60));
            buttonPanel.setLayout(new FormLayout(
                    "default, default, default, default, default, left:10dlu, default, 10dlu, default, default, default, default",
                    "default, default"));

            //---- firstButton ----
            firstButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/firstRecord.jpg")));
            firstButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            firstButton.setOpaque(false);
            buttonPanel.add(firstButton, cc.xy(2, 1));

            //---- previousButton ----
            previousButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/prevRecord.jpg")));
            previousButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            previousButton.setOpaque(false);
            buttonPanel.add(previousButton, cc.xy(3, 1));

            //---- nextButton ----
            nextButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/nextRecord.jpg")));
            nextButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            nextButton.setOpaque(false);
            buttonPanel.add(nextButton, cc.xy(4, 1));

            //---- lastButton ----
            lastButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/lastRecord.jpg")));
            lastButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            lastButton.setOpaque(false);
            buttonPanel.add(lastButton, cc.xy(5, 1));

            //---- printButton ----
            printButton.setIcon(
                    new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/print.jpg")));
            printButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            printButton.setOpaque(false);
            buttonPanel.add(printButton, cc.xy(7, 1));

            //---- cancelButton ----
            cancelButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/cancel.jpg")));
            cancelButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            cancelButton.setOpaque(false);
            buttonPanel.add(cancelButton, cc.xy(9, 1));

            //---- okButton ----
            okButton.setIcon(
                    new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/ok.jpg")));
            okButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            okButton.setOpaque(false);
            buttonPanel.add(okButton, cc.xy(10, 1));

            //---- saveButton ----
            saveButton.setIcon(
                    new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/save.jpg")));
            saveButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            saveButton.setOpaque(false);
            buttonPanel.add(saveButton, cc.xy(11, 1));

            //---- okAndAnotherButton ----
            okAndAnotherButton.setIcon(new ImageIcon(
                    getClass().getResource("/org/archiviststoolkit/resources/images/savePlus1.jpg")));
            okAndAnotherButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            okAndAnotherButton.setOpaque(false);
            buttonPanel.add(okAndAnotherButton, cc.xy(12, 1));

            //---- firstLabel ----
            firstLabel.setText("First");
            firstLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(firstLabel, cc.xywh(2, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- previousLabel ----
            previousLabel.setText("Previous");
            previousLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(previousLabel,
                    cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- nextLabel ----
            nextLabel.setText("Next");
            nextLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(nextLabel, cc.xywh(4, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- lastLabel ----
            lastLabel.setText("Last");
            lastLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(lastLabel, cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- printLabel ----
            printLabel.setText("Reports");
            printLabel.setHorizontalAlignment(SwingConstants.CENTER);
            printLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(printLabel, cc.xy(7, 2));

            //---- cancelButtonLabel ----
            cancelButtonLabel.setText("Cancel");
            cancelButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(cancelButtonLabel,
                    cc.xywh(9, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- okButtonLabel ----
            okButtonLabel.setText("OK");
            okButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(okButtonLabel,
                    cc.xywh(10, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- saveButtonLabel ----
            saveButtonLabel.setText("Save");
            saveButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(saveButtonLabel,
                    cc.xywh(11, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

            //---- okAndAnotherButtonLabel ----
            okAndAnotherButtonLabel.setText("+ 1");
            okAndAnotherButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            buttonPanel.add(okAndAnotherButtonLabel,
                    cc.xywh(12, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
        }
        mainPanel.add(buttonPanel, cc.xywh(1, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- separator2 ----
        separator2.setBackground(new Color(220, 220, 232));
        separator2.setForeground(new Color(147, 131, 86));
        separator2.setMinimumSize(new Dimension(1, 10));
        separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        mainPanel.add(separator2, cc.xy(1, 9));

        //======== gradientPanel2 ========
        {
            gradientPanel2.setBackground(new Color(200, 205, 232));
            gradientPanel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            gradientPanel2.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
                    new RowSpec[] { new RowSpec("35px"), FormFactory.UNRELATED_GAP_ROWSPEC }));

            //---- auditLabel ----
            auditLabel.setText("created | modified");
            auditLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
            gradientPanel2.add(auditLabel, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT,
                    CellConstraints.DEFAULT, new Insets(0, 10, 0, 0)));
        }
        mainPanel.add(gradientPanel2, cc.xy(1, 11));
    }
    contentPane.add(mainPanel, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    final StandardEditor editor = this;
    WindowAdapter windowAdapter = new WindowAdapter() {
        public void windowClosing(final WindowEvent windowEvent) {
            if (saveButton.isVisible()) {
                if (readOnly) {
                    closeAndNoSave();
                } else if (showCloseConfirmDialog(0) == JOptionPane.YES_OPTION) {
                    if (!model.validateAndDisplayDialog(windowEvent)) { // didnot validate so don't save it
                        choice = -1;
                    } else {
                        setVisible(false);
                    }
                }
            } else if (JOptionPane.showConfirmDialog(editor,
                    "Clicking the close box is the same as clicking cancel. All changes will not be saved.\n"
                            + "Are you sure you wish to do this?",
                    "Confirm cancel", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                myIsDialogCancelled = true;

                setVisible(false);
            }
        }
    };

    addWindowListener(windowAdapter);
    this.getRootPane().setDefaultButton(this.getOkButton());
}

From source file:org.eclipse.wb.internal.swing.FormLayout.model.FormSizeInfo.java

License:Open Source License

/**
 * @return the {@link Size} value.//from w  w w.  ja  v a 2s  .  c om
 */
public Size getSize() {
    if (m_componentSize == null) {
        return m_constantSize.getSize(m_horizontal);
    } else {
        Size size = m_componentSize;
        // add bounds
        if (m_hasLowerSize && m_hasUpperSize) {
            return Sizes.bounded(size, m_lowerSize.getSize(m_horizontal), m_upperSize.getSize(m_horizontal));
        } else if (m_hasLowerSize) {
            return Sizes.bounded(size, m_lowerSize.getSize(m_horizontal), null);
        } else if (m_hasUpperSize) {
            return Sizes.bounded(size, null, m_upperSize.getSize(m_horizontal));
        }
        // return pure component size
        return size;
    }
}

From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormDimensionInfoTest.java

License:Open Source License

public void test_sourceBounded() throws Exception {
    Size size = Sizes.bounded(Sizes.DEFAULT, Sizes.constant("3cm", true), Sizes.constant("40mm", true));
    FormColumnInfo column = new FormColumnInfo(new ColumnSpec(ColumnSpec.LEFT, size, 0.0));
    assertEquals(//ww  w .  j  a  v  a 2s  .  c  o m
            "new com.jgoodies.forms.layout.ColumnSpec(com.jgoodies.forms.layout.ColumnSpec.LEFT, com.jgoodies.forms.layout.Sizes.bounded(com.jgoodies.forms.layout.Sizes.DEFAULT, com.jgoodies.forms.layout.Sizes.constant(\"3cm\", true), com.jgoodies.forms.layout.Sizes.constant(\"40mm\", true)), 0)",
            column.getSource());
}

From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormSizeInfoTest.java

License:Open Source License

public void test_FormSize_boundedLower() throws Exception {
    FormSizeInfo size = new FormSizeInfo(new ColumnSpec("max(4cm;default)").getSize(), true);
    assertTrue(size.isString());/*from   w  w  w .ja  va 2s. c  o  m*/
    assertEquals("max(4cm;default)", size.getSource());
    assertSame(Sizes.DEFAULT, size.getComponentSize());
    assertEquals(Sizes.bounded(Sizes.DEFAULT, Sizes.constant("4cm", true), null), size.getSize());
    assertNull(size.getConstantSize());
    assertNull(size.getUpperSize());
    //
    FormSizeConstantInfo lowerSize = size.getLowerSize();
    assertNotNull(lowerSize);
    assertEquals(4.0, lowerSize.getValue(), 0.001);
    assertSame(ConstantSize.CENTIMETER, lowerSize.getUnit());
}

From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormSizeInfoTest.java

License:Open Source License

public void test_FormSize_boundedUpper() throws Exception {
    FormSizeInfo size = new FormSizeInfo(new ColumnSpec("min(3cm;default)").getSize(), true);
    assertTrue(size.isString());//from   w  w w . j a  v a 2s. com
    assertEquals("min(3cm;default)", size.getSource());
    assertSame(Sizes.DEFAULT, size.getComponentSize());
    assertEquals(Sizes.bounded(Sizes.DEFAULT, null, Sizes.constant("3cm", true)), size.getSize());
    assertNull(size.getConstantSize());
    // lower
    assertFalse(size.hasLowerSize());
    assertNull(size.getLowerSize());
    // upper
    assertTrue(size.hasUpperSize());
    FormSizeConstantInfo upperSize = size.getUpperSize();
    assertNotNull(upperSize);
    assertEquals(3.0, upperSize.getValue(), 0.001);
    assertSame(ConstantSize.CENTIMETER, upperSize.getUnit());
}

From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormSizeInfoTest.java

License:Open Source License

public void test_FormSize_boundedLowerUpper() throws Exception {
    Size expectedSize = Sizes.bounded(Sizes.DEFAULT, Sizes.constant("3cm", true), Sizes.constant("40mm", true));
    FormSizeInfo size = new FormSizeInfo(expectedSize, true);
    assertFalse(size.isString());//from w  w  w. java 2  s  . co m
    assertEquals(
            "com.jgoodies.forms.layout.Sizes.bounded(com.jgoodies.forms.layout.Sizes.DEFAULT, com.jgoodies.forms.layout.Sizes.constant(\"3cm\", true), com.jgoodies.forms.layout.Sizes.constant(\"40mm\", true))",
            size.getSource());
    assertEquals(expectedSize, size.getSize());
    assertNull(size.getConstantSize());
    // lower
    {
        FormSizeConstantInfo lowerSize = size.getLowerSize();
        assertNotNull(lowerSize);
        assertEquals(3.0, lowerSize.getValue(), 0.001);
        assertSame(ConstantSize.CENTIMETER, lowerSize.getUnit());
    }
    // upper
    {
        FormSizeConstantInfo upperSize = size.getUpperSize();
        assertNotNull(upperSize);
        assertEquals(40.0, upperSize.getValue(), 0.001);
        assertSame(ConstantSize.MILLIMETER, upperSize.getUnit());
    }
}

From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormSizeInfoTest.java

License:Open Source License

private void check_bounded_getDisplayString(Size componentSize, String source, String display)
        throws Exception {
    Size expectedSize = Sizes.bounded(componentSize, Sizes.constant("3cm", true), Sizes.constant("40mm", true));
    FormSizeInfo size = new FormSizeInfo(expectedSize, true);
    assertEquals(expectedSize, size.getSize());
    {/*from  ww  w. j  a v  a 2  s. co m*/
        assertFalse(size.isString());
        assertEquals("com.jgoodies.forms.layout.Sizes.bounded(com.jgoodies.forms.layout.Sizes." + source
                + ", com.jgoodies.forms.layout.Sizes.constant(\"3cm\", true), com.jgoodies.forms.layout.Sizes.constant(\"40mm\", true))",
                size.getSource());
    }
    assertEquals("3cm<" + display + "<40mm", size.getDisplayString());
}