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

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

Introduction

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

Prototype

Alignment LEFT

To view the source code for com.jgoodies.forms.layout CellConstraints LEFT.

Click Source Link

Document

Put the component in the left.

Usage

From source file:org.archiviststoolkit.editor.ResourceTreeViewer.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    panel6 = new JPanel();
    label2 = new JLabel();
    resourceTitle = new JTextField();
    label3 = new JLabel();
    resourceIdentifier = new JTextField();
    splitPane = new JSplitPane();
    scrollPane = new JScrollPane();
    panel2 = new JPanel();
    addChildButton = new JButton();
    addSiblingBelowButton = new JButton();
    rapidDataentryScreens = ATBasicComponentFactory
            .createUnboundComboBox(RDEFactory.getInstance().getRDEContainerTitles());
    deleteComponentButton = new JButton();
    transferComponentsButton = new JButton();
    manageLocationsButton = new JButton();
    exportEAD = new JButton();
    exportMARC = new JButton();
    exportContainerLabels = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setPreferredSize(new Dimension(1050, 565));
    setOpaque(false);//from   ww  w.j  av  a 2s  .c o  m
    setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    setRequestFocusEnabled(false);
    setLayout(new FormLayout("default:grow", "default, top:default:grow, fill:default"));

    //======== panel6 ========
    {
        panel6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        panel6.setBackground(new Color(200, 205, 232));
        panel6.setLayout(new FormLayout(
                new ColumnSpec[] { FormFactory.UNRELATED_GAP_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.LABEL_COMPONENT_GAP_COLSPEC,
                        FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC },
                RowSpec.decodeSpecs("default")));

        //---- label2 ----
        label2.setText("Title: ");
        label2.setForeground(new Color(0, 0, 102));
        label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        panel6.add(label2, cc.xy(3, 1));

        //---- resourceTitle ----
        resourceTitle.setEditable(false);
        resourceTitle.setOpaque(false);
        resourceTitle.setBorder(null);
        panel6.add(resourceTitle, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));

        //---- label3 ----
        label3.setText("Resource Identifier: ");
        label3.setForeground(new Color(0, 0, 102));
        label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        label3.setHorizontalAlignment(SwingConstants.LEFT);
        panel6.add(label3, cc.xy(7, 1));

        //---- resourceIdentifier ----
        resourceIdentifier.setEditable(false);
        resourceIdentifier.setOpaque(false);
        resourceIdentifier.setBorder(null);
        resourceIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        resourceIdentifier.setHorizontalAlignment(SwingConstants.RIGHT);
        panel6.add(resourceIdentifier, cc.xywh(10, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    }
    add(panel6, cc.xy(1, 1));

    //======== splitPane ========
    {
        splitPane.setDividerLocation(300);
        splitPane.setLastDividerLocation(300);
        splitPane.setOpaque(false);
        splitPane.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));

        //======== scrollPane ========
        {
            scrollPane.setPreferredSize(new Dimension(250, 384));
            scrollPane.setMinimumSize(new Dimension(250, 384));
            scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
            scrollPane.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        }
        splitPane.setLeftComponent(scrollPane);
    }
    add(splitPane, cc.xywh(1, 2, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));

    //======== panel2 ========
    {
        panel2.setOpaque(false);
        panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        panel2.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, 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")));

        //---- addChildButton ----
        addChildButton.setOpaque(false);
        addChildButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        addChildButton.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/addChild.jpg")));
        addChildButton.setToolTipText("Add Child");
        addChildButton.setText("<html><c>Add<br>Child</c></html>");
        addChildButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                addChildActionPerformed(e);
            }
        });
        panel2.add(addChildButton, cc.xy(1, 1));

        //---- addSiblingBelowButton ----
        addSiblingBelowButton.setOpaque(false);
        addSiblingBelowButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        addSiblingBelowButton.setIcon(new ImageIcon(
                getClass().getResource("/org/archiviststoolkit/resources/images/addSibling.png")));
        addSiblingBelowButton.setToolTipText("Add Sibling");
        addSiblingBelowButton.setText("<html>Add<br>Sibling</html>");
        addSiblingBelowButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                addSiblingBelowActionPerformed(e);
            }
        });
        panel2.add(addSiblingBelowButton, cc.xy(3, 1));

        //---- rapidDataentryScreens ----
        rapidDataentryScreens.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                rapidDataentryScreensActionPerformed(e);
            }
        });
        panel2.add(rapidDataentryScreens, cc.xy(5, 1));

        //---- deleteComponentButton ----
        deleteComponentButton.setOpaque(false);
        deleteComponentButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        deleteComponentButton.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/delete.jpg")));
        deleteComponentButton.setToolTipText("Delete Component");
        deleteComponentButton.setText("<html>Delete<br>Component</html>");
        deleteComponentButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                deleteComponentActionPerformed(e);
            }
        });
        panel2.add(deleteComponentButton, cc.xy(7, 1));

        //---- transferComponentsButton ----
        transferComponentsButton.setOpaque(false);
        transferComponentsButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        transferComponentsButton.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/transfer.png")));
        transferComponentsButton.setToolTipText("Transfer Components");
        transferComponentsButton.setText("Transfer");
        transferComponentsButton.setSelectedIcon(null);
        transferComponentsButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                transferComponentsButtonActionPerformed(e);
            }
        });
        panel2.add(transferComponentsButton, cc.xy(9, 1));

        //---- manageLocationsButton ----
        manageLocationsButton.setText("<html>Manage<br>Locations</html>");
        manageLocationsButton.setOpaque(false);
        manageLocationsButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        manageLocationsButton.setIcon(new ImageIcon(
                getClass().getResource("/org/archiviststoolkit/resources/images/manageLocations.png")));
        manageLocationsButton.setToolTipText("Manage Locations");
        manageLocationsButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                manageLocationsButtonActionPerformed(e);
            }
        });
        panel2.add(manageLocationsButton, cc.xy(11, 1));

        //---- exportEAD ----
        exportEAD.setOpaque(false);
        exportEAD.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        exportEAD.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/exportEAD.jpg")));
        exportEAD.setToolTipText("Export EAD");
        exportEAD.setText("<html>Export<br>EAD</html>");
        exportEAD.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                exportEADActionPerformed(e);
            }
        });
        panel2.add(exportEAD, cc.xywh(13, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

        //---- exportMARC ----
        exportMARC.setOpaque(false);
        exportMARC.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        exportMARC.setIcon(new ImageIcon(
                getClass().getResource("/org/archiviststoolkit/resources/images/exportMARC.jpg")));
        exportMARC.setToolTipText("Export MARC");
        exportMARC.setText("<html>Export<br>MARC</html>");
        exportMARC.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                exportMARCActionPerformed(e);
            }
        });
        panel2.add(exportMARC, cc.xywh(15, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

        //---- exportContainerLabels ----
        exportContainerLabels.setOpaque(false);
        exportContainerLabels.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
        exportContainerLabels.setIcon(
                new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/export.png")));
        exportContainerLabels.setToolTipText("Export Container Labels");
        exportContainerLabels.setText("<html>Export<br>Cont. Labels</html>");
        exportContainerLabels.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                exportContainerLabelsActionPerformed(e);
            }
        });
        panel2.add(exportContainerLabels, cc.xywh(17, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    }
    add(panel2, cc.xy(1, 3));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.editor.SubjectFields.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label_subjectTerm = new JLabel();
    subjectTerm = ATBasicComponentFactory
            .createTextField(detailsModel.getModel(Subjects.PROPERTYNAME_SUBJECT_TERM));
    label_subjectTermType = new JLabel();
    subjectTermType = ATBasicComponentFactory.createComboBox(detailsModel,
            Subjects.PROPERTYNAME_SUBJECT_TERM_TYPE, Subjects.class);
    label_subjectSource = new JLabel();
    subjectSource = ATBasicComponentFactory.createComboBox(detailsModel, Subjects.PROPERTYNAME_SUBJECT_SOURCE,
            Subjects.class);
    label_subjectScopeNote = new JLabel();
    scrollPane1 = new JScrollPane();
    subjectScopeNote = ATBasicComponentFactory
            .createTextArea(detailsModel.getModel(Subjects.PROPERTYNAME_SUBJECT_SCOPE_NOTE));
    separator3 = new JSeparator();
    label_subjectScopeNote3 = new JLabel();
    scrollPane3 = new JScrollPane();
    accessionsTable = new DomainSortableTable(Accessions.class, Accessions.PROPERTYNAME_ACCESSION_NUMBER);
    separator4 = new JSeparator();
    label_subjectScopeNote2 = new JLabel();
    scrollPane2 = new JScrollPane();
    resourcesTable = new ResourceAndComponentLinkTable(Resources.class,
            Resources.PROPERTYNAME_RESOURCE_IDENTIFIER);
    label1 = new JLabel();
    separator5 = new JSeparator();
    label_subjectScopeNote4 = new JLabel();
    scrollPane4 = new JScrollPane();
    digitalObjectsTable = new DomainSortableTable(DigitalObjects.class,
            DigitalObjects.PROPERTYNAME_METS_IDENTIFIER);
    tabbedPane = new JTabbedPane();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU4_BORDER);//from   w w  w .j a  v  a 2 s.c  o  m
    setOpaque(false);
    setPreferredSize(new Dimension(800, 500));
    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,
                    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 }));

    //---- label_subjectTerm ----
    label_subjectTerm.setText("Subject Term");
    label_subjectTerm.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label_subjectTerm, Subjects.class, Subjects.PROPERTYNAME_SUBJECT_TERM);
    add(label_subjectTerm, cc.xy(1, 1));

    //---- subjectTerm ----
    subjectTerm.addKeyListener(new KeyAdapter() {
        @Override
        public void keyTyped(KeyEvent e) {
            subjectTermKeyTyped(e);
        }
    });
    add(subjectTerm, cc.xy(3, 1));

    //---- label_subjectTermType ----
    label_subjectTermType.setText("Subject Term Type");
    label_subjectTermType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label_subjectTermType, Subjects.class, Subjects.PROPERTYNAME_SUBJECT_TERM_TYPE);
    add(label_subjectTermType, cc.xy(1, 3));

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

    //---- label_subjectSource ----
    label_subjectSource.setText("Source");
    label_subjectSource.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label_subjectSource, Subjects.class, Subjects.PROPERTYNAME_SUBJECT_SOURCE);
    add(label_subjectSource, cc.xy(1, 5));

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

    //---- label_subjectScopeNote ----
    label_subjectScopeNote.setText("Scope Note");
    label_subjectScopeNote.setVerticalAlignment(SwingConstants.TOP);
    label_subjectScopeNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label_subjectScopeNote, Subjects.class,
            Subjects.PROPERTYNAME_SUBJECT_SCOPE_NOTE);
    add(label_subjectScopeNote, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    //======== scrollPane1 ========
    {
        scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane1.setMaximumSize(new Dimension(32767, 100));

        //---- subjectScopeNote ----
        subjectScopeNote.setRows(4);
        subjectScopeNote.setLineWrap(true);
        subjectScopeNote.setTabSize(20);
        subjectScopeNote.setWrapStyleWord(true);
        scrollPane1.setViewportView(subjectScopeNote);
    }
    add(scrollPane1, cc.xy(3, 7));

    //---- 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));
    add(separator3, cc.xywh(1, 9, 3, 1));

    //---- label_subjectScopeNote3 ----
    label_subjectScopeNote3.setText("Accessions");
    label_subjectScopeNote3.setVerticalAlignment(SwingConstants.TOP);
    label_subjectScopeNote3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(label_subjectScopeNote3, cc.xywh(1, 11, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));

    //======== scrollPane3 ========
    {
        scrollPane3.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));

        //---- accessionsTable ----
        accessionsTable.setPreferredScrollableViewportSize(new Dimension(450, 200));
        scrollPane3.setViewportView(accessionsTable);
    }
    add(scrollPane3, cc.xywh(1, 13, 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));
    add(separator4, cc.xywh(1, 15, 3, 1));

    //---- label_subjectScopeNote2 ----
    label_subjectScopeNote2.setText("Resources");
    label_subjectScopeNote2.setVerticalAlignment(SwingConstants.TOP);
    label_subjectScopeNote2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(label_subjectScopeNote2, cc.xywh(1, 17, 3, 1));

    //======== scrollPane2 ========
    {
        scrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));

        //---- resourcesTable ----
        resourcesTable.setPreferredScrollableViewportSize(new Dimension(450, 200));
        scrollPane2.setViewportView(resourcesTable);
    }
    add(scrollPane2, cc.xywh(1, 19, 3, 1));

    //---- label1 ----
    label1.setText("Resources in Red have the subject term linked at the component level");
    label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(label1, 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));
    add(separator5, cc.xywh(1, 23, 3, 1));

    //---- label_subjectScopeNote4 ----
    label_subjectScopeNote4.setText("Digital Objects");
    label_subjectScopeNote4.setVerticalAlignment(SwingConstants.TOP);
    label_subjectScopeNote4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(label_subjectScopeNote4, cc.xy(1, 25));

    //======== scrollPane4 ========
    {
        scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));

        //---- digitalObjectsTable ----
        digitalObjectsTable.setPreferredScrollableViewportSize(new Dimension(450, 200));
        scrollPane4.setViewportView(digitalObjectsTable);
    }
    add(scrollPane4, cc.xywh(1, 27, 3, 1));
    add(tabbedPane, cc.xywh(1, 29, 3, 1));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.editor.UserFields.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label1 = new JLabel();
    userName = ATBasicComponentFactory.createTextField(detailsModel.getModel(Users.PROPERTYNAME_USERNAME));
    label13 = new JLabel();
    fullName = ATBasicComponentFactory.createTextField(detailsModel.getModel(Users.PROPERTYNAME_FULL_NAME));
    label14 = new JLabel();
    title = ATBasicComponentFactory.createTextField(detailsModel.getModel(Users.PROPERTYNAME_TITLE));
    label15 = new JLabel();
    department = ATBasicComponentFactory.createTextField(detailsModel.getModel(Users.PROPERTYNAME_DEPARTMENT));
    label17 = new JLabel();
    email = ATBasicComponentFactory.createTextField(detailsModel.getModel(Users.PROPERTYNAME_EMAIL));
    label16 = new JLabel();
    accessClass = ATBasicComponentFactory.createIntegerField(detailsModel, Users.PROPERTYNAME_ACCESS_CLASS);
    label142 = new JLabel();
    repository = ATBasicComponentFactory.createComboBox(detailsModel, Users.PROPERTYNAME_REPOSITORY,
            Repositories.getRepositoryList());
    changePasswordButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU4_BORDER);//from  w  w w  .  j  av a2s .co m
    setBackground(new Color(234, 201, 250));
    setOpaque(false);
    setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    new ColumnSpec("max(default;400px):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,
                    FormFactory.DEFAULT_ROWSPEC }));

    //---- label1 ----
    label1.setText("Username");
    label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label1, Users.class, Users.PROPERTYNAME_USERNAME);
    add(label1, cc.xy(1, 1));
    add(userName, cc.xy(3, 1));

    //---- label13 ----
    label13.setText("Full Name");
    label13.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label13, Users.class, Users.PROPERTYNAME_FULL_NAME);
    add(label13, cc.xy(1, 3));
    add(fullName, cc.xy(3, 3));

    //---- label14 ----
    label14.setText("Title");
    label14.setVerticalAlignment(SwingConstants.TOP);
    label14.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label14, Users.class, Users.PROPERTYNAME_TITLE);
    add(label14, cc.xywh(1, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER));
    add(title, cc.xy(3, 5));

    //---- label15 ----
    label15.setText("Department");
    label15.setVerticalAlignment(SwingConstants.TOP);
    label15.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label15, Users.class, Users.PROPERTYNAME_DEPARTMENT);
    add(label15, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER));
    add(department, cc.xy(3, 7));

    //---- label17 ----
    label17.setText("email");
    label17.setVerticalAlignment(SwingConstants.TOP);
    label17.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label17, Users.class, Users.PROPERTYNAME_EMAIL);
    add(label17, cc.xywh(1, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER));
    add(email, cc.xy(3, 9));

    //---- label16 ----
    label16.setText("Access Class");
    label16.setVerticalAlignment(SwingConstants.TOP);
    label16.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label16, Users.class, Users.PROPERTYNAME_ACCESS_CLASS);
    add(label16, cc.xywh(1, 11, 1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER));

    //---- accessClass ----
    accessClass.setColumns(3);
    add(accessClass, cc.xywh(3, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- label142 ----
    label142.setText("Repository");
    label142.setVerticalAlignment(SwingConstants.TOP);
    label142.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    ATFieldInfo.assignLabelInfo(label142, Users.class, Users.PROPERTYNAME_REPOSITORY);
    add(label142, cc.xywh(1, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.CENTER));

    //---- repository ----
    repository.setOpaque(false);
    repository.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(repository, cc.xy(3, 13));

    //---- changePasswordButton ----
    changePasswordButton.setText("Change Password");
    changePasswordButton.setOpaque(false);
    changePasswordButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    changePasswordButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            changePasswordButtonActionPerformed(e);
        }
    });
    add(changePasswordButton, cc.xywh(3, 15, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.maintenance.ChooseOperation.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label1 = new JLabel();
    version = new JLabel();
    initializeButton = new JRadioButton();
    upgradeButton = new JRadioButton();
    utilitiesButton = new JRadioButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout(ColumnSpec.decodeSpecs("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 }));

    //---- label1 ----
    label1.setText(/*from  ww w.  j  av  a 2s.co  m*/
            "<html><center>Welcome to the<br>Archivists' Toolkit<br>Maintenance  Program</center></html>");
    label1.setFont(new Font("Lucida Grande", Font.BOLD, 16));
    add(label1, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

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

    //---- initializeButton ----
    initializeButton.setText("Initialize a blank database");
    initializeButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            initializeButtonActionPerformed();
        }
    });
    add(initializeButton, cc.xywh(1, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- upgradeButton ----
    upgradeButton.setText("Upgrade an existing database");
    upgradeButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            upgradeButtonActionPerformed();
        }
    });
    add(upgradeButton, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- utilitiesButton ----
    utilitiesButton.setText("Utilities");
    utilitiesButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            utilitiesButtonActionPerformed();
        }
    });
    add(utilitiesButton, cc.xywh(1, 9, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- buttonGroup1 ----
    ButtonGroup buttonGroup1 = new ButtonGroup();
    buttonGroup1.add(initializeButton);
    buttonGroup1.add(upgradeButton);
    buttonGroup1.add(utilitiesButton);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.maintenance.common.ConnectionInformation.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label4 = new JLabel();
    connectionUrl = new JTextField();
    label5 = new JLabel();
    userName = new JTextField();
    label6 = new JLabel();
    password = new JPasswordField();
    label7 = new JLabel();
    databaseTypes = ATBasicComponentFactory.createUnboundComboBox(SessionFactory.getDatabaseTypesList(true));
    CellConstraints cc = new CellConstraints();

    //======== this ========
    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 }));

    //---- label4 ----
    label4.setText("Connection URL");
    add(label4, cc.xy(1, 1));/*from   ww w  .  j  av a  2  s. com*/

    //---- connectionUrl ----
    connectionUrl.setName("connectionURL");
    add(connectionUrl, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT,
            new Insets(0, 5, 0, 0)));

    //---- label5 ----
    label5.setText("Username");
    add(label5, cc.xy(1, 3));

    //---- userName ----
    userName.setName("connectionUsername");
    add(userName, new CellConstraints(3, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT,
            new Insets(0, 5, 0, 0)));

    //---- label6 ----
    label6.setText("Password");
    add(label6, cc.xy(1, 5));

    //---- password ----
    password.setName("connectionPassword");
    add(password, new CellConstraints(3, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT,
            new Insets(0, 5, 0, 0)));

    //---- label7 ----
    label7.setText("Database Type");
    add(label7, cc.xy(1, 7));

    //---- databaseTypes ----
    databaseTypes.setOpaque(false);
    databaseTypes.setName("connectionDatabaseType");
    databaseTypes.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            databaseTypesActionPerformed();
        }
    });
    add(databaseTypes, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.maintenance.utilities.SelectUtility.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    utilities = new JComboBox();
    scrollPane1 = new JScrollPane();
    utilityDescription = new JTextArea();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"),
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }));

    //---- utilities ----
    utilities.setOpaque(false);/*w  ww  . j  a va  2  s .com*/
    utilities.setName("selectedUtility");
    utilities.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            utilitiesActionPerformed();
        }
    });
    add(utilities, cc.xywh(1, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //======== scrollPane1 ========
    {
        scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        //---- utilityDescription ----
        utilityDescription.setEditable(false);
        scrollPane1.setViewportView(utilityDescription);
    }
    add(scrollPane1, cc.xy(1, 3));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.archiviststoolkit.structure.DefaultValuesFields.java

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    lookupListLabel = new JLabel();
    table = new JComboBox(new DefaultComboBoxModel(ATFieldInfo.getTableListForDefaultValues()));
    lookupListLabel2 = new JLabel();
    field = new JComboBox();
    label17 = new JLabel();
    valuePlaceHolder = new JTextField();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU4_BORDER);/*  www. j  a v a  2  s .  c  o  m*/
    setOpaque(false);
    setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    setPreferredSize(new Dimension(400, 130));
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                    new ColumnSpec("30px:grow") },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

    //---- lookupListLabel ----
    lookupListLabel.setText("Table");
    lookupListLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(lookupListLabel, cc.xy(1, 1));

    //---- table ----
    table.setOpaque(false);
    table.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    table.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            tableActionPerformed(e);
        }
    });
    add(table, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- lookupListLabel2 ----
    lookupListLabel2.setText("Field");
    lookupListLabel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(lookupListLabel2, cc.xy(1, 3));

    //---- field ----
    field.setOpaque(false);
    field.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    field.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            fieldActionPerformed(e);
        }
    });
    add(field, cc.xywh(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- label17 ----
    label17.setText("Value");
    label17.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(label17, cc.xy(1, 5));

    //---- valuePlaceHolder ----
    valuePlaceHolder.setFont(new Font("Trebuchet MS", Font.PLAIN, 13));
    add(valuePlaceHolder, cc.xywh(3, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

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

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label1 = new JLabel();
    repositorySelector = new JComboBox();
    dateFormatSelectorLabel = new JLabel();
    dateFormatSelector = new JComboBox();
    resourceRecordCreationLabel = new JLabel();
    resourceRecordCreationSelector = ATBasicComponentFactory
            .createUnboundComboBox(DelimitedAccessionImportHandler.getResourceRecordCreationValues());
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU2_BORDER);/*  w  w  w . ja  v a 2s  .com*/
    setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"),
            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 }));

    //---- label1 ----
    label1.setText("Select a Repository");
    add(label1, cc.xy(1, 1));
    add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- dateFormatSelectorLabel ----
    dateFormatSelectorLabel.setText("Select a Date Format");
    add(dateFormatSelectorLabel, cc.xy(1, 5));

    //---- dateFormatSelector ----
    dateFormatSelector.setModel(
            new DefaultComboBoxModel(new String[] { "yyyy-M-d", "yyyy/M/d", "M-d-yyyy", "M/d/yyyy" }));
    add(dateFormatSelector, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- resourceRecordCreationLabel ----
    resourceRecordCreationLabel.setText("Resource record creation");
    add(resourceRecordCreationLabel, cc.xy(1, 9));
    add(resourceRecordCreationSelector, cc.xywh(1, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

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

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label1 = new JLabel();
    repositorySelector = new JComboBox();
    dateFormatSelectorLabel = new JLabel();
    dateFormatSelector = new JComboBox();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU2_BORDER);//from  w  w w.jav  a2 s  .  c  o m
    setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"),
            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("Select a Repository");
    add(label1, cc.xy(1, 1));
    add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

    //---- dateFormatSelectorLabel ----
    dateFormatSelectorLabel.setText("Select a Date Format");
    add(dateFormatSelectorLabel, cc.xy(1, 5));

    //---- dateFormatSelector ----
    dateFormatSelector.setModel(
            new DefaultComboBoxModel(new String[] { "yyyy-M-d", "yyyy/M/d", "M-d-yyyy", "M/d/yyyy" }));
    add(dateFormatSelector, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

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

License:Open Source License

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    label1 = new JLabel();
    repositorySelector = new JComboBox();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setBorder(Borders.DLU2_BORDER);/*from w  w  w .ja v  a  2 s.c  om*/
    setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC,
            FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC }));

    //---- label1 ----
    label1.setText("Select a Repository");
    add(label1, cc.xy(1, 1));
    add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}