Example usage for javax.swing.border TitledBorder TitledBorder

List of usage examples for javax.swing.border TitledBorder TitledBorder

Introduction

In this page you can find the example usage for javax.swing.border TitledBorder TitledBorder.

Prototype

public TitledBorder(Border border) 

Source Link

Document

Creates a TitledBorder instance with the specified border and an empty title.

Usage

From source file:com.funambol.foundation.admin.SIFSyncSourceConfigPanel.java

/**
 * Create the panel//w w w. j a  v  a2 s .c  om
 *
 * @throws Exception if error occures during creation of the panel
 */
private void init() {
    this.setLayout(null);
    //
    // Set properties of label, position and border referred to the title
    //of the panel
    //
    titledBorder1 = new TitledBorder("");

    panelName.setFont(titlePanelFont);
    panelName.setText("Edit SIF SyncSource");
    panelName.setBounds(new Rectangle(14, 5, 316, 28));
    panelName.setAlignmentX(SwingConstants.CENTER);
    panelName.setBorder(titledBorder1);

    int y = 60;
    int dy = 30;
    int x1 = 14;
    int x2 = 170;
    int w1 = 150;
    int w2 = 350;
    int h = 18;

    sourceUriLabel.setText("Source URI: ");
    sourceUriLabel.setFont(defaultFont);
    sourceUriLabel.setBounds(x1, y, w1, h);
    sourceUriValue.setFont(defaultFont);
    sourceUriValue.setBounds(x2, y, w2, h);

    y += dy;

    nameLabel.setText("Name: ");
    nameLabel.setFont(defaultFont);
    nameLabel.setBounds(x1, y, w1, h);
    nameValue.setFont(defaultFont);
    nameValue.setBounds(x2, y, w2, h);

    y += dy;

    typeLabel.setText("Type: ");
    typeLabel.setFont(defaultFont);
    typeLabel.setBounds(x1, y, w1, h);
    typeCombo.setFont(defaultFont);
    typeCombo.setBounds(x2, y, 100, h);
    typeCombo.addItem(TYPE_SIF_C);
    typeCombo.addItem(TYPE_SIF_E);
    typeCombo.addItem(TYPE_SIF_N);
    typeCombo.addItem(TYPE_SIF_T);

    typeCombo.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent event) {
            handleTypeSelected();
        }
    });

    handleTypeSelected();

    y += dy;

    directoryLabel.setText("Source Directory: ");
    directoryLabel.setFont(defaultFont);
    directoryLabel.setBounds(x1, y, w1, h);
    directoryValue.setFont(defaultFont);
    directoryValue.setBounds(x2, y, w2, h);

    y += dy;

    twinPropertiesLabel.setText("Twin properties: ");
    twinPropertiesLabel.setFont(defaultFont);
    twinPropertiesLabel.setBounds(x1, y, w1, h);
    descrTwinPropLabel.setText("(Used to identify twins)");
    descrTwinPropLabel.setFont(defaultFont);
    descrTwinPropLabel.setBounds(x1, (y + 15), w1, h);

    twinPropertiesValue.setFont(defaultFont);
    twinPropertiesValue.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    twinPropertiesValue.setAutoscrolls(true);

    scrollTable = new JScrollPane(twinPropertiesValue);
    scrollTable.setWheelScrollingEnabled(true);
    scrollTable.setBounds(x2, y, 200, 66);
    scrollTable.setColumnHeader(null);
    scrollTable.setMinimumSize(new Dimension(200, 66));
    scrollTable.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);

    y += 45;
    y += dy;

    multiUserLabel.setText("MultiUser: ");
    multiUserLabel.setFont(defaultFont);
    multiUserLabel.setBounds(x1, y, w1, h);
    multiUserValue.setSelected(false);
    multiUserValue.setBounds(x2, y, h, h);

    y += 5;
    y += dy;

    confirmButton.setFont(defaultFont);
    confirmButton.setText("Add");
    confirmButton.setBounds(x2, y, 70, 25);
    confirmButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            try {
                validateValues();
                getValues();
                if (getState() == STATE_INSERT) {
                    SIFSyncSourceConfigPanel.this.actionPerformed(new ActionEvent(SIFSyncSourceConfigPanel.this,
                            ACTION_EVENT_INSERT, event.getActionCommand()));
                } else {
                    SIFSyncSourceConfigPanel.this.actionPerformed(new ActionEvent(SIFSyncSourceConfigPanel.this,
                            ACTION_EVENT_UPDATE, event.getActionCommand()));
                }
            } catch (Exception e) {
                notifyError(new AdminException(e.getMessage()));
            }
        }
    });

    //
    // Add all components to the panel
    //
    this.add(panelName, null);
    this.add(sourceUriLabel, null);
    this.add(sourceUriValue, null);
    this.add(nameLabel, null);
    this.add(nameValue, null);
    this.add(typeLabel, null);
    this.add(typeCombo, null);
    this.add(directoryLabel, null);
    this.add(directoryValue, null);
    this.add(twinPropertiesLabel, null);
    this.add(scrollTable, null);
    this.add(descrTwinPropLabel, null);
    this.add(multiUserLabel, null);
    this.add(multiUserValue, null);
    this.add(confirmButton, null);
}

From source file:com.funambol.admin.settings.panels.EditRollingFileAppender.java

/**
 * Create the panel/*from ww  w.  j ava 2 s. c o  m*/
 * @throws Exception if error occures during creation of the panel.
 */
private void init() throws Exception {

    final int h = 18;
    final int x1 = 15;
    final int x2 = 150;
    final int w1 = 100;
    final int w2 = 310;

    int y = 40;
    int dy = 25;

    setLayout(null);
    setName(Bundle.getMessage(Bundle.EDIT_ROLLING_FILE_APPENDER_PANEL_NAME));

    panelNameLabel.setText(Bundle.getMessage(Bundle.EDIT_ROLLING_FILE_APPENDER_PANEL_NAME));
    panelNameLabel.setBounds(new Rectangle(14, 5, 245, 28));
    panelNameLabel.setAlignmentX(SwingConstants.CENTER);
    panelNameLabel.setBorder(new TitledBorder(""));

    nameLabel.setText(Bundle.getMessage(Bundle.LABEL_APPENDER_NAME) + " :");
    nameLabel.setBounds(new Rectangle(x1, y, w1, h));
    nameLabel2.setBounds(new Rectangle(x2, y, w2, h));

    y += dy;

    fileNameLabel.setText(Bundle.getMessage(Bundle.LABEL_FILE_NAME) + " :");
    fileNameLabel.setBounds(new Rectangle(x1, y, w1, h));
    fileNameValue.setBounds(new Rectangle(x2, y, w2, h));

    y += dy;

    fileSizeLabel.setText(Bundle.getMessage(Bundle.LABEL_MAX_FILE_SIZE) + " :");
    fileSizeLabel.setBounds(new Rectangle(x1, y, w1, h));
    fileSizeValue.setBounds(new Rectangle(x2, y, w2, h));
    fileSizeValue.setHorizontalAlignment(JTextField.RIGHT);
    limitMBLabel.setBounds(new Rectangle(x2 + w2 + 10, y, 50, h));

    y += dy;

    fileRotationCountLabel.setText(Bundle.getMessage(Bundle.LABEL_MAX_BACKUP_INDEX) + " :");
    fileRotationCountLabel.setBounds(new Rectangle(x1, y, w1, h));
    fileRotationCountValue.setBounds(new Rectangle(x2, y, w2, h));
    fileRotationCountValue.setHorizontalAlignment(JTextField.RIGHT);

    y += dy;

    conversionPatternLabel.setText(Bundle.getMessage(Bundle.LABEL_PATTERN_LAYOUT) + " :");
    conversionPatternLabel.setBounds(new Rectangle(x1, y, w1, h));
    conversionPattern.setBounds(new Rectangle(x2, y, w2, h));

    y += dy;

    noteLabel.setText(Bundle.getMessage(Bundle.LABEL_FILE_APPENDER_NOTE));
    noteLabel.setBounds(new Rectangle(x1, y, 500, h));

    y += dy;
    y += dy;

    confirmButton.setText(Bundle.getMessage(Bundle.LABEL_BUTTON_SAVE));
    confirmButton.setBounds(new Rectangle(401, y, 60, 25));

    confirmButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            try {
                validateValues();
                getValues();
                EditRollingFileAppender.this.actionPerformed(new ActionEvent(EditRollingFileAppender.this,
                        ACTION_EVENT_UPDATE, event.getActionCommand()));
            } catch (Exception e) {
                notifyError(new AdminException(e.getMessage()));
            }
        }
    });

    add(panelNameLabel, null);
    add(nameLabel, null);
    add(nameLabel2, null);
    add(fileNameLabel, null);
    add(fileNameValue, null);
    add(fileRotationCountLabel, null);
    add(fileRotationCountValue, null);
    add(fileSizeLabel, null);
    add(fileSizeValue, null);
    add(limitMBLabel, null);
    add(conversionPatternLabel, null);
    add(conversionPattern, null);
    add(noteLabel, null);

    add(confirmButton, null);

    GuiFactory.setDefaultFont(this);
    panelNameLabel.setFont(GuiFactory.titlePanelFont);

}

From source file:com.funambol.exchange.admin.DefaultExchangeConnectorConfigPanel.java

/**
 * Create the panel/*  w  ww  .j a  v a2 s  .  com*/
 */
private void init() {

    JLabel title, contactFolderLabel, eventFolderLabel, taskFolderLabel, noteFolderLabel, seccServerLabel,
            seccPortLabel, exchangeServerLabel;
    JPanel seccPanel, exchangePanel, sslPanel;

    title = new JLabel();
    exchangePanel = new JPanel();
    seccPanel = new JPanel();
    sslPanel = new JPanel();

    contactFolderValue = new JTextField();
    eventFolderValue = new JTextField();
    taskFolderValue = new JTextField();
    noteFolderValue = new JTextField();
    seccServerLabel = new JLabel();
    seccServerValue = new JTextField();
    seccPortLabel = new JLabel();
    seccPortValue = new JTextField();
    useSSLValue = new JCheckBox();
    useFBAValue = new JCheckBox();
    useKeyStoreValue = new JCheckBox();
    keyStoreFileNameLabel = new JLabel();
    keyStoreFileNameValue = new JTextField();
    keyStorePasswordLabel = new JLabel();
    keyStorePasswordValue = new JTextField();

    exchangeServerLabel = new JLabel();
    exchangeServerValue = new JTextField();
    exchangeServerNameLabel = new JLabel();
    exchangeServerNameValue = new JTextField();
    setLayout(null);

    title.setFont(GuiFactory.titlePanelFont);
    title.setText("Funambol Exchange Connector");
    title.setBounds(new Rectangle(14, 5, 316, 28));
    title.setAlignmentX(SwingConstants.CENTER);
    title.setBorder(new TitledBorder(""));

    contactFolderLabel = new JLabel();
    contactFolderLabel.setText("Contact Folder: ");
    contactFolderLabel.setBounds(14, 35, 116, 15);
    add(contactFolderLabel);
    contactFolderValue.setBounds(150, 35, 220, 19);
    add(contactFolderValue);

    eventFolderLabel = new JLabel();
    eventFolderLabel.setText("Event Folder: ");
    eventFolderLabel.setBounds(14, 65, 116, 15);
    add(eventFolderLabel);
    eventFolderValue.setBounds(150, 65, 220, 19);
    add(eventFolderValue);

    taskFolderLabel = new JLabel();
    taskFolderLabel.setText("Task Folder: ");
    taskFolderLabel.setBounds(14, 95, 116, 15);
    add(taskFolderLabel);
    taskFolderValue.setBounds(150, 95, 220, 19);
    add(taskFolderValue);

    noteFolderLabel = new JLabel();
    noteFolderLabel.setText("Note Folder: ");
    noteFolderLabel.setBounds(14, 125, 116, 15);
    add(noteFolderLabel);
    noteFolderValue.setBounds(150, 125, 220, 19);
    add(noteFolderValue);

    seccPanel.setLayout(null);
    seccPanel.setBorder(new TitledBorder("HTTP Server Configuration"));

    seccServerLabel.setText("Server:");
    seccPanel.add(seccServerLabel);
    seccServerLabel.setBounds(10, 20, 116, 15);
    seccPanel.add(seccServerValue);
    seccServerValue.setBounds(150, 20, 220, 19);
    seccServerValue.setFont(GuiFactory.defaultFont);

    seccPortLabel.setText("Port:");
    seccPanel.add(seccPortLabel);
    seccPortLabel.setBounds(10, 50, 131, 15);
    seccPanel.add(seccPortValue);
    seccPortValue.setBounds(150, 50, 220, 19);
    seccPortValue.setFont(GuiFactory.defaultFont);

    add(seccPanel);
    seccPanel.setBounds(10, 155, 380, 80);

    exchangePanel.setLayout(null);
    exchangePanel.setBorder(new TitledBorder("WebDav Message Configuration"));

    exchangeServerLabel.setText("Server: ");
    exchangePanel.add(exchangeServerLabel);
    exchangeServerLabel.setBounds(10, 20, 150, 19);
    exchangePanel.add(exchangeServerValue);
    exchangeServerValue.setBounds(150, 20, 220, 19);
    exchangeServerValue.setFont(GuiFactory.defaultFont);

    exchangeServerNameLabel.setText("Name:");
    exchangeServerNameLabel.setBounds(10, 50, 150, 19);
    exchangePanel.add(exchangeServerNameLabel);
    exchangeServerNameValue.setBounds(150, 50, 220, 19);
    exchangeServerNameValue.setFont(GuiFactory.defaultFont);
    exchangePanel.add(exchangeServerNameValue);

    add(exchangePanel);
    exchangePanel.setBounds(10, 255, 380, 80);

    //the ssl option panel

    sslPanel.setLayout(null);
    sslPanel.setBorder(new TitledBorder("SSL"));

    useSSLValue.setText("Use SSL");
    useSSLValue.setSelected(false);
    useSSLValue.setBounds(5, 20, 150, 19);
    sslPanel.add(useSSLValue);

    useFBAValue.setText("Use Form-Based Authentication");
    useFBAValue.setSelected(true);
    useFBAValue.setBounds(5, 40, 250, 19);
    sslPanel.add(useFBAValue);

    useKeyStoreValue.setText("Use Keystore");
    useKeyStoreValue.setSelected(false);
    useKeyStoreValue.setBounds(5, 60, 200, 19);
    sslPanel.add(useKeyStoreValue);

    useKeyStoreValue.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent acEvent) {
            boolean enabled = useKeyStoreValue.isSelected();
            keyStoreFileNameLabel.setEnabled(enabled);
            keyStoreFileNameValue.setEnabled(enabled);
            keyStorePasswordLabel.setEnabled(enabled);
            keyStorePasswordValue.setEnabled(enabled);
        }
    });

    keyStoreFileNameLabel.setText("Key Store File: ");
    sslPanel.add(keyStoreFileNameLabel);
    keyStoreFileNameLabel.setEnabled(false);
    keyStoreFileNameLabel.setBounds(10, 80, 131, 15);
    sslPanel.add(keyStoreFileNameValue);
    keyStoreFileNameValue.setEnabled(false);
    keyStoreFileNameValue.setBounds(150, 80, 220, 19);
    keyStoreFileNameValue.setFont(GuiFactory.defaultFont);

    keyStorePasswordLabel.setText("Key Store Password: ");
    sslPanel.add(keyStorePasswordLabel);
    keyStorePasswordLabel.setEnabled(false);
    keyStorePasswordLabel.setBounds(10, 110, 131, 15);
    sslPanel.add(keyStorePasswordValue);
    keyStorePasswordValue.setEnabled(false);
    keyStorePasswordValue.setBounds(150, 110, 220, 19);
    keyStorePasswordValue.setFont(GuiFactory.defaultFont);

    add(sslPanel);
    sslPanel.setBounds(10, 355, 450, 140);

    confirmButton.setFont(GuiFactory.defaultFont);
    confirmButton.setText("Save");
    add(confirmButton);
    confirmButton.setBounds(120, 500, 70, 25);
    confirmButton.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            getValues();
            configPanel.saveDefaultConfig(event.getActionCommand());
            configPanel.finishedDefaultConfig();
        }
    });

    cancelButton.setFont(GuiFactory.defaultFont);
    cancelButton.setText("Cancel");
    add(cancelButton);
    cancelButton.setBounds(200, 500, 70, 25);
    cancelButton.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            configPanel.finishedDefaultConfig();
        }

    });

    //
    // Setting font...
    //
    Component[] components = getComponents();
    for (int i = 0; (components != null) && (i < components.length); ++i) {
        components[i].setFont(GuiFactory.defaultFont);
    }

    //
    // We add it as the last one so that the font won't be changed
    //
    add(title);
}

From source file:com.funambol.json.admin.CalendarSyncSourceAdminPanel.java

/**
 * Create the panel/* www  .  jav a2s .co m*/
 * @throws Exception if error occures during creation of the panel
 */
private void init() {

    this.setLayout(null);
    // set properties of label, position and border
    //  referred to the title of the panel
    titledBorder = new TitledBorder("");
    panelName.setFont(titlePanelFont);
    panelName.setText(getPanelName());
    panelName.setBounds(new Rectangle(14, 5, 316, 28));
    panelName.setAlignmentX(SwingConstants.CENTER);
    panelName.setBorder(titledBorder);

    final int LABEL_X = 14;
    final int VALUE_X = 170;
    int y = 60;
    final int GAP_X = 150;
    final int GAP_Y = 30;

    sourceUriLabel.setText("Source URI: ");
    sourceUriLabel.setFont(defaultFont);
    sourceUriLabel.setBounds(new Rectangle(LABEL_X, y, 150, 18));
    sourceUriValue.setFont(defaultFont);
    sourceUriValue.setBounds(new Rectangle(VALUE_X, y, 350, 18));

    y += GAP_Y; // New line

    nameLabel.setText("Name: ");
    nameLabel.setFont(defaultFont);
    nameLabel.setBounds(new Rectangle(LABEL_X, y, 150, 18));
    nameValue.setFont(defaultFont);
    nameValue.setBounds(new Rectangle(VALUE_X, y, 350, 18));
    y += GAP_Y; // New line

    typeLabel.setText("Client Type: ");
    typeLabel.setFont(defaultFont);
    typeLabel.setBounds(new Rectangle(LABEL_X, y, 150, 18));
    typeCombo.setFont(defaultFont);
    typeCombo.setBounds(new Rectangle(VALUE_X, y, 350, 18));
    typeCombo.addItemListener(new ItemListener() {

        public void itemStateChanged(ItemEvent e) {
            updateEntityTypeCheckBoxes();
        }
    });

    y += GAP_Y; // New line

    datastoretypeLabel.setText("Datastore Type: ");
    datastoretypeLabel.setFont(defaultFont);
    datastoretypeLabel.setBounds(new Rectangle(LABEL_X, y, 150, 18));
    datastoretypeCombo.setFont(defaultFont);
    datastoretypeCombo.setBounds(new Rectangle(VALUE_X, y, 350, 18));

    y += GAP_Y; // New line
    int x = LABEL_X;

    y = addExtraComponents(x, y, GAP_X, GAP_Y); // Add other components, if needed

    y += GAP_Y; // New line

    confirmButton.setFont(defaultFont);
    confirmButton.setText("Add");
    confirmButton.setBounds(VALUE_X, y, 70, 25);

    // What happens when the confirmButton is pressed?
    confirmButton.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            try {
                validateValues();
                getValues();
                if (getState() == STATE_INSERT) {
                    CalendarSyncSourceAdminPanel.this.actionPerformed(new ActionEvent(
                            CalendarSyncSourceAdminPanel.this, ACTION_EVENT_INSERT, event.getActionCommand()));
                } else {
                    CalendarSyncSourceAdminPanel.this.actionPerformed(new ActionEvent(
                            CalendarSyncSourceAdminPanel.this, ACTION_EVENT_UPDATE, event.getActionCommand()));
                }
            } catch (Exception e) {
                notifyError(new AdminException(e.getMessage(), e));
            }
        }
    });

    // Adds all components to the panel
    this.add(panelName, null);
    this.add(nameLabel, null);
    this.add(sourceUriLabel, null);
    this.add(sourceUriValue, null);
    this.add(nameValue, null);
    this.add(typeLabel, null);
    this.add(typeCombo, null);
    this.add(confirmButton, null);
    this.add(eventValue, null);
    this.add(taskValue, null);
    this.add(datastoretypeLabel, null);
    this.add(datastoretypeCombo, null);

}

From source file:com.floreantpos.main.SetUpWindow.java

protected void initUI() {
    getContentPane().setLayout(new BorderLayout()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    JPanel databaseConfigPanel = new JPanel(new MigLayout("fill,hidemode 3", "[150px][fill, grow]", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    databaseConfigPanel.setBorder(new TitledBorder(Messages.getString("SetUpWindow.3"))); //$NON-NLS-1$
    tfServerAddress = new POSTextField();
    tfServerPort = new POSTextField();
    tfDatabaseName = new POSTextField();
    tfUserName = new POSTextField();
    tfPassword = new POSPasswordField();
    databaseCombo = new JComboBox(Database.values());

    String databaseProviderName = AppConfig.getDatabaseProviderName();
    if (StringUtils.isNotEmpty(databaseProviderName)) {
        databaseCombo.setSelectedItem(Database.getByProviderName(databaseProviderName));
    }//from ww  w . j  av a2 s  . com
    btnTestConnection = new PosButton("Test"); //$NON-NLS-1$
    btnTestConnection.setActionCommand(TEST);

    btnCreateDb = new PosButton("Create New"); //$NON-NLS-1$
    btnCreateDb.setActionCommand(CREATE_DATABASE);

    btnCreateSampleData = new PosButton("Create sample data"); //$NON-NLS-1$
    btnCreateSampleData.setActionCommand(CREATE_SAMPLE_DATA);

    databaseConfigPanel.add(new JLabel(Messages.getString("DatabaseConfigurationDialog.8"))); //$NON-NLS-1$
    databaseConfigPanel.add(databaseCombo, "w 200!,grow, split 4"); //$NON-NLS-1$

    databaseConfigPanel.add(btnTestConnection, "w 50!,h 30!"); //$NON-NLS-1$
    databaseConfigPanel.add(btnCreateDb, "w 100!,h 30!"); //$NON-NLS-1$
    databaseConfigPanel.add(btnCreateSampleData, "h 30!,wrap"); //$NON-NLS-1$

    lblServerAddress = new JLabel(Messages.getString("DatabaseConfigurationDialog.10") + ":"); //$NON-NLS-1$ //$NON-NLS-2$
    databaseConfigPanel.add(lblServerAddress);
    databaseConfigPanel.add(tfServerAddress, "grow, split 3"); //$NON-NLS-1$
    lblServerPort = new JLabel("Port" + ":"); //$NON-NLS-1$ //$NON-NLS-2$
    databaseConfigPanel.add(lblServerPort);
    tfServerPort.setHorizontalAlignment(JTextField.RIGHT);
    databaseConfigPanel.add(tfServerPort, "w 50!,wrap"); //$NON-NLS-1$
    lblDbName = new JLabel(Messages.getString("DatabaseConfigurationDialog.16") + ":"); //$NON-NLS-1$ //$NON-NLS-2$
    databaseConfigPanel.add(lblDbName);
    databaseConfigPanel.add(tfDatabaseName, "grow, wrap"); //$NON-NLS-1$
    lblUserName = new JLabel(Messages.getString("DatabaseConfigurationDialog.19") + ":"); //$NON-NLS-1$ //$NON-NLS-2$
    databaseConfigPanel.add(lblUserName);
    databaseConfigPanel.add(tfUserName, "grow, split 3"); //$NON-NLS-1$
    lblDbPassword = new JLabel("Password" + ":"); //$NON-NLS-1$ //$NON-NLS-2$
    databaseConfigPanel.add(lblDbPassword);
    databaseConfigPanel.add(tfPassword, "grow, wrap"); //$NON-NLS-1$

    btnSave = new PosButton(Messages.getString("DatabaseConfigurationDialog.27").toUpperCase()); //$NON-NLS-1$
    btnSave.setActionCommand(SAVE);
    btnExit = new PosButton(Messages.getString("DatabaseConfigurationDialog.28").toUpperCase()); //$NON-NLS-1$
    btnExit.setActionCommand(CANCEL);

    JPanel buttonPanel = new JPanel(new MigLayout("fillx,right")); //$NON-NLS-1$

    buttonPanel.add(btnSave, "h 40!,split 2,right"); //$NON-NLS-1$
    buttonPanel.add(btnExit, "h 40!"); //$NON-NLS-1$

    JPanel contentPanel = new JPanel(new MigLayout("fillx")); //$NON-NLS-1$
    contentPanel.add(databaseConfigPanel, "grow,wrap"); //$NON-NLS-1$
    //contentPanel.add(createUserPanel(), "grow,wrap");
    contentPanel.add(createTerminalConfigPanel(), "grow,wrap"); //$NON-NLS-1$
    getContentPane().add(new JideScrollPane(contentPanel), BorderLayout.CENTER); //$NON-NLS-1$
    getContentPane().add(buttonPanel, BorderLayout.SOUTH); //$NON-NLS-1$

    getContentPane().setBackground(databaseConfigPanel.getBackground());
}

From source file:com.mirth.connect.client.ui.browsers.event.EventBrowser.java

public void initComponentsManual() {
    this.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mousePressed(java.awt.event.MouseEvent evt) {
            if (evt.isPopupTrigger()) {
                parent.eventPopupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
            }/*from  www. j  a va2  s  . c  o  m*/
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            if (evt.isPopupTrigger()) {
                parent.eventPopupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
            }
        }
    });

    pageSizeField.setDocument(new MirthFieldConstraints(3, false, false, true));
    pageNumberField.setDocument(new MirthFieldConstraints(7, false, false, true));

    LineBorder lineBorder = new LineBorder(new Color(0, 0, 0));
    TitledBorder titledBorder = new TitledBorder("Current Search");
    titledBorder.setBorder(lineBorder);

    lastSearchCriteriaPane.setBorder(titledBorder);
    lastSearchCriteriaPane.setBackground(Color.white);
    lastSearchCriteria.setBackground(Color.white);

    startDatePicker.addPropertyChangeListener(new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent arg0) {
            allDayCheckBox.setEnabled(startDatePicker.getDate() != null || endDatePicker.getDate() != null);
            startTimePicker.setEnabled(startDatePicker.getDate() != null && !allDayCheckBox.isSelected());
        }
    });

    endDatePicker.addPropertyChangeListener(new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent arg0) {
            allDayCheckBox.setEnabled(startDatePicker.getDate() != null || endDatePicker.getDate() != null);
            endTimePicker.setEnabled(endDatePicker.getDate() != null && !allDayCheckBox.isSelected());
        }
    });

    pageNumberField.addKeyListener(new KeyAdapter() {

        @Override
        public void keyReleased(KeyEvent arg0) {
            if (arg0.getKeyCode() == KeyEvent.VK_ENTER && pageGoButton.isEnabled()) {
                jumpToPageNumber();
            }
        }
    });

    updateCachedUserMap();

    advancedSearchPopup = new EventBrowserAdvancedFilter(parent, "Advanced Search Filter", true, userMapById);
    advancedSearchPopup.setVisible(false);

    eventSplitPane.setDividerLocation(0.8);

    this.addAncestorListener(new AncestorListener() {

        @Override
        public void ancestorAdded(AncestorEvent event) {
        }

        @Override
        public void ancestorMoved(AncestorEvent event) {
        }

        @Override
        public void ancestorRemoved(AncestorEvent event) {
            // Stop waiting for event browser requests when the event browser 
            // is no longer being displayed
            parent.mirthClient.getServerConnection().abort(getAbortOperations());
            // Clear the event cache when leaving the event browser.
            parent.eventBrowser.clearCache();
        }

    });
}

From source file:org.jfree.chart.demo.CompassDemo.java

/**
 * Initialises the user interface./*from w  w  w  .java2  s .c  o m*/
 *
 * @throws Exception if there are any exceptions.
 */
void jbInit() throws Exception {
    this.titledBorder1 = new TitledBorder("");
    this.titledBorder2 = new TitledBorder("");
    this.titledBorder3 = new TitledBorder("");
    setLayout(this.gridLayout1);
    this.panelCompassHolder.setLayout(this.borderLayout);
    this.windNullCheckBox.setHorizontalTextPosition(SwingConstants.LEADING);
    this.windNullCheckBox.setText("Null");
    this.windNullCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            checkWindNullActionPerformed(e);
        }
    });
    this.shipNullCheckBox.setHorizontalTextPosition(SwingConstants.LEFT);
    this.shipNullCheckBox.setText("Null");
    this.shipNullCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            checkShipNullActionPerformed(e);
        }
    });

    this.spinShip.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(final PropertyChangeEvent evt) {
            if (DEBUG) {
                System.out.println("compassDemo:spinShipPropertyChange");
            }
            final Spinner spinner = (Spinner) evt.getSource();
            if (spinner.isEnabled()) {
                shipData.setValue(new Double(spinner.getValue()));
            }
        }
    });

    this.spinWind.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(final PropertyChangeEvent evt) {
            if (DEBUG) {
                System.out.println("compassDemo:spinWindPropertyChange");
            }
            final Spinner spinner = (Spinner) evt.getSource();
            if (spinner.isEnabled()) {
                compassData.setValue(new Double(spinner.getValue()));
            }
        }
    });
    this.jPanel12.setLayout(this.gridLayout2);
    this.jPanel2.setBorder(this.titledBorder1);
    this.jPanel2.setLayout(this.gridBagLayout2);
    this.jPanel1.setBorder(this.titledBorder2);
    this.jPanel1.setLayout(this.gridBagLayout1);
    this.titledBorder1.setTitle("Second Pointer");
    this.titledBorder2.setTitle("First Pointer");
    this.titledBorder3.setTitle("Plot Options");
    this.pick2Pointer.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            pick2PointerActionPerformed(e);
        }
    });
    this.pick1Pointer.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            pick1PointerActionPerformed(e);
        }
    });
    add(this.panelCompassHolder, null);
    this.panelCompassHolder.add(this.jPanel12, BorderLayout.SOUTH);
    this.jPanel12.add(this.jPanel1, null);

    this.jPanel1.add(this.pick1Pointer, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));

    this.jPanel1.add(this.windNullCheckBox, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));

    this.jPanel1.add(this.spinWind, new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

    this.jPanel12.add(this.jPanel2, null);

    this.jPanel2.add(this.pick2Pointer, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));

    this.jPanel2.add(this.shipNullCheckBox, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));

    this.jPanel2.add(this.spinShip, new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

    this.panelCompassHolder.add(this.panelCompass, BorderLayout.CENTER);

}

From source file:lu.lippmann.cdb.weka.SilhouetteUtil.java

/**
 * /* www.j a  v a2s . c om*/
 * @param sils
 * @return
 */
public static JPanel buildSilhouettePanel(final Instances ds, final WekaClusteringResult result) {

    final Map<Integer, List<Double>> sils = computeSilhouette(ds, result);

    DefaultCategoryDataset dataset = new DefaultCategoryDataset();

    final JFreeChart chart = ChartFactory.createBarChart("Silhouette", "Category", "Value", dataset,
            PlotOrientation.HORIZONTAL, true, true, false);

    int nbClass = sils.keySet().size();

    int id = 0;
    double minValue = 0;

    int counter[][] = new int[nbClass][4];
    for (int i = 0; i < nbClass; i++) {

        final double[] tree = ArrayUtils.toPrimitive(sils.get(i).toArray(new Double[0]));

        for (double val : tree) {
            if (val > 0.75) {
                dataset.addValue(val, "Cluster " + i + " ++", "" + id);
                counter[i][0]++;
            } else if (val > 0.50) {
                dataset.addValue(val, "Cluster " + i + " +", "" + id);
                counter[i][1]++;
            } else if (val > 0.25) {
                dataset.addValue(val, "Cluster " + i + " =", "" + id);
                counter[i][2]++;
            } else {
                dataset.addValue(val, "Cluster " + i + " -", "" + id);
                counter[i][3]++;
            }
            if (val < minValue) {
                minValue = val;
            }
            id++;
        }

    }

    final CategoryPlot categoryplot = (CategoryPlot) chart.getPlot();
    categoryplot.setBackgroundPaint(Color.WHITE);
    categoryplot.getDomainAxis().setVisible(false);
    categoryplot.setDomainGridlinesVisible(false);
    categoryplot.setRangeGridlinesVisible(false);
    categoryplot.getRangeAxis().setRange(minValue, 1.0);

    //Add line markers
    ValueMarker target = new ValueMarker(0.75);
    target.setPaint(Color.BLACK);
    target.setLabel("  ++");
    target.setLabelAnchor(RectangleAnchor.TOP_LEFT);
    target.setLabelTextAnchor(TextAnchor.TOP_LEFT);
    categoryplot.addRangeMarker(target);

    target = new ValueMarker(0.5);
    target.setPaint(Color.BLACK);
    target.setLabel("  +");
    target.setLabelAnchor(RectangleAnchor.TOP_LEFT);
    target.setLabelTextAnchor(TextAnchor.TOP_LEFT);
    categoryplot.addRangeMarker(target);

    target = new ValueMarker(0.25);
    target.setPaint(Color.BLACK);
    target.setLabel("  =");
    target.setLabelAnchor(RectangleAnchor.TOP_LEFT);
    target.setLabelTextAnchor(TextAnchor.TOP_LEFT);
    categoryplot.addRangeMarker(target);

    target = new ValueMarker(0);
    target.setPaint(Color.BLACK);
    target.setLabel("  -");
    target.setLabelAnchor(RectangleAnchor.TOP_LEFT);
    target.setLabelTextAnchor(TextAnchor.TOP_LEFT);
    categoryplot.addRangeMarker(target);

    //Remove visual effects on bar
    final BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer();
    barrenderer.setBarPainter(new StandardBarPainter());

    //set bar colors
    int p = 0;
    final int max = ColorHelper.COLORBREWER_SEQUENTIAL_PALETTES.size();

    for (int i = 0; i < nbClass; i++) {
        final Color[] color = new ArrayList<Color[]>(ColorHelper.COLORBREWER_SEQUENTIAL_PALETTES.values())
                .get((max - i) % max);
        final int nbColors = color.length;
        for (int k = 0; k < counter[i].length; k++) {
            if (counter[i][k] > 0)
                barrenderer.setSeriesPaint(p++, color[(nbColors - k - 3) % nbColors]);
        }
    }

    //remove blank line between bars
    barrenderer.setItemMargin(-dataset.getRowCount());

    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setMouseWheelEnabled(true);
    chartPanel.setPreferredSize(new Dimension(1200, 900));
    chartPanel.setBorder(new TitledBorder("Silhouette plot"));
    chartPanel.setBackground(Color.WHITE);
    chart.setTitle("");
    return chartPanel;

}

From source file:com.funambol.LDAP.admin.LDAPSyncSourceConfigPanel.java

/**
 * Create the panel// w  ww  .  j  ava 2  s .  c  o m
 * @throws Exception if error occures during creation of the panel
 */
private void init() {
    // set layout
    this.setLayout(null);

    int startX = 14;
    int fontHeight = 18;
    int col1Size = 150;
    int col2X = startX + col1Size + 6; //170px 
    int col2Size = 350;
    int col3X = col2X + col2Size + 6; // 550
    int col3Size = 90;
    int chkboxSize = 18;
    // set properties of label, position and border
    // referred to the title of the panel
    titledBorder1 = new TitledBorder("");

    panelName.setFont(titlePanelFont);
    panelName.setText("Edit LDAP SyncSourceContacts");
    panelName.setBounds(new Rectangle(startX, 5, 316, 28));
    panelName.setAlignmentX(SwingConstants.CENTER);
    panelName.setBorder(titledBorder1);

    int baseline = 60;
    sourceUriLabel.setText("Source URI: ");
    sourceUriLabel.setToolTipText("Choose a unique word");
    sourceUriLabel.setFont(defaultFont);
    sourceUriLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    sourceUriValue.setFont(FONT_ARIAL);
    sourceUriValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    nameLabel.setText("Name: ");
    nameLabel.setToolTipText("Choose a word and set this into your client in order to use this connector");
    nameLabel.setFont(defaultFont);
    nameLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    nameValue.setFont(FONT_ARIAL);
    nameValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    typeLabel.setText("Type: ");
    typeLabel.setToolTipText("Only VCARD are supported, SIF is deprecated");
    typeLabel.setFont(defaultFont);
    typeLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    typeValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    providerUrlLabel.setText("LDAP URI: ");
    providerUrlLabel.setToolTipText("eg. ldap://ldap.example.com , ldaps://ldap.example.com:390 ");
    providerUrlLabel.setFont(defaultFont);
    providerUrlLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    providerUrlValue.setFont(FONT_ARIAL);
    providerUrlValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    ldapBaseLabel.setText("LDAP Base DN: ");
    ldapBaseLabel.setToolTipText(
            "This is used to define where to store/read user's data.\nRead install.txt notes to use parameters");
    ldapBaseLabel.setFont(defaultFont);
    ldapBaseLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    ldapBaseValue.setFont(FONT_ARIAL);
    ldapBaseValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30; // TODO contactDaoLabel, entryFilterLabel
    daoNameLabel.setText("DAO Class for converting item to LDAP");
    daoNameLabel.setToolTipText("piTypePerson, inetOrgPerson or organizationalPerson");
    daoNameLabel.setFont(defaultFont);
    daoNameLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    daoNameValue.setFont(FONT_ARIAL);
    daoNameValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    entryFilterLabel.setText("Filter user by");
    entryFilterLabel
            .setToolTipText("A valid  LDAP search filter, eg: (&(objectclass=inetOrgPerson)(active=1))");
    entryFilterLabel.setFont(defaultFont);
    entryFilterLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    entryFilterValue.setFont(FONT_ARIAL);
    entryFilterValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    ldapUserLabel.setText("LDAP User: ");
    ldapUserLabel.setToolTipText("LDAP Bind DN (username) to access the LDAP server");
    ldapUserLabel.setFont(defaultFont);
    ldapUserLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    ldapUserValue.setFont(FONT_ARIAL);
    ldapUserValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    ldapPassLabel.setText("LDAP Password: ");
    ldapPassLabel.setToolTipText("LDAP Bind DN password to access LDAP server");
    ldapPassLabel.setFont(defaultFont);
    ldapPassLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    ldapPassValue.setFont(FONT_ARIAL);
    ldapPassValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    // follow referral
    followReferralLabel.setText("Follow Referral ");
    followReferralLabel.setToolTipText("Select this checkbox if you want ldap to follow smart-referrals");
    followReferralLabel.setFont(defaultFont);
    followReferralLabel.setBounds(new Rectangle(col3X, 270, col3Size, fontHeight));
    followReferralValue.setSelected(false);
    followReferralValue.setBounds(new Rectangle(col3X, 300, col3Size, fontHeight));
    // connection pooling
    connectionPoolingLabel.setText("Pooling ");
    connectionPoolingLabel.setToolTipText("Select this checkbox if you want use connection pooling");
    connectionPoolingLabel.setFont(defaultFont);
    connectionPoolingLabel.setBounds(new Rectangle(col3X + col3Size, 270, col3Size, fontHeight));
    connectionPoolingValue.setSelected(false);
    connectionPoolingValue.setBounds(new Rectangle(col3X + col3Size, 300, col3Size, fontHeight));

    baseline += 30;
    dbNameLabel.setText("Funambol DBMS Name: ");
    dbNameLabel.setToolTipText("Funambol DS table to store metadata. Use fnblcore");
    dbNameLabel.setFont(defaultFont);
    dbNameLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    dbNameValue.setFont(FONT_ARIAL);
    dbNameValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));

    baseline += 30;
    timeZoneLabel.setFont(defaultFont);
    timeZoneLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    timeZoneValue = new JComboBox(TimeZone.getAvailableIDs());
    timeZoneValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));
    // rpolli
    baseline += 30;
    ldapServerLabel.setText("LDAP Server Type");
    ldapServerLabel.setFont(defaultFont);
    ldapServerLabel.setBounds(new Rectangle(startX, baseline, col1Size, fontHeight));
    ldapServerValue.setBounds(new Rectangle(col2X, baseline, col2Size, fontHeight));
    ldapServerValue.setToolTipText("Select compatibility unique ID's per items.");
    confirmButton.setFont(defaultFont);
    confirmButton.setText("Add");
    confirmButton.setBounds(col2X, 420, 70, 25);

    confirmButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            try {
                validateValues();
                getValues();
                if (getState() == STATE_INSERT) {
                    LDAPSyncSourceConfigPanel.this.actionPerformed(new ActionEvent(
                            LDAPSyncSourceConfigPanel.this, ACTION_EVENT_INSERT, event.getActionCommand()));
                } else {
                    LDAPSyncSourceConfigPanel.this.actionPerformed(new ActionEvent(
                            LDAPSyncSourceConfigPanel.this, ACTION_EVENT_UPDATE, event.getActionCommand()));
                }
            } catch (Exception e) {
                e.printStackTrace();
                notifyError(new AdminException(e.getMessage()));
            }
        }
    });

    // add all components to the panel
    this.add(panelName, null);
    this.add(nameLabel, null);
    this.add(nameValue, null);
    this.add(typeLabel, null);
    this.add(typeValue, null);
    this.add(sourceUriLabel, null);
    this.add(sourceUriValue, null);

    //rpolli
    this.add(ldapServerLabel, null);
    this.add(ldapServerValue, null);
    this.add(this.daoNameLabel, null);
    this.add(this.daoNameValue, null);

    this.add(followReferralLabel, null);
    this.add(followReferralValue, null);
    this.add(connectionPoolingLabel, null);
    this.add(connectionPoolingValue, null);

    this.add(providerUrlLabel, null);
    this.add(providerUrlValue, null);
    //      this.add(ldapPortLabel    , null);
    //      this.add(ldapPortValue    , null);
    //      this.add(isSSLLabel       , null);
    //      this.add(isSSLValue       , null);
    this.add(ldapBaseLabel, null);
    this.add(ldapBaseValue, null);
    this.add(entryFilterLabel, null);
    this.add(entryFilterValue, null);

    this.add(ldapUserLabel, null);
    this.add(ldapUserValue, null);
    this.add(ldapPassLabel, null);
    this.add(ldapPassValue, null);
    this.add(timeZoneLabel, null);
    this.add(timeZoneValue, null);

    this.add(dbNameLabel, null);
    this.add(dbNameValue, null);

    this.add(confirmButton, null);
}

From source file:com.db4o.sync4o.ui.Db4oSyncSourceConfigPanel.java

private void setupControls() {

    // Layout and setup UI components...

    setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
    add(_namePanel);//from   w  ww. jav a 2  s  .c  om
    _namePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    add(_fieldsPanel);
    _fieldsPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    add(_classConfigsTree);
    _classConfigsTree.setAlignmentX(Component.LEFT_ALIGNMENT);
    _classConfigsTree.setPreferredSize(new Dimension(300, 300));
    add(_buttonsPanel);
    _buttonsPanel.setAlignmentX(Component.LEFT_ALIGNMENT);

    JLabel l;

    // Admin UI Management Panels use a title
    // (in a particular "title font") to identify themselves
    l = new JLabel("Edit Db4oSyncSource Configuration", SwingConstants.CENTER);
    l.setBorder(new TitledBorder(""));
    l.setFont(titlePanelFont);
    _namePanel.add(l);

    GridBagConstraints labelConstraints = new GridBagConstraints();
    labelConstraints.gridwidth = 1;
    labelConstraints.fill = GridBagConstraints.NONE;
    labelConstraints.weightx = 0.0;
    labelConstraints.gridx = 0;
    labelConstraints.gridy = 0;
    labelConstraints.anchor = GridBagConstraints.EAST;

    GridBagConstraints fieldConstraints = new GridBagConstraints();
    fieldConstraints.gridwidth = 2;
    fieldConstraints.fill = GridBagConstraints.HORIZONTAL;
    fieldConstraints.weightx = 1.0;
    fieldConstraints.gridx = 1;
    fieldConstraints.gridy = 0;

    _fieldsPanel.add(new JLabel("Source URI: "), labelConstraints);
    _fieldsPanel.add(_sourceUriValue, fieldConstraints);

    labelConstraints.gridy = GridBagConstraints.RELATIVE;
    fieldConstraints.gridy = GridBagConstraints.RELATIVE;

    _fieldsPanel.add(new JLabel("Name: "), labelConstraints);
    _fieldsPanel.add(_nameValue, fieldConstraints);

    fieldConstraints.gridwidth = 1;

    _fieldsPanel.add(new JLabel("db4o File: "), labelConstraints);
    _fieldsPanel.add(_dbFileValue, fieldConstraints);

    _dbFileValue.setEditable(false);

    fieldConstraints.gridwidth = 2;

    GridBagConstraints buttonConstraints = new GridBagConstraints();
    buttonConstraints.gridwidth = 1;
    buttonConstraints.fill = GridBagConstraints.NONE;
    buttonConstraints.gridx = 2;
    buttonConstraints.gridy = 3;
    _dbFileLocateButton.setText("...");
    _fieldsPanel.add(_dbFileLocateButton, buttonConstraints);

    buttonConstraints.gridwidth = 3;
    buttonConstraints.fill = GridBagConstraints.NONE;
    buttonConstraints.gridx = 0;
    buttonConstraints.gridy = GridBagConstraints.RELATIVE;
    buttonConstraints.anchor = GridBagConstraints.CENTER;

    // Ensure all the controls use the Admin UI standard font
    Component[] components = _fieldsPanel.getComponents();
    for (int i = 0; i < components.length; i++) {

        Component c = components[i];
        c.setFont(defaultFont);

    }

    _confirmButton.setText("Add");
    _buttonsPanel.add(_confirmButton);

}