Example usage for javax.swing.border TitledBorder DEFAULT_POSITION

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

Introduction

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

Prototype

int DEFAULT_POSITION

To view the source code for javax.swing.border TitledBorder DEFAULT_POSITION.

Click Source Link

Document

Use the default vertical orientation for the title text.

Usage

From source file:desmoj.extensions.visualization2d.engine.modelGrafic.StatisticGrafic.java

/**
 * Build a StatisticGrafic Instance/*from  ww  w  . j  av a  2  s  . c om*/
 * @param statistic         The associated statistic instance
 * @param viewId         Id of view
 * @param pointExtern      Middle point 
 * @param typeAnimation      Default animation type. This can changed by popup menu.
 *                      For animation types look at StatisticGrafic.ANIMATION_... 
 * @param isIntValue      In typeAnimation == StatisticGrafic.ANIMATION_LastValue
 *                      value is shown as integer.
 * @param deltaSize         The default size can be incremented/decremented 
 *                      by deltaSize. Null means no change. 
 * @param infopane         Grafic is used for infopane 
 * @throws ModelException
 */
public StatisticGrafic(Statistic statistic, String viewId, Point pointExtern, int typeAnimation,
        boolean isIntValue, Dimension deltaSize, boolean infopane) throws ModelException {

    this.statistic = statistic;
    if (viewId == null)
        viewId = "main";
    this.viewId = viewId;
    //System.out.println("StatisticGrafic-Konstructor   id: "+this.statistic.getId());
    this.pointExtern = pointExtern;
    this.transform();
    this.setCode();
    this.setBorder(BorderFactory.createTitledBorder(Grafic.Border_Default, this.code,
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, Grafic.FONT_DEFAULT,
            Grafic.COLOR_BORDER));
    this.deltaSize = deltaSize;
    if (this.deltaSize == null)
        this.deltaSize = new Dimension(0, 0);
    this.typeAnimation = typeAnimation;
    this.isIntValue = isIntValue;
    JPanel content = new JPanel();
    switch (this.typeAnimation) {
    case StatisticGrafic.ANIMATION_LastValue:
        content = this.buildLastValuePanel();
        break;
    case StatisticGrafic.ANIMATION_TimeValueDiagram:
        content = this.buildTimeValueDiagramPanel();
        break;
    case StatisticGrafic.ANIMATION_Histogram:
        if (statistic.hasHistogramSupport())
            content = this.buildHistogramPanel();
        else {
            this.typeAnimation = StatisticGrafic.ANIMATION_TimeValueDiagram;
            content = this.buildTimeValueDiagramPanel();
        }
        break;
    }
    this.setLayout(new GridLayout(1, 1));
    this.add(content);
    this.setOpaque(true);
    Dimension d = new Dimension(content.getPreferredSize().width + this.deltaSize.width,
            content.getPreferredSize().height + this.deltaSize.height);
    this.setBounds(this.pointIntern.x - d.width / 2, this.pointIntern.y - d.height / 2, d.width, d.height);
    this.update();
    // Listener hinzufuegen
    if (this.statistic.getModel().getCoordinatenListener() != null) {
        this.addMouseMotionListener(this.statistic.getModel().getCoordinatenListener());
        this.addMouseListener(this.statistic.getModel().getCoordinatenListener());
        if (!infopane && this.typeAnimation != StatisticGrafic.ANIMATION_LastValue) {
            content.addMouseMotionListener(this.statistic.getModel().getCoordinatenListener());
            content.addMouseListener(this.statistic.getModel().getCoordinatenListener());
        }
    }
    this.addMouseListener(this);
}

From source file:com.sec.ose.osi.ui.frm.main.manage.dialog.JDlgProjectCreate.java

/**
 * This method initializes jPanelSourceLocation   
 *    //from w w w.  j a  va  2  s .  com
 * @return javax.swing.JPanel   
 */
private JPanel getJPanelSourceLocation() {
    if (jPanelSourceLocation == null) {
        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
        gridBagConstraints11.gridx = 1;
        gridBagConstraints11.insets = new Insets(10, 10, 10, 10);
        gridBagConstraints11.gridy = 0;
        GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
        gridBagConstraints10.fill = GridBagConstraints.BOTH;
        gridBagConstraints10.gridy = 0;
        gridBagConstraints10.weightx = 1.0;
        gridBagConstraints10.insets = new Insets(10, 10, 10, 0);
        gridBagConstraints10.anchor = GridBagConstraints.CENTER;
        gridBagConstraints10.gridx = 0;
        jPanelSourceLocation = new JPanel();
        jPanelSourceLocation.setLayout(new GridBagLayout());
        jPanelSourceLocation.setBorder(BorderFactory.createTitledBorder(null, "Source Location",
                TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
                new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
        jPanelSourceLocation.setPreferredSize(new Dimension(500, 200));
        jPanelSourceLocation.add(getJTextFieldSourceLocation(), gridBagConstraints10);
        jPanelSourceLocation.add(getJButtonBrowse(), gridBagConstraints11);
    }
    return jPanelSourceLocation;
}

From source file:net.sf.profiler4j.console.ProjectDialog.java

/**
 * This method initializes defaultOptionsPanel
 * //from   w w w .j av  a2 s . co m
 * @return javax.swing.JPanel
 */
private JPanel getDefaultOptionsPanel() {
    if (defaultOptionsPanel == null) {
        jLabel = new JLabel();
        jLabel.setText("Minimum method visibility");
        jLabel.setBounds(new java.awt.Rectangle(16, 32, 129, 22));
        defaultOptionsPanel = new JPanel();
        defaultOptionsPanel.setLayout(null);
        defaultOptionsPanel.setBorder(BorderFactory.createTitledBorder(null,
                "Rule Options (applies to all ACCEPT rules)", TitledBorder.DEFAULT_JUSTIFICATION,
                TitledBorder.DEFAULT_POSITION, new Font("Tahoma", Font.PLAIN, 11), new Color(0, 70, 213)));
        defaultOptionsPanel.setBounds(new java.awt.Rectangle(408, 56, 289, 103));
        defaultOptionsPanel.add(jLabel, null);
        defaultOptionsPanel.add(getAccessComboBox(), null);
        defaultOptionsPanel.add(getBeanpropsCheckBox(), null);
    }
    return defaultOptionsPanel;
}

From source file:com.sec.ose.osi.ui.frm.main.report.JPanExportReport.java

private JPanel getJPanelForReportTypeInfo() {
    if (jPanelForReportTypeInfo == null) {
        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
        gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints5.gridx = -1;//from www . j a va  2 s  .  co  m
        gridBagConstraints5.gridy = -1;
        gridBagConstraints5.gridwidth = 1;
        gridBagConstraints5.anchor = GridBagConstraints.CENTER;
        gridBagConstraints5.weightx = 1.0;
        gridBagConstraints5.weighty = 0.0;
        gridBagConstraints5.insets = new Insets(0, 10, 5, 150); // margin // top, left, bottom, right
        jPanelForReportTypeInfo = new JPanel();
        jPanelForReportTypeInfo.setLayout(new GridBagLayout());
        jPanelForReportTypeInfo.setBorder(BorderFactory.createTitledBorder(null, "Report Type",
                TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
                new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
        jPanelForReportTypeInfo.add(getJPanelReportTypeInfo(), gridBagConstraints5);
    }
    return jPanelForReportTypeInfo;
}

From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java

/**
 * This method initializes this//  w  ww .  j  a va2 s. co m
 * 
 * @return void
 */
private void initialize() {
    GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
    gridBagConstraints15.gridx = 1;
    gridBagConstraints15.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints15.gridy = 0;
    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.gridx = 1;
    jLabelLicense = new JLabel();
    jLabelLicense.setText("License :");
    jLabelLicense.setFont(new Font("Dialog", Font.PLAIN, 12));
    jLabelComponent = new JLabel();
    jLabelComponent.setText("Component :");
    jLabelComponent.setFont(new Font("Dialog", Font.PLAIN, 12));
    this.setSize(570, 480);
    this.setLayout(new GridBagLayout());
    this.setBorder(BorderFactory.createTitledBorder(null, "Identification Information",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
            new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
    this.add(getJSplitPane(), gridBagConstraints);
    this.add(getJScrollLabel(), gridBagConstraints15);

    getJPanMatchedSourceViewLeft().addScrollAdjustmentObserver(getJPanMatchedSourceViewRight());
    getJPanMatchedSourceViewRight().addScrollAdjustmentObserver(getJPanMatchedSourceViewLeft());

}

From source file:com.sec.ose.osi.ui.frm.main.identification.stringmatch.JPanStringMatchMain.java

/**
 * This method initializes jScrollPane1   
 *    /*from ww  w  . j a  v  a  2  s  .c  o  m*/
 * @return javax.swing.JScrollPane   
 */
private JScrollPane getJScrollPaneSourceCode() {
    if (jScrollPaneSourceCode == null) {
        jScrollPaneSourceCode = new JScrollPane();
        jScrollPaneSourceCode.setBorder(BorderFactory.createTitledBorder(null, "Source Code",
                TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
                new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));

        jScrollPaneSourceCode.getVerticalScrollBar().setUnitIncrement(ConstantValue.CODE_SCROLL_SIZE);

        JPanel SourceCodePanel = new JPanel();
        SourceCodePanel.setLayout(new BorderLayout());
        SourceCodePanel.add(getJTextPaneSourceCodeNum(), BorderLayout.WEST);
        SourceCodePanel.add(getJTextPaneSourceCode(), BorderLayout.CENTER);
        jScrollPaneSourceCode.setViewportView(SourceCodePanel);
    }
    return jScrollPaneSourceCode;
}

From source file:net.sf.profiler4j.console.ProjectDialog.java

/**
 * This method initializes jPanel2/*from   w w w.j a v a  2  s .co  m*/
 * 
 * @return javax.swing.JPanel
 */
private JPanel getRulesPanel() {
    if (rulesPanel == null) {
        rulesPanel = new JPanel();
        rulesPanel.setLayout(new BorderLayout());
        rulesPanel.setBounds(new java.awt.Rectangle(7, 165, 691, 211));
        rulesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
                "Method Rules (evaluated top-down)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
                javax.swing.border.TitledBorder.DEFAULT_POSITION,
                new java.awt.Font("Tahoma", java.awt.Font.PLAIN, 11), new java.awt.Color(0, 70, 213)));
        rulesPanel.add(getTableScrollPane(), BorderLayout.CENTER);
        rulesPanel.add(getToolBar(), BorderLayout.NORTH);
    }
    return rulesPanel;
}

From source file:com.sec.ose.osi.ui.frm.login.JPanLogin.java

/**
 * This method initializes jPanel1   /*  w ww. j  a va2  s . co m*/
 *    
 * @return javax.swing.JPanel   
 */
private JPanel getJPanelForUserInfo() {
    if (jPanelForUserInfo == null) {
        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
        gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints5.gridx = -1;
        gridBagConstraints5.gridy = -1;
        gridBagConstraints5.gridwidth = 1;
        gridBagConstraints5.anchor = GridBagConstraints.CENTER;
        gridBagConstraints5.weightx = 1.0;
        gridBagConstraints5.weighty = 0.0;
        //gridBagConstraints5.insets = new Insets(10, 10, 0, 20);
        jPanelForUserInfo = new JPanel();
        jPanelForUserInfo.setLayout(new GridBagLayout());
        jPanelForUserInfo.setBorder(BorderFactory.createTitledBorder(null, "User Info",
                TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
                new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
        jPanelForUserInfo.add(getJPanelUserInfo(), gridBagConstraints5);
    }
    return jPanelForUserInfo;
}

From source file:com.mirth.connect.client.ui.panels.connectors.SourceSettingsPanel.java

private void initComponents() {
    setBackground(UIConstants.BACKGROUND_COLOR);
    setBorder(BorderFactory.createTitledBorder(
            BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "Source Settings",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11)));

    sourceQueueLabel = new JLabel("Source Queue:");

    sourceQueueComboBox = new MirthComboBox();
    sourceQueueComboBox.setModel(new DefaultComboBoxModel(
            new String[] { "OFF (Respond after processing)", "ON (Respond before processing)" }));
    sourceQueueComboBox.setToolTipText(//  w  w  w.j a  va 2  s. com
            "<html>Selecting OFF will process the message before sending the response (can use response from destinations)<br>Selecting ON will queue messages and immediately send a response (cannot use response from destinations)</html>");
    sourceQueueComboBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            sourceQueueComboBoxActionPerformed(evt);
        }
    });

    queueWarningLabel = new JLabel("Queuing is not supported by the current message storage mode.");
    queueWarningLabel.setForeground(Color.RED);

    queueBufferSizeLabel = new JLabel("Queue Buffer Size:");
    queueBufferSizeField = new JTextField();
    queueBufferSizeField.setDocument(new MirthFieldConstraints(0, false, false, true));
    queueBufferSizeField.setToolTipText(
            "<html>The buffer size for the source queue.<br/>Up to this many connector messages may<br/>be held in memory at once when queuing.</html>");

    responseLabel = new JLabel("Response:");

    responseComboBox = new MirthComboBox();
    responseComboBox
            .setModel(new DefaultComboBoxModel(new String[] { "Auto-generate (After source transformer)",
                    "None", "Auto-generate (Before processing)", "Auto-generate (After source transformer)",
                    "Auto-generate (Destinations completed)", "Post-processor", "Destination 1" }));
    responseComboBox.setToolTipText(
            "<html>Select a destination's response, the postprocessor return value, or a response map variable.<br/>Select <b>\"Auto-generate\"</b> to send a response generated by the inbound data type using the raw message:<br/>&nbsp;- <b>Before processing:</b> Response generated before the channel processes the message (SENT status)<br/>&nbsp;- <b>After source transformer:</b> Response generated after the channel processes the message (source status)<br/>&nbsp;- <b>Destinations completed:</b> Response generated after the channel processes the message, with a status<br/>&nbsp;&nbsp;&nbsp;&nbsp;based on the destination statuses, using a precedence of ERROR, QUEUED, SENT, FILTERED<br/></html>");

    processBatchLabel = new JLabel("Process Batch:");
    ButtonGroup processBatchButtonGroup = new ButtonGroup();

    processBatchYesRadio = new MirthRadioButton("Yes");
    processBatchYesRadio.setBackground(getBackground());
    processBatchYesRadio.setToolTipText(
            "<html>Select Yes to enable batch processing. Batch messages are only supported if<br>the source connector's inbound properties contains a <b>Batch</b> section.</html>");
    processBatchYesRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            processBatchYesRadioActionPerformed(evt);
        }
    });
    processBatchButtonGroup.add(processBatchYesRadio);

    processBatchNoRadio = new MirthRadioButton("No");
    processBatchNoRadio.setBackground(getBackground());
    processBatchNoRadio.setToolTipText(
            "<html>Select Yes to enable batch processing. Batch messages are only supported if<br>the source connector's inbound properties contains a <b>Batch</b> section.</html>");
    processBatchNoRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            processBatchNoRadioActionPerformed(evt);
        }
    });
    processBatchButtonGroup.add(processBatchNoRadio);

    batchResponseLabel = new JLabel("Batch Response:");
    ButtonGroup batchResponseButtonGroup = new ButtonGroup();

    batchResponseFirstRadio = new MirthRadioButton("First");
    batchResponseFirstRadio.setBackground(getBackground());
    batchResponseFirstRadio.setToolTipText(
            "<html>Each message in the batch contains its own response that is generated via the method selected above.<br> Select either the response from the first or last message in the batch to be sent back to the originating system.</html>");
    batchResponseButtonGroup.add(batchResponseFirstRadio);

    batchResponseLastRadio = new MirthRadioButton("Last");
    batchResponseLastRadio.setBackground(getBackground());
    batchResponseLastRadio.setToolTipText(
            "<html>Each message in the batch contains its own response that is generated via the method selected above.<br> Select either the response from the first or last message in the batch to be sent back to the originating system.</html>");
    batchResponseButtonGroup.add(batchResponseLastRadio);

    processingThreadsLabel = new JLabel("Max Processing Threads:");

    processingThreadsField = new MirthTextField();
    processingThreadsField.setDocument(new MirthFieldConstraints(0, false, false, true));
    processingThreadsField.setToolTipText(
            "<html>The maximum number of messages that can process through<br/>the channel simultaneously. Note that when this value<br/>is greater than 1, message order is NOT guaranteed.</html>");
}

From source file:com.mirth.connect.client.ui.SettingsPanelAdministrator.java

private void initComponents() {
    setBackground(UIConstants.BACKGROUND_COLOR);

    systemSettingsPanel = new JPanel();
    systemSettingsPanel.setBackground(getBackground());
    systemSettingsPanel.setBorder(BorderFactory.createTitledBorder(
            BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "System Preferences",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11)));

    dashboardRefreshIntervalLabel = new JLabel("Dashboard refresh interval (seconds):");
    dashboardRefreshIntervalField = new MirthTextField();
    dashboardRefreshIntervalField.setToolTipText(
            "<html>Interval in seconds at which to refresh the Dashboard. Decrement this for <br>faster updates, and increment it for slower servers with more channels.</html>");

    String toolTipText = "Sets the default page size for browsers (message, event, etc.)";
    messageBrowserPageSizeLabel = new JLabel("Message browser page size:");
    messageBrowserPageSizeField = new MirthTextField();
    messageBrowserPageSizeField.setToolTipText(toolTipText);

    eventBrowserPageSizeLabel = new JLabel("Event browser page size:");
    eventBrowserPageSizeField = new MirthTextField();
    eventBrowserPageSizeField.setToolTipText(toolTipText);

    formatLabel = new JLabel("Format text in message browser:");
    formatButtonGroup = new ButtonGroup();

    toolTipText = "Pretty print messages in the message browser.";
    formatYesRadio = new MirthRadioButton("Yes");
    formatYesRadio.setBackground(systemSettingsPanel.getBackground());
    formatYesRadio.setToolTipText(toolTipText);
    formatButtonGroup.add(formatYesRadio);

    formatNoRadio = new MirthRadioButton("No");
    formatNoRadio.setBackground(systemSettingsPanel.getBackground());
    formatNoRadio.setToolTipText(toolTipText);
    formatButtonGroup.add(formatNoRadio);

    textSearchWarningLabel = new JLabel("Message browser text search confirmation:");
    textSearchWarningButtonGroup = new ButtonGroup();

    toolTipText = "<html>Show a confirmation dialog in the message browser when attempting a text search, warning users<br/>that the query may take a long time depending on the amount of messages being searched.</html>";
    textSearchWarningYesRadio = new MirthRadioButton("Yes");
    textSearchWarningYesRadio.setBackground(systemSettingsPanel.getBackground());
    textSearchWarningYesRadio.setToolTipText(toolTipText);
    textSearchWarningButtonGroup.add(textSearchWarningYesRadio);

    textSearchWarningNoRadio = new MirthRadioButton("No");
    textSearchWarningNoRadio.setBackground(systemSettingsPanel.getBackground());
    textSearchWarningNoRadio.setToolTipText(toolTipText);
    textSearchWarningButtonGroup.add(textSearchWarningNoRadio);

    importChannelLibrariesLabel = new JLabel("Import code template libraries with channels:");
    importChannelLibrariesButtonGroup = new ButtonGroup();

    toolTipText = "<html>When attempting to import channels that have code template<br/>libraries linked to them, select Yes to always include them,<br/>No to never include them, or Ask to prompt the user each time.</html>";
    importChannelLibrariesYesRadio = new MirthRadioButton("Yes");
    importChannelLibrariesYesRadio.setBackground(systemSettingsPanel.getBackground());
    importChannelLibrariesYesRadio.setToolTipText(toolTipText);
    importChannelLibrariesButtonGroup.add(importChannelLibrariesYesRadio);

    importChannelLibrariesNoRadio = new MirthRadioButton("No");
    importChannelLibrariesNoRadio.setBackground(systemSettingsPanel.getBackground());
    importChannelLibrariesNoRadio.setToolTipText(toolTipText);
    importChannelLibrariesButtonGroup.add(importChannelLibrariesNoRadio);

    importChannelLibrariesAskRadio = new MirthRadioButton("Ask");
    importChannelLibrariesAskRadio.setBackground(systemSettingsPanel.getBackground());
    importChannelLibrariesAskRadio.setToolTipText(toolTipText);
    importChannelLibrariesButtonGroup.add(importChannelLibrariesAskRadio);

    exportChannelLibrariesLabel = new JLabel("Export code template libraries with channels:");
    exportChannelLibrariesButtonGroup = new ButtonGroup();

    toolTipText = "<html>When attempting to export channels that have code template<br/>libraries linked to them, select Yes to always include them,<br/>No to never include them, or Ask to prompt the user each time.</html>";
    exportChannelLibrariesYesRadio = new MirthRadioButton("Yes");
    exportChannelLibrariesYesRadio.setBackground(systemSettingsPanel.getBackground());
    exportChannelLibrariesYesRadio.setToolTipText(toolTipText);
    exportChannelLibrariesButtonGroup.add(exportChannelLibrariesYesRadio);

    exportChannelLibrariesNoRadio = new MirthRadioButton("No");
    exportChannelLibrariesNoRadio.setBackground(systemSettingsPanel.getBackground());
    exportChannelLibrariesNoRadio.setToolTipText(toolTipText);
    exportChannelLibrariesButtonGroup.add(exportChannelLibrariesNoRadio);

    exportChannelLibrariesAskRadio = new MirthRadioButton("Ask");
    exportChannelLibrariesAskRadio.setBackground(systemSettingsPanel.getBackground());
    exportChannelLibrariesAskRadio.setToolTipText(toolTipText);
    exportChannelLibrariesButtonGroup.add(exportChannelLibrariesAskRadio);

    userSettingsPanel = new JPanel();
    userSettingsPanel.setBackground(getBackground());
    userSettingsPanel.setBorder(BorderFactory.createTitledBorder(
            BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "User Preferences",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11)));

    checkForNotificationsLabel = new JLabel("Check for new notifications on login:");
    notificationButtonGroup = new ButtonGroup();

    checkForNotificationsYesRadio = new MirthRadioButton("Yes");
    checkForNotificationsYesRadio.setBackground(userSettingsPanel.getBackground());
    checkForNotificationsYesRadio.setToolTipText(
            "<html>Checks for notifications from Mirth (announcements, available updates, etc.)<br/>relevant to this version of Mirth Connect whenever user logs in.</html>");
    notificationButtonGroup.add(checkForNotificationsYesRadio);

    checkForNotificationsNoRadio = new MirthRadioButton("No");
    checkForNotificationsNoRadio.setBackground(userSettingsPanel.getBackground());
    checkForNotificationsNoRadio.setToolTipText(
            "<html>Checks for notifications from Mirth (announcements, available updates, etc.)<br/>relevant to this version of Mirth Connect whenever user logs in.</html>");
    notificationButtonGroup.add(checkForNotificationsNoRadio);

    codeEditorSettingsPanel = new JPanel();
    codeEditorSettingsPanel.setBackground(getBackground());
    codeEditorSettingsPanel.setBorder(BorderFactory.createTitledBorder(
            BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "Code Editor Preferences",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11)));

    toolTipText = "<html>The auto-completion popup will be triggered<br/>after any of these characters are typed.</html>";
    autoCompleteCharactersLabel = new JLabel("Auto-Complete Characters:");
    autoCompleteCharactersField = new MirthTextField();
    autoCompleteCharactersField.setToolTipText(toolTipText);
    autoCompleteCharactersField.getDocument().addDocumentListener(new DocumentListener() {
        @Override//from  www.  ja va2  s  .c om
        public void insertUpdate(DocumentEvent evt) {
            autoCompleteActionPerformed();
        }

        @Override
        public void removeUpdate(DocumentEvent evt) {
            autoCompleteActionPerformed();
        }

        @Override
        public void changedUpdate(DocumentEvent evt) {
            autoCompleteActionPerformed();
        }
    });

    toolTipText = "<html>If selected, auto-completion will be<br/>triggered after any letter is typed.</html>";
    autoCompleteIncludeLettersCheckBox = new MirthCheckBox("Include Letters");
    autoCompleteIncludeLettersCheckBox.setBackground(codeEditorSettingsPanel.getBackground());
    autoCompleteIncludeLettersCheckBox.setToolTipText(toolTipText);
    autoCompleteIncludeLettersCheckBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            autoCompleteActionPerformed();
        }
    });

    toolTipText = "<html>The amount of time to wait after typing<br/>an activation character before opening<br/>the auto-completion popup menu.</html>";
    autoCompleteDelayLabel = new JLabel("Activation Delay (ms):");
    autoCompleteDelayField = new MirthTextField();
    autoCompleteDelayField.setToolTipText(toolTipText);
    autoCompleteDelayField.setDocument(new MirthFieldConstraints(9, false, false, true));

    shortcutKeyLabel = new JLabel("Shortcut Key Mappings:");

    shortcutKeyTable = new MirthTable();
    shortcutKeyTable.setModel(new RefreshTableModel(
            new Object[] { "Action Info", "Name", "Description", "Shortcut Key Mapping" }, 0) {
        @Override
        public boolean isCellEditable(int row, int column) {
            return column == KEY_COLUMN;
        }
    });

    shortcutKeyTable.setDragEnabled(false);
    shortcutKeyTable.setRowSelectionAllowed(false);
    shortcutKeyTable.setRowHeight(UIConstants.ROW_HEIGHT);
    shortcutKeyTable.setFocusable(false);
    shortcutKeyTable.setOpaque(true);
    shortcutKeyTable.setSortable(true);

    if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) {
        shortcutKeyTable.setHighlighters(HighlighterFactory
                .createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR, UIConstants.BACKGROUND_COLOR));
    }

    shortcutKeyTable.getColumnModel().getColumn(NAME_COLUMN).setMinWidth(145);
    shortcutKeyTable.getColumnModel().getColumn(NAME_COLUMN).setPreferredWidth(145);

    shortcutKeyTable.getColumnModel().getColumn(DESCRIPTION_COLUMN).setPreferredWidth(600);

    shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setMinWidth(120);
    shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setPreferredWidth(150);
    shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setCellRenderer(new KeyStrokeCellRenderer());
    shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setCellEditor(new KeyStrokeCellEditor());

    shortcutKeyTable.removeColumn(shortcutKeyTable.getColumnModel().getColumn(ACTION_INFO_COLUMN));

    shortcutKeyTable.getModel().addTableModelListener(new TableModelListener() {
        @Override
        public void tableChanged(TableModelEvent evt) {
            updateRestoreDefaultsButton();
        }
    });

    shortcutKeyScrollPane = new JScrollPane(shortcutKeyTable);

    restoreDefaultsButton = new JButton("Restore Defaults");
    restoreDefaultsButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            restoreDefaults();
        }
    });
}