Example usage for javax.swing SwingConstants CENTER

List of usage examples for javax.swing SwingConstants CENTER

Introduction

In this page you can find the example usage for javax.swing SwingConstants CENTER.

Prototype

int CENTER

To view the source code for javax.swing SwingConstants CENTER.

Click Source Link

Document

The central position in an area.

Usage

From source file:op.care.prescription.DlgOnDemand.java

/**
 * This method is called from within the constructor to
 * initialize the form.//from  ww w  . j ava2  s.c  o m
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the PrinterForm Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    jPanel1 = new JPanel();
    txtMed = new JXSearchField();
    cmbMed = new JComboBox<>();
    panel4 = new JPanel();
    btnMedWizard = new JButton();
    cmbIntervention = new JComboBox<>();
    txtSit = new JXSearchField();
    cmbSit = new JComboBox<>();
    panel3 = new JPanel();
    btnAddSit = new JButton();
    txtIntervention = new JXSearchField();
    jPanel2 = new JPanel();
    lblNumber = new JLabel();
    lblDose = new JLabel();
    lblMaxPerDay = new JLabel();
    txtMaxTimes = new JTextField();
    lblX = new JLabel();
    txtEDosis = new JTextField();
    lblCheckResultAfter = new JLabel();
    cmbCheckAfter = new JComboBox<>();
    jPanel3 = new JPanel();
    pnlOFF = new JPanel();
    rbActive = new JRadioButton();
    rbDate = new JRadioButton();
    txtOFF = new JTextField();
    jScrollPane3 = new JScrollPane();
    txtBemerkung = new JTextPane();
    lblText = new JLabel();
    pnlON = new JPanel();
    cmbDocON = new JComboBox<>();
    cmbHospitalON = new JComboBox<>();
    panel1 = new JPanel();
    btnClose = new JButton();
    btnSave = new JButton();

    //======== this ========
    setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    setResizable(false);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("14dlu, $lcgap, default, 6dlu, 355dlu, $lcgap, 14dlu",
            "14dlu, $lgap, fill:default:grow, $lgap, fill:default, $lgap, 14dlu"));

    //======== jPanel1 ========
    {
        jPanel1.setBorder(null);
        jPanel1.setLayout(new FormLayout("68dlu, $lcgap, pref:grow, $lcgap, pref",
                "3*(16dlu, $lgap), default, $lgap, fill:113dlu:grow, $lgap, 60dlu"));

        //---- txtMed ----
        txtMed.setFont(new Font("Arial", Font.PLAIN, 14));
        txtMed.setPrompt("Medikamente");
        txtMed.setFocusBehavior(PromptSupport.FocusBehavior.HIGHLIGHT_PROMPT);
        txtMed.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                txtMedActionPerformed(e);
            }
        });
        txtMed.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtMedFocusGained(e);
            }
        });
        jPanel1.add(txtMed, CC.xy(1, 1));

        //---- cmbMed ----
        cmbMed.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbMed.setFont(new Font("Arial", Font.PLAIN, 14));
        cmbMed.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                cmbMedItemStateChanged(e);
            }
        });
        jPanel1.add(cmbMed, CC.xy(3, 1));

        //======== panel4 ========
        {
            panel4.setLayout(new BoxLayout(panel4, BoxLayout.LINE_AXIS));

            //---- btnMedWizard ----
            btnMedWizard.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png")));
            btnMedWizard.setBorderPainted(false);
            btnMedWizard.setBorder(null);
            btnMedWizard.setContentAreaFilled(false);
            btnMedWizard.setToolTipText("Neues Medikament eintragen");
            btnMedWizard.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnMedWizard.setSelectedIcon(
                    new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png")));
            btnMedWizard.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    btnMedActionPerformed(e);
                }
            });
            panel4.add(btnMedWizard);
        }
        jPanel1.add(panel4, CC.xy(5, 1));

        //---- cmbIntervention ----
        cmbIntervention
                .setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbIntervention.setFont(new Font("Arial", Font.PLAIN, 14));
        jPanel1.add(cmbIntervention, CC.xywh(3, 5, 3, 1));

        //---- txtSit ----
        txtSit.setPrompt("Situationen");
        txtSit.setFont(new Font("Arial", Font.PLAIN, 14));
        txtSit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                txtSitActionPerformed(e);
            }
        });
        jPanel1.add(txtSit, CC.xy(1, 3));

        //---- cmbSit ----
        cmbSit.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbSit.setFont(new Font("Arial", Font.PLAIN, 14));
        cmbSit.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                cmbSitItemStateChanged(e);
            }
        });
        cmbSit.addPropertyChangeListener("model", new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent e) {
                cmbSitPropertyChange(e);
            }
        });
        jPanel1.add(cmbSit, CC.xy(3, 3));

        //======== panel3 ========
        {
            panel3.setLayout(new BoxLayout(panel3, BoxLayout.LINE_AXIS));

            //---- btnAddSit ----
            btnAddSit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png")));
            btnAddSit.setBorderPainted(false);
            btnAddSit.setBorder(null);
            btnAddSit.setContentAreaFilled(false);
            btnAddSit.setToolTipText("Neue  Situation eintragen");
            btnAddSit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnAddSit.setSelectedIcon(
                    new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png")));
            btnAddSit.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    btnSituationActionPerformed(e);
                }
            });
            panel3.add(btnAddSit);
        }
        jPanel1.add(panel3, CC.xy(5, 3, CC.RIGHT, CC.DEFAULT));

        //---- txtIntervention ----
        txtIntervention.setFont(new Font("Arial", Font.PLAIN, 14));
        txtIntervention.setPrompt("Massnahmen");
        txtIntervention.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                txtMassActionPerformed(e);
            }
        });
        jPanel1.add(txtIntervention, CC.xy(1, 5));

        //======== jPanel2 ========
        {
            jPanel2.setLayout(new FormLayout("default, $lcgap, pref, $lcgap, default, $lcgap, 37dlu:grow",
                    "23dlu, fill:22dlu, $ugap, default"));

            //---- lblNumber ----
            lblNumber.setText("Anzahl");
            jPanel2.add(lblNumber, CC.xy(3, 1));

            //---- lblDose ----
            lblDose.setText("Dosis");
            jPanel2.add(lblDose, CC.xy(7, 1, CC.CENTER, CC.DEFAULT));

            //---- lblMaxPerDay ----
            lblMaxPerDay.setText("Max. Tagesdosis:");
            jPanel2.add(lblMaxPerDay, CC.xy(1, 2));

            //---- txtMaxTimes ----
            txtMaxTimes.setHorizontalAlignment(SwingConstants.CENTER);
            txtMaxTimes.setText("1");
            txtMaxTimes.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    txtMaxTimesActionPerformed(e);
                }
            });
            txtMaxTimes.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    txtMaxTimesFocusGained(e);
                }

                @Override
                public void focusLost(FocusEvent e) {
                    txtMaxTimesFocusLost(e);
                }
            });
            jPanel2.add(txtMaxTimes, CC.xy(3, 2));

            //---- lblX ----
            lblX.setText("x");
            jPanel2.add(lblX, CC.xy(5, 2));

            //---- txtEDosis ----
            txtEDosis.setHorizontalAlignment(SwingConstants.CENTER);
            txtEDosis.setText("1.0");
            txtEDosis.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    txtEDosisFocusGained(e);
                }

                @Override
                public void focusLost(FocusEvent e) {
                    txtEDosisFocusLost(e);
                }
            });
            txtEDosis.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    txtEDosisActionPerformed(e);
                }
            });
            jPanel2.add(txtEDosis, CC.xy(7, 2));

            //---- lblCheckResultAfter ----
            lblCheckResultAfter.setText("Nachkontrolle:");
            jPanel2.add(lblCheckResultAfter, CC.xy(1, 4));

            //---- cmbCheckAfter ----
            cmbCheckAfter.setModel(new DefaultComboBoxModel<>(new String[] { "keine Nachkontrolle",
                    "nach 1 Stunde", "nach 2 Stunden", "nach 3 Stunden" }));
            jPanel2.add(cmbCheckAfter, CC.xywh(3, 4, 5, 1));
        }
        jPanel1.add(jPanel2, CC.xywh(1, 9, 5, 1, CC.CENTER, CC.TOP));
    }
    contentPane.add(jPanel1, CC.xy(5, 3));

    //======== jPanel3 ========
    {
        jPanel3.setBorder(null);
        jPanel3.setLayout(new FormLayout("149dlu", "3*(fill:default, $lgap), fill:100dlu:grow"));

        //======== pnlOFF ========
        {
            pnlOFF.setBorder(new TitledBorder("Absetzung"));
            pnlOFF.setLayout(new FormLayout("pref, 86dlu:grow", "fill:17dlu, $lgap, fill:17dlu"));

            //---- rbActive ----
            rbActive.setText("text");
            rbActive.setSelected(true);
            rbActive.addItemListener(new ItemListener() {
                @Override
                public void itemStateChanged(ItemEvent e) {
                    rbActiveItemStateChanged(e);
                }
            });
            pnlOFF.add(rbActive, CC.xywh(1, 1, 2, 1));

            //---- rbDate ----
            rbDate.setText(null);
            rbDate.addItemListener(new ItemListener() {
                @Override
                public void itemStateChanged(ItemEvent e) {
                    rbDateItemStateChanged(e);
                }
            });
            pnlOFF.add(rbDate, CC.xy(1, 3));

            //---- txtOFF ----
            txtOFF.setEnabled(false);
            txtOFF.setFont(new Font("Arial", Font.PLAIN, 14));
            txtOFF.addFocusListener(new FocusAdapter() {
                @Override
                public void focusLost(FocusEvent e) {
                    txtOFFFocusLost(e);
                }
            });
            pnlOFF.add(txtOFF, CC.xy(2, 3));
        }
        jPanel3.add(pnlOFF, CC.xy(1, 3));

        //======== jScrollPane3 ========
        {

            //---- txtBemerkung ----
            txtBemerkung.addCaretListener(new CaretListener() {
                @Override
                public void caretUpdate(CaretEvent e) {
                    txtBemerkungCaretUpdate(e);
                }
            });
            jScrollPane3.setViewportView(txtBemerkung);
        }
        jPanel3.add(jScrollPane3, CC.xy(1, 7));

        //---- lblText ----
        lblText.setText("Bemerkung:");
        jPanel3.add(lblText, CC.xy(1, 5));

        //======== pnlON ========
        {
            pnlON.setBorder(new TitledBorder("Ansetzung"));
            pnlON.setLayout(new FormLayout("119dlu:grow", "17dlu, $lgap, fill:17dlu"));

            //---- cmbDocON ----
            cmbDocON.setModel(
                    new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
            cmbDocON.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    cmbDocONKeyPressed(e);
                }
            });
            pnlON.add(cmbDocON, CC.xy(1, 1));

            //---- cmbHospitalON ----
            cmbHospitalON.setModel(
                    new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
            pnlON.add(cmbHospitalON, CC.xy(1, 3));
        }
        jPanel3.add(pnlON, CC.xy(1, 1));
    }
    contentPane.add(jPanel3, CC.xy(3, 3));

    //======== panel1 ========
    {
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.LINE_AXIS));

        //---- btnClose ----
        btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png")));
        btnClose.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        btnClose.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                btnCloseActionPerformed(e);
            }
        });
        panel1.add(btnClose);

        //---- btnSave ----
        btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png")));
        btnSave.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        btnSave.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                btnSaveActionPerformed(e);
            }
        });
        panel1.add(btnSave);
    }
    contentPane.add(panel1, CC.xy(5, 5, CC.RIGHT, CC.DEFAULT));
    setSize(1035, 515);
    setLocationRelativeTo(getOwner());

    //---- bgMedikament ----
    ButtonGroup bgMedikament = new ButtonGroup();
    bgMedikament.add(rbActive);
    bgMedikament.add(rbDate);
}

From source file:op.controlling.DlgQMSPlan.java

/**
 * This method is called from within the constructor to
 * initialize the form.//from  ww  w.j a v  a  2s  .  c  om
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the PrinterForm Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    pnlLeft = new JPanel();
    lblTitle = new JLabel();
    txtTitle = new JTextField();
    lblNotify = new JideLabel();
    cmbNotify = new JComboBox();
    jScrollPane3 = new JScrollPane();
    txtDescription = new JTextArea();
    lblDescription = new JideLabel();
    scrollPane1 = new JScrollPane();
    lstNotify = new JList();
    lblTags = new JLabel();
    panel1 = new JPanel();
    btnCancel = new JButton();
    btnSave = new JButton();

    //======== this ========
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("14dlu, $lcgap, pref:grow, $ugap, pref",
            "fill:14dlu, $lgap, fill:default:grow, $rgap, pref, $lgap, 14dlu"));

    //======== pnlLeft ========
    {
        pnlLeft.setLayout(new FormLayout("pref, $lcgap, default:grow, $lcgap, pref, $lcgap, default:grow",
                "default, $lgap, fill:default, $rgap, fill:default:grow, $lgap, 40dlu, $rgap, default"));

        //---- lblTitle ----
        lblTitle.setFont(new Font("Arial", Font.PLAIN, 18));
        lblTitle.setText("Stichwort");
        lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
        pnlLeft.add(lblTitle, CC.xy(3, 1));

        //---- txtTitle ----
        txtTitle.setFont(new Font("Arial", Font.PLAIN, 20));
        txtTitle.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtTitleFocusGained(e);
            }
        });
        pnlLeft.add(txtTitle, CC.xy(3, 3));

        //---- lblNotify ----
        lblNotify.setText("text");
        lblNotify.setOrientation(1);
        lblNotify.setFont(new Font("Arial", Font.PLAIN, 18));
        lblNotify.setHorizontalAlignment(SwingConstants.CENTER);
        lblNotify.setClockwise(false);
        pnlLeft.add(lblNotify, CC.xywh(5, 3, 1, 3));

        //---- cmbNotify ----
        cmbNotify.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                cmbNotifyItemStateChanged(e);
            }
        });
        pnlLeft.add(cmbNotify, CC.xy(7, 3));

        //======== jScrollPane3 ========
        {

            //---- txtDescription ----
            txtDescription.setColumns(20);
            txtDescription.setLineWrap(true);
            txtDescription.setRows(5);
            txtDescription.setWrapStyleWord(true);
            txtDescription.setFont(new Font("Arial", Font.PLAIN, 14));
            txtDescription.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    txtDescriptionFocusGained(e);
                }
            });
            jScrollPane3.setViewportView(txtDescription);
        }
        pnlLeft.add(jScrollPane3, CC.xy(3, 5));

        //---- lblDescription ----
        lblDescription.setFont(new Font("Arial", Font.PLAIN, 18));
        lblDescription.setText("Situation");
        lblDescription.setOrientation(1);
        lblDescription.setClockwise(false);
        pnlLeft.add(lblDescription, CC.xy(1, 5, CC.DEFAULT, CC.CENTER));

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

            //---- lstNotify ----
            lstNotify.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            lstNotify.addListSelectionListener(new ListSelectionListener() {
                @Override
                public void valueChanged(ListSelectionEvent e) {
                    lstNotifyValueChanged(e);
                }
            });
            scrollPane1.setViewportView(lstNotify);
        }
        pnlLeft.add(scrollPane1, CC.xy(7, 5));

        //---- lblTags ----
        lblTags.setFont(new Font("Arial", Font.PLAIN, 18));
        lblTags.setText("Markierung");
        lblTags.setHorizontalAlignment(SwingConstants.CENTER);
        pnlLeft.add(lblTags, CC.xywh(3, 9, 5, 1));
    }
    contentPane.add(pnlLeft, CC.xy(3, 3));

    //======== panel1 ========
    {
        panel1.setLayout(new HorizontalLayout(5));

        //---- btnCancel ----
        btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png")));
        btnCancel.setText(null);
        btnCancel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                btnCancelActionPerformed(e);
            }
        });
        panel1.add(btnCancel);

        //---- btnSave ----
        btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png")));
        btnSave.setText(null);
        btnSave.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                btnSaveActionPerformed(e);
            }
        });
        panel1.add(btnSave);
    }
    contentPane.add(panel1, CC.xy(3, 5, CC.RIGHT, CC.DEFAULT));
    setSize(710, 495);
    setLocationRelativeTo(getOwner());
}

From source file:op.FrmMain.java

/**
 * This method is called from within the constructor to
 * initialize the form./*from w  w w.  j ava  2  s  .  co m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the PrinterForm Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    pnlMain = new JPanel();
    pnlMainMessage = new JPanel();
    btnTX = new JButton();
    panel1 = new JPanel();
    pnlIcons = new JPanel();
    lblMainMsg = new JLabel();
    btnExit = new JButton();
    lblSubMsg = new JideLabel();
    btnHelp = new JButton();
    pbMsg = new JProgressBar();
    btnReload = new JButton();
    splitPaneLeft = new JideSplitPane();
    pnlCard = new JPanel();
    pnlWait = new JPanel();
    lblWait = new JLabel();
    pbTimeout = new JProgressBar();
    panel2 = new JPanel();
    btnResetSplitpane = new JButton();
    statusBar = new StatusBar();

    //======== this ========
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Offene-Pflege.de");
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            thisWindowClosing(e);
        }
    });
    Container contentPane = getContentPane();
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));

    //======== pnlMain ========
    {
        pnlMain.setLayout(new FormLayout("0dlu, $lcgap, pref, $lcgap, left:default:grow, 2*($rgap)",
                "$rgap, pref, $rgap, default:grow, 3dlu, $nlgap, bottom:pref, $lgap, 0dlu"));

        //======== pnlMainMessage ========
        {
            pnlMainMessage.setBackground(new Color(220, 223, 208));
            pnlMainMessage.setBorder(new SoftBevelBorder(SoftBevelBorder.RAISED));
            pnlMainMessage.setLayout(new FormLayout(
                    "0dlu, $lcgap, 23dlu, $lcgap, default:grow, $lcgap, min, $lcgap, 0dlu",
                    "0dlu, $lgap, 15dlu, $lgap, fill:11dlu, $lgap, fill:pref:grow, $lgap, pref, $lgap, 0dlu"));

            //---- btnTX ----
            btnTX.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/ambulance2.png")));
            btnTX.setBorder(null);
            btnTX.setBorderPainted(false);
            btnTX.setSelectedIcon(null);
            btnTX.setToolTipText("Verlegungsbericht drucken");
            btnTX.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnTX.setPressedIcon(
                    new ImageIcon(getClass().getResource("/artwork/32x32/ambulance2_pressed.png")));
            btnTX.setContentAreaFilled(false);
            btnTX.addActionListener(e -> btnTXActionPerformed(e));
            pnlMainMessage.add(btnTX, CC.xywh(3, 3, 1, 3));

            //======== panel1 ========
            {
                panel1.setOpaque(false);
                panel1.setLayout(new BoxLayout(panel1, BoxLayout.LINE_AXIS));

                //======== pnlIcons ========
                {
                    pnlIcons.setOpaque(false);
                    pnlIcons.setLayout(new BoxLayout(pnlIcons, BoxLayout.LINE_AXIS));
                }
                panel1.add(pnlIcons);

                //---- lblMainMsg ----
                lblMainMsg.setText("OPDE");
                lblMainMsg.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 22));
                lblMainMsg.setForeground(new Color(105, 80, 69));
                lblMainMsg.setHorizontalAlignment(SwingConstants.CENTER);
                lblMainMsg.setIcon(null);
                lblMainMsg.setHorizontalTextPosition(SwingConstants.LEADING);
                panel1.add(lblMainMsg);
            }
            pnlMainMessage.add(panel1, CC.xy(5, 3, CC.CENTER, CC.DEFAULT));

            //---- btnExit ----
            btnExit.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/lock.png")));
            btnExit.setBorder(null);
            btnExit.setBorderPainted(false);
            btnExit.setOpaque(false);
            btnExit.setContentAreaFilled(false);
            btnExit.setToolTipText("Abmelden");
            btnExit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnExit.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/lock_pressed.png")));
            btnExit.addActionListener(e -> btnExitActionPerformed(e));
            pnlMainMessage.add(btnExit, CC.xywh(7, 3, 1, 3));

            //---- lblSubMsg ----
            lblSubMsg.setText("OPDE");
            lblSubMsg.setFont(new Font("Arial", Font.PLAIN, 14));
            lblSubMsg.setForeground(new Color(105, 80, 69));
            lblSubMsg.setHorizontalAlignment(SwingConstants.CENTER);
            lblSubMsg.setVerticalAlignment(SwingConstants.TOP);
            pnlMainMessage.add(lblSubMsg, CC.xywh(5, 5, 1, 3));

            //---- btnHelp ----
            btnHelp.setText(null);
            btnHelp.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/help.png")));
            btnHelp.setBorderPainted(false);
            btnHelp.setContentAreaFilled(false);
            btnHelp.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/help_pressed.png")));
            btnHelp.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnHelp.addActionListener(e -> btnHelpActionPerformed(e));
            pnlMainMessage.add(btnHelp, CC.xywh(3, 7, 1, 3));

            //---- pbMsg ----
            pbMsg.setValue(50);
            pbMsg.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 12));
            pbMsg.setForeground(new Color(105, 80, 69));
            pnlMainMessage.add(pbMsg, CC.xy(5, 9, CC.FILL, CC.FILL));

            //---- btnReload ----
            btnReload.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/reload0000.png")));
            btnReload.setBorder(null);
            btnReload.setBorderPainted(false);
            btnReload.setOpaque(false);
            btnReload.setContentAreaFilled(false);
            btnReload.setToolTipText("Ansicht aktualisieren");
            btnReload.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            btnReload
                    .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/reload_pressed.png")));
            btnReload.addActionListener(e -> btnReloadActionPerformed(e));
            pnlMainMessage.add(btnReload, CC.xywh(7, 7, 1, 3));
        }
        pnlMain.add(pnlMainMessage, CC.xywh(3, 2, 4, 1, CC.DEFAULT, CC.FILL));

        //---- splitPaneLeft ----
        splitPaneLeft.setOneTouchExpandable(true);
        splitPaneLeft.setProportionalLayout(true);
        splitPaneLeft.setShowGripper(true);
        splitPaneLeft.addPropertyChangeListener("dividerLocation", e -> splitPaneLeftPropertyChange(e));
        pnlMain.add(splitPaneLeft, CC.xy(3, 4, CC.FILL, CC.FILL));

        //======== pnlCard ========
        {
            pnlCard.setLayout(new CardLayout());

            //======== pnlWait ========
            {
                pnlWait.setLayout(new BorderLayout());

                //---- lblWait ----
                lblWait.setText("text");
                lblWait.setFont(new Font("Arial", Font.BOLD, 22));
                lblWait.setHorizontalAlignment(SwingConstants.CENTER);
                pnlWait.add(lblWait, BorderLayout.CENTER);
            }
            pnlCard.add(pnlWait, "cardWait");
        }
        pnlMain.add(pnlCard, CC.xy(5, 4, CC.FILL, CC.FILL));
        pnlMain.add(pbTimeout, CC.xywh(3, 5, 4, 1, CC.FILL, CC.DEFAULT));

        //======== panel2 ========
        {
            panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS));

            //---- btnResetSplitpane ----
            btnResetSplitpane.setText(null);
            btnResetSplitpane
                    .setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/view_top_bottom.png")));
            btnResetSplitpane.setAlignmentY(1.0F);
            btnResetSplitpane.addActionListener(e -> btnResetSplitpaneActionPerformed(e));
            panel2.add(btnResetSplitpane);

            //---- statusBar ----
            statusBar.setBackground(new Color(238, 238, 238));
            statusBar.setAlignmentY(1.0F);
            panel2.add(statusBar);
        }
        pnlMain.add(panel2, CC.xywh(3, 7, 4, 1, CC.FILL, CC.BOTTOM));
    }
    contentPane.add(pnlMain);
    setSize(945, 695);
    setLocationRelativeTo(getOwner());
}

From source file:op.system.DlgLogin.java

/**
 * This method is called from within the constructor to
 * initialize the printerForm.// www. j  ava  2 s. com
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the PrinterForm Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    jPanel2 = new JPanel();
    lblOPDE = new JLabel();
    btnAbout = new JButton();
    lblUsernamePassword = new JLabel();
    txtUsername = new JTextField();
    txtPassword = new JPasswordField();
    panel1 = new JPanel();
    btnExit = new JButton();
    hSpacer1 = new JPanel(null);
    btnLogin = new JButton();

    //======== this ========
    setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    setResizable(false);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowActivated(WindowEvent e) {
            thisWindowActivated(e);
        }
    });
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("13dlu, default, 13dlu",
            "13dlu, $lgap, fill:48dlu:grow, $lgap, default, $lgap, 13dlu"));

    //======== jPanel2 ========
    {
        jPanel2.setBorder(new EmptyBorder(5, 5, 5, 5));
        jPanel2.setOpaque(false);
        jPanel2.setLayout(new VerticalLayout(10));

        //---- lblOPDE ----
        lblOPDE.setText("Offene-Pflege.de");
        lblOPDE.setFont(new Font("Arial", Font.PLAIN, 24));
        lblOPDE.setHorizontalAlignment(SwingConstants.CENTER);
        jPanel2.add(lblOPDE);

        //---- btnAbout ----
        btnAbout.setIcon(new ImageIcon(getClass().getResource("/artwork/256x256/opde-logo.png")));
        btnAbout.setBorderPainted(false);
        btnAbout.setBorder(null);
        btnAbout.setOpaque(false);
        btnAbout.setContentAreaFilled(false);
        btnAbout.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        btnAbout.setToolTipText(null);
        btnAbout.addActionListener(e -> btnAboutActionPerformed(e));
        jPanel2.add(btnAbout);

        //---- lblUsernamePassword ----
        lblUsernamePassword.setText("text");
        lblUsernamePassword.setFont(new Font("Arial", Font.PLAIN, 18));
        jPanel2.add(lblUsernamePassword);

        //---- txtUsername ----
        txtUsername.setFont(new Font("Arial", Font.PLAIN, 18));
        txtUsername.addActionListener(e -> txtUsernameActionPerformed(e));
        txtUsername.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtUsernameFocusGained(e);
            }
        });
        jPanel2.add(txtUsername);

        //---- txtPassword ----
        txtPassword.setFont(new Font("Arial", Font.PLAIN, 18));
        txtPassword.addActionListener(e -> txtPasswordActionPerformed(e));
        txtPassword.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtPasswordFocusGained(e);
            }
        });
        jPanel2.add(txtPassword);
    }
    contentPane.add(jPanel2, CC.xy(2, 3, CC.FILL, CC.DEFAULT));

    //======== panel1 ========
    {
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));

        //---- btnExit ----
        btnExit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/exit.png")));
        btnExit.addActionListener(e -> btnExitActionPerformed(e));
        panel1.add(btnExit);
        panel1.add(hSpacer1);

        //---- btnLogin ----
        btnLogin.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png")));
        btnLogin.setActionCommand("btnLogin");
        btnLogin.addActionListener(e -> DoLogin(e));
        panel1.add(btnLogin);
    }
    contentPane.add(panel1, CC.xy(2, 5, CC.RIGHT, CC.DEFAULT));
    setSize(320, 540);
    setLocationRelativeTo(getOwner());
}

From source file:org.broad.igv.hic.MainWindow.java

private void initComponents() {
    JPanel mainPanel = new JPanel();
    JPanel toolbarPanel = new JPanel();

    //======== this ========

    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());
    mainPanel.setLayout(new BorderLayout());

    toolbarPanel.setBorder(null);//from  w w w  .j a v  a 2s  .  c  om
    toolbarPanel.setLayout(new GridLayout());

    JPanel chrSelectionPanel = new JPanel();
    chrSelectionPanel.setBorder(LineBorder.createGrayLineBorder());
    chrSelectionPanel.setMinimumSize(new Dimension(130, 57));
    chrSelectionPanel.setPreferredSize(new Dimension(130, 57));
    chrSelectionPanel.setLayout(new BorderLayout());

    JPanel panel10 = new JPanel();
    panel10.setBackground(new Color(204, 204, 204));
    panel10.setLayout(new BorderLayout());

    JLabel label3 = new JLabel();
    label3.setText("Chromosomes");
    label3.setHorizontalAlignment(SwingConstants.CENTER);
    panel10.add(label3, BorderLayout.CENTER);

    chrSelectionPanel.add(panel10, BorderLayout.PAGE_START);

    JPanel panel9 = new JPanel();
    panel9.setBackground(new Color(238, 238, 238));
    panel9.setLayout(new BoxLayout(panel9, BoxLayout.X_AXIS));

    //---- chrBox1 ----
    chrBox1 = new JComboBox();
    chrBox1.setModel(new DefaultComboBoxModel(new String[] { "All" }));
    chrBox1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            chrBox1ActionPerformed(e);
        }
    });
    panel9.add(chrBox1);

    //---- chrBox2 ----
    chrBox2 = new JComboBox();
    chrBox2.setModel(new DefaultComboBoxModel(new String[] { "All" }));
    chrBox2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            chrBox2ActionPerformed(e);
        }
    });
    panel9.add(chrBox2);

    //---- refreshButton ----
    JideButton refreshButton = new JideButton();
    refreshButton
            .setIcon(new ImageIcon(getClass().getResource("/toolbarButtonGraphics/general/Refresh24.gif")));
    refreshButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            refreshButtonActionPerformed(e);
        }
    });
    panel9.add(refreshButton);

    chrSelectionPanel.add(panel9, BorderLayout.CENTER);

    toolbarPanel.add(chrSelectionPanel);

    //======== displayOptionPanel ========
    JPanel displayOptionPanel = new JPanel();
    JPanel panel1 = new JPanel();
    displayOptionComboBox = new JComboBox();

    displayOptionPanel.setBackground(new Color(238, 238, 238));
    displayOptionPanel.setBorder(LineBorder.createGrayLineBorder());
    displayOptionPanel.setLayout(new BorderLayout());

    //======== panel14 ========

    JPanel panel14 = new JPanel();
    panel14.setBackground(new Color(204, 204, 204));
    panel14.setLayout(new BorderLayout());

    //---- label4 ----
    JLabel label4 = new JLabel();
    label4.setText("Show");
    label4.setHorizontalAlignment(SwingConstants.CENTER);
    panel14.add(label4, BorderLayout.CENTER);

    displayOptionPanel.add(panel14, BorderLayout.PAGE_START);

    //======== panel1 ========

    panel1.setBorder(new EmptyBorder(0, 10, 0, 10));
    panel1.setLayout(new GridLayout(1, 0, 20, 0));

    //---- comboBox1 ----
    displayOptionComboBox
            .setModel(new DefaultComboBoxModel(new String[] { DisplayOption.OBSERVED.toString() }));
    displayOptionComboBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            displayOptionComboBoxActionPerformed(e);
        }
    });
    panel1.add(displayOptionComboBox);

    displayOptionPanel.add(panel1, BorderLayout.CENTER);

    toolbarPanel.add(displayOptionPanel);

    //======== colorRangePanel ========

    JPanel colorRangePanel = new JPanel();
    JLabel colorRangeLabel = new JLabel();
    colorRangeSlider = new RangeSlider();
    colorRangePanel.setBorder(LineBorder.createGrayLineBorder());
    colorRangePanel.setMinimumSize(new Dimension(96, 70));
    colorRangePanel.setPreferredSize(new Dimension(202, 70));
    colorRangePanel.setMaximumSize(new Dimension(32769, 70));
    colorRangePanel.setLayout(new BorderLayout());

    //======== panel11 ========

    JPanel colorLabelPanel = new JPanel();
    colorLabelPanel.setBackground(new Color(204, 204, 204));
    colorLabelPanel.setLayout(new BorderLayout());

    //---- colorRangeLabel ----
    colorRangeLabel.setText("Color Range");
    colorRangeLabel.setHorizontalAlignment(SwingConstants.CENTER);
    colorRangeLabel.setToolTipText("Range of color scale in counts per mega-base squared.");
    colorRangeLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    colorRangeLabel.addMouseListener(new MouseAdapter() {
        @Override
        public void mousePressed(MouseEvent e) {
            if (e.isPopupTrigger()) {
                ColorRangeDialog rangeDialog = new ColorRangeDialog(MainWindow.this, colorRangeSlider);
                rangeDialog.setVisible(true);
            }
        }

        @Override
        public void mouseClicked(MouseEvent e) {
            ColorRangeDialog rangeDialog = new ColorRangeDialog(MainWindow.this, colorRangeSlider);
            rangeDialog.setVisible(true);
        }
    });
    colorLabelPanel.add(colorRangeLabel, BorderLayout.CENTER);

    colorRangePanel.add(colorLabelPanel, BorderLayout.PAGE_START);

    //---- colorRangeSlider ----
    colorRangeSlider.setPaintTicks(true);
    colorRangeSlider.setPaintLabels(true);
    colorRangeSlider.setLowerValue(0);
    colorRangeSlider.setMajorTickSpacing(500);
    colorRangeSlider.setMaximumSize(new Dimension(32767, 52));
    colorRangeSlider.setPreferredSize(new Dimension(200, 52));
    colorRangeSlider.setMinimumSize(new Dimension(36, 52));
    colorRangeSlider.setMaximum(2000);
    colorRangeSlider.setUpperValue(500);
    colorRangeSlider.setMinorTickSpacing(100);
    colorRangeSlider.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            colorRangeSliderStateChanged(e);
        }
    });
    colorRangePanel.add(colorRangeSlider, BorderLayout.PAGE_END);

    //        JPanel colorRangeTextPanel = new JPanel();
    //        colorRangeTextPanel.setLayout(new FlowLayout());
    //        JTextField minField = new JTextField();
    //        minField.setPreferredSize(new Dimension(50, 15));
    //        colorRangeTextPanel.add(minField);
    //        colorRangeTextPanel.add(new JLabel(" - "));
    //        JTextField maxField = new JTextField();
    //        maxField.setPreferredSize(new Dimension(50, 15));
    //        colorRangeTextPanel.add(maxField);
    //        colorRangeTextPanel.setPreferredSize(new Dimension(200, 52));
    //        colorRangePanel.add(colorRangeTextPanel, BorderLayout.PAGE_END);

    toolbarPanel.add(colorRangePanel);

    //======== resolutionPanel ========

    JLabel resolutionLabel = new JLabel();
    JPanel resolutionPanel = new JPanel();

    resolutionPanel.setBorder(LineBorder.createGrayLineBorder());
    resolutionPanel.setLayout(new BorderLayout());

    //======== panel12 ========

    JPanel panel12 = new JPanel();
    panel12.setBackground(new Color(204, 204, 204));
    panel12.setLayout(new BorderLayout());

    //---- resolutionLabel ----
    resolutionLabel.setText("Resolution");
    resolutionLabel.setHorizontalAlignment(SwingConstants.CENTER);
    resolutionLabel.setBackground(new Color(204, 204, 204));
    panel12.add(resolutionLabel, BorderLayout.CENTER);

    resolutionPanel.add(panel12, BorderLayout.PAGE_START);

    //======== panel2 ========

    JPanel panel2 = new JPanel();
    panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS));

    //---- resolutionSlider ----
    resolutionSlider = new JSlider();
    resolutionSlider.setMaximum(8);
    resolutionSlider.setMajorTickSpacing(1);
    resolutionSlider.setPaintTicks(true);
    resolutionSlider.setSnapToTicks(true);
    resolutionSlider.setPaintLabels(true);
    resolutionSlider.setMinorTickSpacing(1);

    Dictionary<Integer, JLabel> resolutionLabels = new Hashtable<Integer, JLabel>();
    Font f = FontManager.getFont(8);
    for (int i = 0; i < HiCGlobals.zoomLabels.length; i++) {
        if ((i + 1) % 2 == 0) {
            final JLabel tickLabel = new JLabel(HiCGlobals.zoomLabels[i]);
            tickLabel.setFont(f);
            resolutionLabels.put(i, tickLabel);
        }
    }
    resolutionSlider.setLabelTable(resolutionLabels);
    // Setting the zoom should always be done by calling resolutionSlider.setValue() so work isn't done twice.
    resolutionSlider.addChangeListener(new ChangeListener() {
        // Change zoom level while staying centered on current location.
        // Centering is relative to the bounds of the data, which might not be the bounds of the window

        public void stateChanged(ChangeEvent e) {
            if (!resolutionSlider.getValueIsAdjusting()) {
                int idx = resolutionSlider.getValue();
                idx = Math.max(0, Math.min(idx, MAX_ZOOM));

                if (hic.zd != null && idx == hic.zd.getZoom()) {
                    // Nothing to do
                    return;
                }

                if (hic.xContext != null) {
                    int centerLocationX = (int) hic.xContext
                            .getChromosomePosition(getHeatmapPanel().getWidth() / 2);
                    int centerLocationY = (int) hic.yContext
                            .getChromosomePosition(getHeatmapPanel().getHeight() / 2);
                    hic.setZoom(idx, centerLocationX, centerLocationY, false);
                }
                //zoomInButton.setEnabled(newZoom < MAX_ZOOM);
                //zoomOutButton.setEnabled(newZoom > 0);
            }
        }
    });
    panel2.add(resolutionSlider);

    resolutionPanel.add(panel2, BorderLayout.CENTER);

    toolbarPanel.add(resolutionPanel);

    mainPanel.add(toolbarPanel, BorderLayout.NORTH);

    //======== hiCPanel ========

    final JPanel hiCPanel = new JPanel();
    hiCPanel.setLayout(new HiCLayout());

    //---- rulerPanel2 ----
    rulerPanel2 = new HiCRulerPanel(hic);
    rulerPanel2.setMaximumSize(new Dimension(4000, 50));
    rulerPanel2.setMinimumSize(new Dimension(1, 50));
    rulerPanel2.setPreferredSize(new Dimension(1, 50));
    rulerPanel2.setBorder(null);

    JPanel panel2_5 = new JPanel();
    panel2_5.setLayout(new BorderLayout());
    panel2_5.add(rulerPanel2, BorderLayout.SOUTH);

    trackPanel = new TrackPanel(hic);
    trackPanel.setMaximumSize(new Dimension(4000, 50));
    trackPanel.setPreferredSize(new Dimension(1, 50));
    trackPanel.setMinimumSize(new Dimension(1, 50));
    trackPanel.setBorder(null);

    //        trackPanelScrollpane = new JScrollPane();
    //        trackPanelScrollpane.getViewport().add(trackPanel);
    //        trackPanelScrollpane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    //        trackPanelScrollpane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    //        trackPanelScrollpane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
    //        trackPanelScrollpane.setBackground(new java.awt.Color(237, 237, 237));
    //        trackPanelScrollpane.setVisible(false);
    //        panel2_5.add(trackPanelScrollpane, BorderLayout.NORTH);
    //
    trackPanel.setVisible(false);
    panel2_5.add(trackPanel, BorderLayout.NORTH);

    hiCPanel.add(panel2_5, BorderLayout.NORTH);

    //---- rulerPanel1 ----
    rulerPanel1 = new HiCRulerPanel(hic);
    rulerPanel1.setMaximumSize(new Dimension(50, 4000));
    rulerPanel1.setPreferredSize(new Dimension(50, 500));
    rulerPanel1.setBorder(null);
    rulerPanel1.setMinimumSize(new Dimension(50, 1));
    hiCPanel.add(rulerPanel1, BorderLayout.WEST);

    //---- heatmapPanel ----
    heatmapPanel = new HeatmapPanel(this, hic);
    heatmapPanel.setBorder(LineBorder.createBlackLineBorder());
    heatmapPanel.setMaximumSize(new Dimension(500, 500));
    heatmapPanel.setMinimumSize(new Dimension(500, 500));
    heatmapPanel.setPreferredSize(new Dimension(500, 500));
    heatmapPanel.setBackground(new Color(238, 238, 238));
    hiCPanel.add(heatmapPanel, BorderLayout.CENTER);

    //======== panel8 ========

    JPanel rightSidePanel = new JPanel();
    rightSidePanel.setMaximumSize(new Dimension(120, 100));
    rightSidePanel.setBorder(new EmptyBorder(0, 10, 0, 0));
    rightSidePanel.setLayout(null);

    //---- thumbnailPanel ----
    thumbnailPanel = new ThumbnailPanel(this, hic);
    thumbnailPanel.setMaximumSize(new Dimension(100, 100));
    thumbnailPanel.setMinimumSize(new Dimension(100, 100));
    thumbnailPanel.setPreferredSize(new Dimension(100, 100));
    thumbnailPanel.setBorder(LineBorder.createBlackLineBorder());
    thumbnailPanel.setPreferredSize(new Dimension(100, 100));
    thumbnailPanel.setBounds(new Rectangle(new Point(20, 0), thumbnailPanel.getPreferredSize()));
    rightSidePanel.add(thumbnailPanel);

    //======== xPlotPanel ========

    xPlotPanel = new JPanel();
    xPlotPanel.setPreferredSize(new Dimension(250, 100));
    xPlotPanel.setLayout(null);

    rightSidePanel.add(xPlotPanel);
    xPlotPanel.setBounds(10, 100, xPlotPanel.getPreferredSize().width, 228);

    //======== yPlotPanel ========

    yPlotPanel = new JPanel();
    yPlotPanel.setPreferredSize(new Dimension(250, 100));
    yPlotPanel.setLayout(null);

    rightSidePanel.add(yPlotPanel);
    yPlotPanel.setBounds(10, 328, yPlotPanel.getPreferredSize().width, 228);

    // compute preferred size
    Dimension preferredSize = new Dimension();
    for (int i = 0; i < rightSidePanel.getComponentCount(); i++) {
        Rectangle bounds = rightSidePanel.getComponent(i).getBounds();
        preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
        preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
    }
    Insets insets = rightSidePanel.getInsets();
    preferredSize.width += insets.right;
    preferredSize.height += insets.bottom;
    rightSidePanel.setMinimumSize(preferredSize);
    rightSidePanel.setPreferredSize(preferredSize);

    hiCPanel.add(rightSidePanel, BorderLayout.EAST);

    mainPanel.add(hiCPanel, BorderLayout.CENTER);

    contentPane.add(mainPanel, BorderLayout.CENTER);

    JMenuBar menuBar = createMenuBar(hiCPanel);
    contentPane.add(menuBar, BorderLayout.NORTH);

    // setup the glass pane to display a wait cursor when visible, and to grab all mouse events
    rootPane.getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    rootPane.getGlassPane().addMouseListener(new MouseAdapter() {
    });

}

From source file:org.datavyu.controllers.component.TrackController.java

/**
 * Creates a new TrackController.//from www.ja  va 2s  . c  o m
 *
 * @param trackPainter the track painter for this controller to manage.
 */
public TrackController(final MixerModel mixerModel, final TrackPainter trackPainter) {
    isMoveable = true;

    view = new JPanel();
    view.setLayout(new MigLayout("fillx, ins 0", "[]0[]"));
    view.setBorder(BorderFactory.createLineBorder(TrackConstants.BORDER_COLOR, 1));

    this.trackPainter = trackPainter;

    this.mixerModel = mixerModel;
    trackModel = new TrackModel();
    trackModel.setState(TrackState.NORMAL);
    trackModel.clearBookmarks();
    trackModel.setLocked(false);

    trackPainter.setMixerView(mixerModel);
    trackPainter.setTrackModel(trackModel);

    mixerModel.getViewportModel().addPropertyChangeListener(this);

    listenerList = new EventListenerList();

    final TrackPainterListener painterListener = new TrackPainterListener();
    trackPainter.addMouseListener(painterListener);
    trackPainter.addMouseMotionListener(painterListener);

    menu = new JPopupMenu();
    menu.setName("trackPopUpMenu");

    setBookmarkMenuItem = new JMenuItem("Set bookmark");
    setBookmarkMenuItem.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            TrackController.this.setBookmarkAction();
        }
    });

    clearBookmarkMenuItem = new JMenuItem("Clear bookmarks");
    clearBookmarkMenuItem.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent e) {
            TrackController.this.clearBookmarkAction();
        }
    });
    menu.add(setBookmarkMenuItem);
    menu.add(clearBookmarkMenuItem);

    trackPainter.add(menu);

    // Create the Header panel and its components
    trackLabel = new JLabel("", SwingConstants.CENTER);
    trackLabel.setName("trackLabel");
    trackLabel.setHorizontalAlignment(SwingConstants.CENTER);
    trackLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    iconLabel = new JLabel("", SwingConstants.CENTER);
    iconLabel.setHorizontalAlignment(SwingConstants.CENTER);
    iconLabel.setHorizontalTextPosition(SwingConstants.CENTER);

    header = new JPanel(new MigLayout("ins 0, wrap 6"));
    header.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createMatteBorder(0, 0, 0, 1, TrackConstants.BORDER_COLOR),
            BorderFactory.createEmptyBorder(2, 2, 2, 2)));
    header.setBackground(Color.LIGHT_GRAY);

    // Normally I would use pushx instead of defining the width, but in this
    // case I defined the width because span combined with push makes the
    // first action icon cell push out as well. 136 was calculated from
    // 140 pixels minus 2 minus 2 (from the empty border defined above).
    header.add(trackLabel, "span 6, w 136!, center, growx");
    header.add(iconLabel, "span 6, w 136!, h 32!, center, growx");

    // Set up the button used for locking/unlocking track movement
    {
        lockUnlockButton = new JButton(TrackConstants.UNLOCK_ICON);
        lockUnlockButton.setName("lockUnlockButton");
        lockUnlockButton.setContentAreaFilled(false);
        lockUnlockButton.setBorderPainted(false);
        lockUnlockButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                handleLockUnlockButtonEvent(e);
            }
        });

        Map<String, String> constraints = Maps.newHashMap();
        constraints.put("width", Integer.toString(TrackConstants.ACTION_BUTTON_WIDTH));
        constraints.put("height", Integer.toString(TrackConstants.ACTION_BUTTON_HEIGHT));

        String template = "cell 0 2, w ${width}!, h ${height}!";
        StrSubstitutor sub = new StrSubstitutor(constraints);

        header.add(lockUnlockButton, sub.replace(template));
    }

    // Set up the button used for hiding/showing a track's data viewer
    {
        visibleButton = new JButton(TrackConstants.VIEWER_HIDE_ICON);
        visibleButton.setName("visibleButton");
        visibleButton.setContentAreaFilled(false);
        visibleButton.setBorderPainted(false);
        visibleButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                handleVisibleButtonEvent(e);
            }
        });

        Map<String, String> constraints = Maps.newHashMap();
        constraints.put("width", Integer.toString(TrackConstants.ACTION_BUTTON_WIDTH));
        constraints.put("height", Integer.toString(TrackConstants.ACTION_BUTTON_HEIGHT));

        String template = "cell 1 2, w ${width}!, h ${height}!";
        StrSubstitutor sub = new StrSubstitutor(constraints);

        header.add(visibleButton, sub.replace(template));
    }

    // Set up the button used for removing a track and its plugin
    {
        rubbishButton = new JButton(TrackConstants.DELETE_ICON);
        rubbishButton.setName("rubbishButton");
        rubbishButton.setContentAreaFilled(false);
        rubbishButton.setBorderPainted(false);
        rubbishButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                handleDeleteButtonEvent(e);
            }
        });

        Map<String, String> constraints = Maps.newHashMap();
        constraints.put("width", Integer.toString(TrackConstants.ACTION_BUTTON_WIDTH));
        constraints.put("height", Integer.toString(TrackConstants.ACTION_BUTTON_HEIGHT));

        String template = "cell 5 2, w ${width}!, h ${height}!";
        StrSubstitutor sub = new StrSubstitutor(constraints);

        header.add(rubbishButton, sub.replace(template));
    }

    // Add the header to our layout.
    {
        Map<String, String> constraints = Maps.newHashMap();
        constraints.put("width", Integer.toString(TrackConstants.HEADER_WIDTH));
        constraints.put("height", Integer.toString(TrackConstants.CARRIAGE_HEIGHT));

        String template = "w ${width}!, h ${height}!";
        StrSubstitutor sub = new StrSubstitutor(constraints);

        view.add(header, sub.replace(template));
    }

    // Add the track carriage to our layout.
    {
        Map<String, String> constraints = Maps.newHashMap();
        constraints.put("height", Integer.toString(TrackConstants.CARRIAGE_HEIGHT));

        String template = "pushx, growx, h ${height}!";
        StrSubstitutor sub = new StrSubstitutor(constraints);

        view.add(trackPainter, sub.replace(template));
    }

    view.validate();
}

From source file:org.datavyu.views.DataControllerV.java

/**
 * Initialize the view for Macs./*from   www. j  a  v a2s  . co m*/
 */
private void initComponentsMac() {
    gridButtonPanel = new javax.swing.JPanel();

    goBackTextField = new javax.swing.JTextField();
    findTextField = new javax.swing.JTextField();
    addDataButton = new javax.swing.JButton();
    timestampLabel = new javax.swing.JLabel();
    lblSpeed = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    findOffsetField = new javax.swing.JTextField();
    showTracksButton = new javax.swing.JButton();
    tracksPanel = new javax.swing.JPanel(new MigLayout("fill"));

    final int fontSize = 11;

    org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
            .getInstance(org.datavyu.Datavyu.class).getContext().getResourceMap(DataControllerV.class);
    setTitle(resourceMap.getString("title"));
    addWindowListener(new java.awt.event.WindowAdapter() {
        @Override
        public void windowClosing(final java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    gridButtonPanel.setBackground(Color.WHITE);
    gridButtonPanel.setLayout(new MigLayout("wrap 5, ins 15 2 15 2"));

    // Add data button
    addDataButton.setText(resourceMap.getString("addDataButton.text"));
    addDataButton.setFont(new Font("Tahoma", Font.PLAIN, fontSize));
    addDataButton.setFocusPainted(false);
    addDataButton.setName("addDataButton");
    addDataButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent evt) {
            openVideoButtonActionPerformed(evt);
        }
    });
    gridButtonPanel.add(addDataButton, "span 2, w 90!, h 25!");

    // Timestamp panel
    JPanel timestampPanel = new JPanel(new MigLayout("", "push[][][]0![]push"));
    timestampPanel.setOpaque(false);

    // Timestamp label
    timestampLabel.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    timestampLabel.setHorizontalAlignment(SwingConstants.CENTER);
    timestampLabel.setText("00:00:00:000");
    timestampLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    timestampLabel.setName("timestampLabel");
    timestampPanel.add(timestampLabel);

    jLabel1.setText("@");
    timestampPanel.add(jLabel1);

    lblSpeed.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    lblSpeed.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 2));
    lblSpeed.setName("lblSpeed");
    lblSpeed.setText("0");
    timestampPanel.add(lblSpeed);

    jLabel2.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    jLabel2.setText("x");
    timestampPanel.add(jLabel2);

    // Set cell onset button
    javax.swing.ActionMap actionMap = org.jdesktop.application.Application
            .getInstance(org.datavyu.Datavyu.class).getContext().getActionMap(DataControllerV.class, this);

    gridButtonPanel.add(timestampPanel, "span 3, pushx, growx");

    // placeholder
    setCellOnsetButton = buildButton(resourceMap, actionMap, "setCellOnset", null);
    gridButtonPanel.add(setCellOnsetButton, "w 45!, h 45!");

    // Sync button
    pointCellButton = buildButton(resourceMap, actionMap, "pointCell", null);
    gridButtonPanel.add(pointCellButton, "w 45!, h 45!");

    // Set cell onset button.
    osxsetCellOffsetButton = buildButton(resourceMap, actionMap, "setCellOffset", "osx");
    gridButtonPanel.add(osxsetCellOffsetButton, "w 45!, h 45!");

    // Instant cell button.
    JButton placeholder2 = new JButton();
    placeholder2.setEnabled(false);
    placeholder2.setFocusPainted(false);
    gridButtonPanel.add(placeholder2, "w 45!, h 45!");

    // Sync video button
    JButton placeholder3 = new JButton();
    placeholder3.setEnabled(false);
    placeholder3.setFocusPainted(false);
    gridButtonPanel.add(placeholder3, "w 80!, h 45!");

    // Rewind video button
    rewindButton = buildButton(resourceMap, actionMap, "rewind", null);
    gridButtonPanel.add(rewindButton, "w 45!, h 45!");

    // Play video button
    playButton = buildButton(resourceMap, actionMap, "play", null);
    playButton.setRequestFocusEnabled(false);
    gridButtonPanel.add(playButton, "w 45!, h 45!");

    // Fast forward button
    forwardButton = buildButton(resourceMap, actionMap, "forward", null);
    gridButtonPanel.add(forwardButton, "w 45!, h 45!");

    // Go back button
    goBackButton = buildButton(resourceMap, actionMap, "goBack", null);
    gridButtonPanel.add(goBackButton, "w 45!, h 45!");

    // Go back text field
    goBackTextField.setHorizontalAlignment(SwingConstants.CENTER);
    goBackTextField.setText("00:00:05:000");
    goBackTextField.setName("goBackTextField");
    gridButtonPanel.add(goBackTextField, "w 80!, h 45!");

    // Shuttle back button
    shuttleBackButton = buildButton(resourceMap, actionMap, "shuttleBack", null);
    gridButtonPanel.add(shuttleBackButton, "w 45!, h 45!");

    // Stop button
    stopButton = buildButton(resourceMap, actionMap, "stop", null);
    gridButtonPanel.add(stopButton, "w 45!, h 45!");

    // Shuttle forward button
    shuttleForwardButton = buildButton(resourceMap, actionMap, "shuttleForward", null);
    gridButtonPanel.add(shuttleForwardButton, "w 45!, h 45!");

    // Find button
    findButton = buildButton(resourceMap, actionMap, "find", null);
    gridButtonPanel.add(findButton, "w 45!, h 45!");

    // Find text field
    findTextField.setHorizontalAlignment(SwingConstants.CENTER);
    findTextField.setText("00:00:00:000");
    findTextField.setName("findOnsetLabel");
    gridButtonPanel.add(findTextField, "w 80!, h 45!");

    // Jog back button
    jogBackButton = buildButton(resourceMap, actionMap, "jogBack", null);
    gridButtonPanel.add(jogBackButton, "w 45!, h 45!");

    // Pause button
    pauseButton = buildButton(resourceMap, actionMap, "pause", null);
    gridButtonPanel.add(pauseButton, "w 45!, h 45!");

    // Jog forward button
    jogForwardButton = buildButton(resourceMap, actionMap, "jogForward", null);
    gridButtonPanel.add(jogForwardButton, "w 45!, h 45!");

    // Create new cell button
    createNewCell = buildButton(resourceMap, actionMap, "createNewCell", null);
    createNewCell.setAlignmentY(0.0F);
    createNewCell.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    gridButtonPanel.add(createNewCell, "span 1 2, w 45!, h 92!");

    // Find offset field
    findOffsetField.setHorizontalAlignment(SwingConstants.CENTER);
    findOffsetField.setText("00:00:00:000");
    findOffsetField.setToolTipText(resourceMap.getString("findOffsetField.toolTipText"));
    findOffsetField.setEnabled(false);
    findOffsetField.setName("findOffsetLabel");
    gridButtonPanel.add(findOffsetField, "w 80!, h 45!");

    // Create new cell setting offset button
    createNewCellSettingOffset = buildButton(resourceMap, actionMap, "createNewCellAndSetOnset", null);
    gridButtonPanel.add(createNewCellSettingOffset, "span 2, w 92!, h 45!");

    // Set cell offset button
    setCellOffsetButton = buildButton(resourceMap, actionMap, "setCellOffset", null);
    gridButtonPanel.add(setCellOffsetButton, "w 45!, h 45!");

    // Show tracks button
    showTracksButton.setIcon(resourceMap.getIcon("showTracksButton.hide.icon"));
    showTracksButton.setName("showTracksButton");
    showTracksButton.getAccessibleContext().setAccessibleName("Show Tracks");
    showTracksButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent evt) {
            showTracksButtonActionPerformed(evt);
        }
    });
    gridButtonPanel.add(showTracksButton, "w 80!, h 45!");

    getContentPane().setLayout(new MigLayout("hidemode 3, fillx", "[growprio 0]0[]", ""));
    getContentPane().add(gridButtonPanel, "");
    getContentPane().setBackground(Color.WHITE);

    tracksPanel.setBackground(Color.WHITE);
    tracksPanel.setVisible(false);
    getContentPane().add(tracksPanel, "growx");

    pack();
}

From source file:org.datavyu.views.DataControllerV.java

/**
 * Initialize the view for OS other than Macs.
 *///from w  ww. j  a  va2 s.co m
private void initComponents() {
    gridButtonPanel = new javax.swing.JPanel();
    goBackTextField = new javax.swing.JTextField();
    findTextField = new javax.swing.JTextField();
    addDataButton = new javax.swing.JButton();
    timestampLabel = new javax.swing.JLabel();
    lblSpeed = new javax.swing.JLabel();
    createNewCell = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    findOffsetField = new javax.swing.JTextField();
    showTracksButton = new javax.swing.JButton();
    tracksPanel = new javax.swing.JPanel(new MigLayout("fill"));

    final int fontSize = 11;

    org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
            .getInstance(org.datavyu.Datavyu.class).getContext().getResourceMap(DataControllerV.class);
    setTitle(resourceMap.getString("title"));
    addWindowListener(new java.awt.event.WindowAdapter() {
        @Override
        public void windowClosing(final java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    gridButtonPanel.setBackground(Color.WHITE);
    gridButtonPanel.setLayout(new MigLayout("wrap 5"));

    // Add data button
    addDataButton.setText(resourceMap.getString("addDataButton.text"));
    addDataButton.setFont(new Font("Tahoma", Font.PLAIN, fontSize));
    addDataButton.setFocusPainted(false);
    addDataButton.setName("addDataButton");
    addDataButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent evt) {
            openVideoButtonActionPerformed(evt);
        }
    });
    gridButtonPanel.add(addDataButton, "span 2, w 90!, h 25!");

    // Timestamp panel
    JPanel timestampPanel = new JPanel(new MigLayout("", "push[][][]0![]push"));
    timestampPanel.setOpaque(false);

    // Timestamp label
    timestampLabel.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    timestampLabel.setHorizontalAlignment(SwingConstants.CENTER);
    timestampLabel.setText("00:00:00:000");
    timestampLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    timestampLabel.setName("timestampLabel");
    timestampPanel.add(timestampLabel);

    jLabel1.setText("@");
    timestampPanel.add(jLabel1);

    lblSpeed.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    lblSpeed.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 2));
    lblSpeed.setName("lblSpeed");
    lblSpeed.setText("0");
    timestampPanel.add(lblSpeed);

    jLabel2.setFont(new Font("Tahoma", Font.BOLD, fontSize));
    jLabel2.setText("x");
    timestampPanel.add(jLabel2);

    javax.swing.ActionMap actionMap = org.jdesktop.application.Application
            .getInstance(org.datavyu.Datavyu.class).getContext().getActionMap(DataControllerV.class, this);

    gridButtonPanel.add(timestampPanel, "span 3, pushx, growx");

    JButton placeholder = new JButton();
    placeholder.setEnabled(false);
    placeholder.setFocusPainted(false);
    gridButtonPanel.add(placeholder, "w 45!, h 45!");

    // Set cell onset button
    setCellOnsetButton = buildButton(resourceMap, actionMap, "setCellOnset", "win");
    gridButtonPanel.add(setCellOnsetButton, "w 45!, h 45!");

    // Set new cell offset button
    pointCellButton = buildButton(resourceMap, actionMap, "pointCell", "win");
    gridButtonPanel.add(pointCellButton, "w 45!, h 45!");

    // Go back button
    goBackButton = buildButton(resourceMap, actionMap, "goBack", null);
    gridButtonPanel.add(goBackButton, "w 45!, h 45!");

    // Sync video button
    JButton placeholder2 = new JButton();
    placeholder2.setEnabled(false);
    placeholder2.setFocusPainted(false);
    gridButtonPanel.add(placeholder2, "w 80!, h 45!");

    // Rewind video button
    rewindButton = buildButton(resourceMap, actionMap, "rewind", null);
    gridButtonPanel.add(rewindButton, "w 45!, h 45!");

    // Play video button
    playButton = buildButton(resourceMap, actionMap, "play", null);
    playButton.setRequestFocusEnabled(false);
    gridButtonPanel.add(playButton, "w 45!, h 45!");

    // Fast forward button
    forwardButton = buildButton(resourceMap, actionMap, "forward", null);
    gridButtonPanel.add(forwardButton, "w 45!, h 45!");

    // Find button
    findButton = buildButton(resourceMap, actionMap, "find", "win");
    gridButtonPanel.add(findButton, "span 1 2, w 45!, h 95!");

    // Go back text field
    goBackTextField.setHorizontalAlignment(SwingConstants.CENTER);
    goBackTextField.setText("00:00:05:000");
    goBackTextField.setName("goBackTextField");
    gridButtonPanel.add(goBackTextField, "w 80!, h 45!");

    // Shuttle back button
    shuttleBackButton = buildButton(resourceMap, actionMap, "shuttleBack", null);
    gridButtonPanel.add(shuttleBackButton, "w 45!, h 45!");

    // Stop button
    stopButton = buildButton(resourceMap, actionMap, "stop", null);
    gridButtonPanel.add(stopButton, "w 45!, h 45!");

    // Shuttle forward button
    shuttleForwardButton = buildButton(resourceMap, actionMap, "shuttleForward", null);
    gridButtonPanel.add(shuttleForwardButton, "w 45!, h 45!");

    // Find text field
    findTextField.setHorizontalAlignment(SwingConstants.CENTER);
    findTextField.setText("00:00:00:000");
    findTextField.setName("findOnsetLabel");
    gridButtonPanel.add(findTextField, "w 80!, h 45!");

    // Jog back button
    jogBackButton = buildButton(resourceMap, actionMap, "jogBack", null);
    gridButtonPanel.add(jogBackButton, "w 45!, h 45!");

    // Pause button
    pauseButton = buildButton(resourceMap, actionMap, "pause", null);
    gridButtonPanel.add(pauseButton, "w 45!, h 45!");

    // Jog forward button
    jogForwardButton = buildButton(resourceMap, actionMap, "jogForward", null);
    gridButtonPanel.add(jogForwardButton, "w 45!, h 45!");

    // Create new cell button
    createNewCell = buildButton(resourceMap, actionMap, "createNewCell", null);
    createNewCell.setAlignmentY(0.0F);
    createNewCell.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    gridButtonPanel.add(createNewCell, "span 1 2, w 45!, h 95!");

    // Find offset field
    findOffsetField.setHorizontalAlignment(SwingConstants.CENTER);
    findOffsetField.setText("00:00:00:000");
    findOffsetField.setToolTipText(resourceMap.getString("findOffsetField.toolTipText"));
    findOffsetField.setEnabled(false);
    findOffsetField.setName("findOffsetLabel");
    gridButtonPanel.add(findOffsetField, "w 80!, h 45!");

    // Create new cell setting offset button
    createNewCellSettingOffset = buildButton(resourceMap, actionMap, "createNewCellAndSetOnset", null);
    gridButtonPanel.add(createNewCellSettingOffset, "span 2, w 95!, h 45!");

    // Set cell offset button
    setCellOffsetButton = buildButton(resourceMap, actionMap, "setCellOffset", null);
    gridButtonPanel.add(setCellOffsetButton, "w 45!, h 45!");

    // Show tracks button
    showTracksButton.setIcon(resourceMap.getIcon("showTracksButton.hide.icon"));
    showTracksButton.setName("showTracksButton");
    showTracksButton.getAccessibleContext().setAccessibleName("Show Tracks");
    showTracksButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent evt) {
            showTracksButtonActionPerformed(evt);
        }
    });
    gridButtonPanel.add(showTracksButton, "w 80!, h 45!");

    getContentPane().setLayout(new MigLayout("ins 0, hidemode 3, fillx", "[growprio 0]0[]", ""));
    getContentPane().add(gridButtonPanel, "");
    getContentPane().setBackground(Color.WHITE);

    tracksPanel.setBackground(Color.WHITE);
    tracksPanel.setVisible(false);
    getContentPane().add(tracksPanel, "growx");

    pack();
}

From source file:org.deegree.tools.rendering.viewer.File3dImporter.java

public static List<WorldRenderableObject> open(Frame parent, String fileName) {

    if (fileName == null || "".equals(fileName.trim())) {
        throw new InvalidParameterException("the file name may not be null or empty");
    }//from   w  ww . j a  va2 s  .c o  m
    fileName = fileName.trim();

    CityGMLImporter openFile2;
    XMLInputFactory fac = XMLInputFactory.newInstance();
    InputStream in = null;
    try {
        XMLStreamReader reader = fac.createXMLStreamReader(in = new FileInputStream(fileName));
        reader.next();
        String ns = "http://www.opengis.net/citygml/1.0";
        openFile2 = new CityGMLImporter(null, null, null, reader.getNamespaceURI().equals(ns));
    } catch (Throwable t) {
        openFile2 = new CityGMLImporter(null, null, null, false);
    } finally {
        IOUtils.closeQuietly(in);
    }

    final CityGMLImporter openFile = openFile2;

    final JDialog dialog = new JDialog(parent, "Loading", true);

    dialog.getContentPane().setLayout(new BorderLayout());
    dialog.getContentPane().add(
            new JLabel("<HTML>Loading file:<br>" + fileName + "<br>Please wait!</HTML>", SwingConstants.CENTER),
            BorderLayout.NORTH);
    final JProgressBar progressBar = new JProgressBar();
    progressBar.setStringPainted(true);
    progressBar.setIndeterminate(false);
    dialog.getContentPane().add(progressBar, BorderLayout.CENTER);

    dialog.pack();
    dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    dialog.setResizable(false);
    dialog.setLocationRelativeTo(parent);

    final Thread openThread = new Thread() {
        /**
         * Opens the file in a separate thread.
         */
        @Override
        public void run() {
            // openFile.openFile( progressBar );
            if (dialog.isDisplayable()) {
                dialog.setVisible(false);
                dialog.dispose();
            }
        }
    };
    openThread.start();

    dialog.setVisible(true);
    List<WorldRenderableObject> result = null;
    try {
        result = openFile.importFromFile(fileName, 6, 2);
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    gm = openFile.getQmList();

    //
    // if ( result != null ) {
    // openGLEventListener.addDataObjectToScene( result );
    // File f = new File( fileName );
    // setTitle( WIN_TITLE + f.getName() );
    // } else {
    // showExceptionDialog( "The file: " + fileName
    // + " could not be read,\nSee error log for detailed information." );
    // }
    return result;
}

From source file:org.domainmath.gui.MainFrame.java

/** This method is called from within the constructor to
 * initialize the form./*from w w w . j  a va 2s  . com*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    jToolBar1 = new javax.swing.JToolBar();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jSeparator4 = new javax.swing.JToolBar.Separator();
    connectButton = new javax.swing.JButton();
    disconnectButton = new javax.swing.JButton();
    jSeparator9 = new javax.swing.JToolBar.Separator();
    jButton4 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jSeparator15 = new javax.swing.JToolBar.Separator();
    jButton6 = new javax.swing.JButton();
    jButton7 = new javax.swing.JButton();
    jButton8 = new javax.swing.JButton();
    jSeparator13 = new javax.swing.JToolBar.Separator();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    dirComboBox = new javax.swing.JComboBox();
    folderUpButton = new javax.swing.JButton();
    browseButton = new javax.swing.JButton();
    addButton = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    newFileItem = new javax.swing.JMenuItem();
    openItem = new javax.swing.JMenuItem();
    jSeparator17 = new javax.swing.JPopupMenu.Separator();
    saveFileItem = new javax.swing.JMenuItem();
    saveAsItem = new javax.swing.JMenuItem();
    savePlotItem = new javax.swing.JMenuItem();
    saveAllItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    printFileItem = new javax.swing.JMenuItem();
    printItem = new javax.swing.JMenuItem();
    jSeparator19 = new javax.swing.JPopupMenu.Separator();
    preferencesItem = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    connectItem = new javax.swing.JMenuItem();
    disconnectItem = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    exitItem = new javax.swing.JMenuItem();
    editMenu = new javax.swing.JMenu();
    undoItem = new javax.swing.JMenuItem();
    redoItem = new javax.swing.JMenuItem();
    jSeparator20 = new javax.swing.JPopupMenu.Separator();
    cutItem = new javax.swing.JMenuItem();
    copyItem = new javax.swing.JMenuItem();
    pasteItem = new javax.swing.JMenuItem();
    jSeparator21 = new javax.swing.JPopupMenu.Separator();
    deleteItem = new javax.swing.JMenuItem();
    selectAllItem = new javax.swing.JMenuItem();
    jSeparator22 = new javax.swing.JPopupMenu.Separator();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenuItem3 = new javax.swing.JMenuItem();
    jSeparator23 = new javax.swing.JPopupMenu.Separator();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jSeparator24 = new javax.swing.JPopupMenu.Separator();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenuItem1 = new javax.swing.JMenuItem();
    jSeparator11 = new javax.swing.JPopupMenu.Separator();
    clearOutWindowItem = new javax.swing.JMenuItem();
    jMenu3 = new javax.swing.JMenu();
    consoleItem = new javax.swing.JMenuItem();
    historyItem = new javax.swing.JMenuItem();
    filesItem = new javax.swing.JMenuItem();
    workspaceItem = new javax.swing.JMenuItem();
    codeEditorItem = new javax.swing.JMenuItem();
    pathsItem = new javax.swing.JMenuItem();
    pkgsItem = new javax.swing.JMenuItem();
    arrayEditItem = new javax.swing.JMenuItem();
    jMenuItem7 = new javax.swing.JMenuItem();
    jMenu1 = new javax.swing.JMenu();
    findItem = new javax.swing.JMenuItem();
    replaceItem = new javax.swing.JMenuItem();
    gotoItem = new javax.swing.JMenuItem();
    jSeparator25 = new javax.swing.JPopupMenu.Separator();
    googleItem = new javax.swing.JMenuItem();
    wikiItem = new javax.swing.JMenuItem();
    pkgMenu = new javax.swing.JMenu();
    debugMenu = new javax.swing.JMenu();
    runScriptItem = new javax.swing.JMenuItem();
    runScriptCItem = new javax.swing.JMenuItem();
    jMenuItem8 = new javax.swing.JMenuItem();
    jSeparator8 = new javax.swing.JPopupMenu.Separator();
    debugScriptMenuItem = new javax.swing.JMenuItem();
    testScriptMenuItem = new javax.swing.JMenuItem();
    toggleBreakpointItem = new javax.swing.JMenuItem();
    removeToggleBreakpointItem = new javax.swing.JMenuItem();
    clearAllBreakpointsItem = new javax.swing.JMenuItem();
    jSeparator10 = new javax.swing.JPopupMenu.Separator();
    stepItem = new javax.swing.JMenuItem();
    stepInItem = new javax.swing.JMenuItem();
    stepOutItem = new javax.swing.JMenuItem();
    continueItem = new javax.swing.JMenuItem();
    jSeparator5 = new javax.swing.JPopupMenu.Separator();
    finishDebugItem = new javax.swing.JMenuItem();
    toolsMenu = new javax.swing.JMenu();
    fltkplotItem = new javax.swing.JMenuItem();
    octaveCmdItem = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    previousWindowItem = new javax.swing.JMenuItem();
    nextWindowItem = new javax.swing.JMenuItem();
    jSeparator29 = new javax.swing.JPopupMenu.Separator();
    closeItem = new javax.swing.JMenuItem();
    closeAllItem = new javax.swing.JMenuItem();
    jSeparator18 = new javax.swing.JPopupMenu.Separator();
    windowsItem = new javax.swing.JMenuItem();
    helpMenu = new javax.swing.JMenu();
    forumItem = new javax.swing.JMenuItem();
    octaveInfoItem = new javax.swing.JMenuItem();
    jSeparator12 = new javax.swing.JPopupMenu.Separator();
    quickHelpItem = new javax.swing.JMenuItem();
    jMenuItem9 = new javax.swing.JMenuItem();
    docPkgItem = new javax.swing.JMenuItem();
    referenceMenu = new javax.swing.JMenu();
    referenceItem = new javax.swing.JMenuItem();
    jSeparator6 = new javax.swing.JPopupMenu.Separator();
    checkForUpdatesMenuItem = new javax.swing.JMenuItem();
    onlineHelpItem = new javax.swing.JMenuItem();
    faqItem = new javax.swing.JMenuItem();
    jSeparator14 = new javax.swing.JPopupMenu.Separator();
    reportBugItem = new javax.swing.JMenuItem();
    feedBackItem = new javax.swing.JMenuItem();
    jSeparator7 = new javax.swing.JPopupMenu.Separator();
    AboutItem = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    java.util.ResourceBundle bundle = java.util.ResourceBundle
            .getBundle("org/domainmath/gui/resources/DomainMath_en"); // NOI18N
    setTitle(bundle.getString("DomainMath.title")); // NOI18N
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }

        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

    jToolBar1.setRollover(true);
    jToolBar1.setName("Standard"); // NOI18N

    jButton1.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-new.png"))); // NOI18N
    jButton1.setFocusable(false);
    jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton1);

    jButton2.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    jButton2.setFocusable(false);
    jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton2);

    jButton3.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-save-all.png"))); // NOI18N
    jButton3.setFocusable(false);
    jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton3);
    jToolBar1.add(jSeparator4);

    connectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/connect.png"))); // NOI18N
    connectButton.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectButton.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectButton.setFocusable(false);
    connectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    connectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    connectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(connectButton);

    disconnectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/disconnect.png"))); // NOI18N
    disconnectButton
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("disconnectItem.mnemonic").charAt(0));
    disconnectButton.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectButton.setFocusable(false);
    disconnectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    disconnectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    disconnectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(disconnectButton);
    jToolBar1.add(jSeparator9);

    jButton4.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-undo.png"))); // NOI18N
    jButton4.setFocusable(false);
    jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton4);

    jButton5.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-redo.png"))); // NOI18N
    jButton5.setFocusable(false);
    jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton5.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton5ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton5);
    jToolBar1.add(jSeparator15);

    jButton6.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-cut.png"))); // NOI18N
    jButton6.setFocusable(false);
    jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton6ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton6);

    jButton7.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-copy.png"))); // NOI18N
    jButton7.setFocusable(false);
    jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton7ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton7);

    jButton8.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-paste.png"))); // NOI18N
    jButton8.setFocusable(false);
    jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton8ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton8);
    jToolBar1.add(jSeparator13);

    jLabel1.setText("Current Directory:");

    dirComboBox.setEditable(true);
    dirComboBox.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            dirComboBoxItemStateChanged(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(1, 1, 1).addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(dirComboBox, 0, 112, Short.MAX_VALUE).addGap(1, 1, 1)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(5, 5, 5).addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(dirComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    jToolBar1.add(jPanel1);

    folderUpButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/size22x22/go-up.png"))); // NOI18N
    folderUpButton.setToolTipText("Up");
    folderUpButton.setFocusable(false);
    folderUpButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    folderUpButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    folderUpButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            folderUpButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(folderUpButton);

    browseButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    browseButton.setToolTipText(bundle.getString("browseButton.title")); // NOI18N
    browseButton.setFocusable(false);
    browseButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    browseButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    browseButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            browseButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(browseButton);

    addButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-add.png"))); // NOI18N
    addButton.setToolTipText(bundle.getString("addButton.title")); // NOI18N
    addButton.setFocusable(false);
    addButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    addButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(addButton);

    getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

    fileMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fileMenu.mnemonic").charAt(0));
    fileMenu.setText(bundle.getString("fileMenu.name")); // NOI18N

    newFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    newFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-new.png"))); // NOI18N
    newFileItem.setText("New");
    newFileItem.setToolTipText(bundle.getString("newMenuItem.tooltip")); // NOI18N
    newFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(newFileItem);

    openItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    openItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-open.png"))); // NOI18N
    openItem.setText("Open...");
    openItem.setToolTipText("Open File");
    openItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openItemActionPerformed(evt);
        }
    });
    fileMenu.add(openItem);
    fileMenu.add(jSeparator17);

    saveFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.CTRL_MASK));
    saveFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-save.png"))); // NOI18N
    saveFileItem.setText("Save ");
    saveFileItem.setToolTipText(bundle.getString("saveMenuItem.tooltp")); // NOI18N
    saveFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveFileItem);

    saveAsItem.setText("Save As...");
    saveAsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAsItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAsItem);

    savePlotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("savePlotItem.mnemonic").charAt(0));
    savePlotItem.setText(bundle.getString("savePlotItem.name")); // NOI18N
    savePlotItem.setToolTipText(bundle.getString("savePlotItem.tooltip")); // NOI18N
    savePlotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            savePlotItemActionPerformed(evt);
        }
    });
    fileMenu.add(savePlotItem);

    saveAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    saveAllItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/document-save-all.png"))); // NOI18N
    saveAllItem.setText(bundle.getString("saveAllMenuItem.text")); // NOI18N
    saveAllItem.setToolTipText(bundle.getString("saveAllMenuItem.tooltip")); // NOI18N
    saveAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAllItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAllItem);
    fileMenu.add(jSeparator1);

    printFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.CTRL_MASK));
    printFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-print2.png"))); // NOI18N
    printFileItem.setText("Print");
    printFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(printFileItem);

    printItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    printItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("printItem.mnemonic").charAt(0));
    printItem.setText(bundle.getString("printItem.name")); // NOI18N
    printItem.setToolTipText(bundle.getString("printItem.tooltip")); // NOI18N
    printItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printItemActionPerformed(evt);
        }
    });
    fileMenu.add(printItem);
    fileMenu.add(jSeparator19);

    preferencesItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/preferences.png"))); // NOI18N
    preferencesItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("preferecesItem.mnemonic").charAt(0));
    preferencesItem.setText(bundle.getString("preferencesItem.name")); // NOI18N
    preferencesItem.setToolTipText(bundle.getString("preferencesItem.tooltip")); // NOI18N
    preferencesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            preferencesItemActionPerformed(evt);
        }
    });
    fileMenu.add(preferencesItem);
    fileMenu.add(jSeparator2);

    connectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/connect.png"))); // NOI18N
    connectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectItem.setText(bundle.getString("connectItem.name")); // NOI18N
    connectItem.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectItemActionPerformed(evt);
        }
    });
    fileMenu.add(connectItem);

    disconnectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/disconnect.png"))); // NOI18N
    disconnectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("disconnectItem.mnemonic").charAt(0));
    disconnectItem.setText(bundle.getString("disconnectItem.name")); // NOI18N
    disconnectItem.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectItemActionPerformed(evt);
        }
    });
    fileMenu.add(disconnectItem);
    fileMenu.add(jSeparator3);

    exitItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("exitItem.mnemonic").charAt(0));
    exitItem.setText(bundle.getString("exitItem.name")); // NOI18N
    exitItem.setToolTipText(bundle.getString("exitItem.tooltip")); // NOI18N
    exitItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitItemActionPerformed(evt);
        }
    });
    fileMenu.add(exitItem);

    jMenuBar1.add(fileMenu);

    editMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("editMenu.mnemonic").charAt(0));
    editMenu.setText("Edit");

    undoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z,
            java.awt.event.InputEvent.CTRL_MASK));
    undoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-undo.png"))); // NOI18N
    undoItem.setText("Undo");
    undoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            undoItemActionPerformed(evt);
        }
    });
    editMenu.add(undoItem);

    redoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y,
            java.awt.event.InputEvent.CTRL_MASK));
    redoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-redo.png"))); // NOI18N
    redoItem.setText("Redo");
    redoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            redoItemActionPerformed(evt);
        }
    });
    editMenu.add(redoItem);
    editMenu.add(jSeparator20);

    cutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X,
            java.awt.event.InputEvent.CTRL_MASK));
    cutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-cut.png"))); // NOI18N
    cutItem.setText("Cut");
    cutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cutItemActionPerformed(evt);
        }
    });
    editMenu.add(cutItem);

    copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C,
            java.awt.event.InputEvent.CTRL_MASK));
    copyItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-copy.png"))); // NOI18N
    copyItem.setText("Copy");
    copyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyItemActionPerformed(evt);
        }
    });
    editMenu.add(copyItem);

    pasteItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V,
            java.awt.event.InputEvent.CTRL_MASK));
    pasteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-paste.png"))); // NOI18N
    pasteItem.setText("Paste");
    pasteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pasteItemActionPerformed(evt);
        }
    });
    editMenu.add(pasteItem);
    editMenu.add(jSeparator21);

    deleteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-delete.png"))); // NOI18N
    deleteItem.setText("Delete");
    deleteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteItemActionPerformed(evt);
        }
    });
    editMenu.add(deleteItem);

    selectAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
            java.awt.event.InputEvent.CTRL_MASK));
    selectAllItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-select-all.png"))); // NOI18N
    selectAllItem.setText("Select All");
    selectAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectAllItemActionPerformed(evt);
        }
    });
    editMenu.add(selectAllItem);
    editMenu.add(jSeparator22);

    jMenuItem2.setAction(new RSyntaxTextAreaEditorKit.InsertTabAction());
    jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem2.setText("Increase Indent");
    editMenu.add(jMenuItem2);

    jMenuItem3.setAction(new RSyntaxTextAreaEditorKit.DecreaseIndentAction());
    jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem3.setText("Decrease Indent");
    editMenu.add(jMenuItem3);
    editMenu.add(jSeparator23);

    jMenuItem4.setAction(new RTextAreaEditorKit.UpperSelectionCaseAction());
    jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem4.setText("Make Uppercase");
    editMenu.add(jMenuItem4);

    jMenuItem5.setAction(new RTextAreaEditorKit.LowerSelectionCaseAction());
    jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem5.setText("Make Lowercase");
    editMenu.add(jMenuItem5);
    editMenu.add(jSeparator24);

    jMenuItem6.setText("Clear All Marks...");
    jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem6ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem6);

    jMenuItem1.setAction(new RSyntaxTextAreaEditorKit.ToggleCommentAction());
    jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SLASH,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Toggle Comment");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem1);
    editMenu.add(jSeparator11);

    clearOutWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.CTRL_MASK));
    clearOutWindowItem
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("clearOutputWindowItem.mnemonic").charAt(0));
    clearOutWindowItem.setText(bundle.getString("clearOutputWindowItem.name")); // NOI18N
    clearOutWindowItem.setToolTipText(bundle.getString("clearOutputWindowItem.tooltip")); // NOI18N
    clearOutWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearOutWindowItemActionPerformed(evt);
        }
    });
    editMenu.add(clearOutWindowItem);

    jMenuBar1.add(editMenu);

    jMenu3.setText(bundle.getString("viewMenu.title")); // NOI18N

    consoleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_0,
            java.awt.event.InputEvent.CTRL_MASK));
    consoleItem.setText(bundle.getString("consoleItem.title")); // NOI18N
    consoleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            consoleItemActionPerformed(evt);
        }
    });
    jMenu3.add(consoleItem);

    historyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1,
            java.awt.event.InputEvent.CTRL_MASK));
    historyItem.setText(bundle.getString("historyItem.title")); // NOI18N
    historyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            historyItemActionPerformed(evt);
        }
    });
    jMenu3.add(historyItem);

    filesItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2,
            java.awt.event.InputEvent.CTRL_MASK));
    filesItem.setText(bundle.getString("filesItem.title")); // NOI18N
    filesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            filesItemActionPerformed(evt);
        }
    });
    jMenu3.add(filesItem);

    workspaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3,
            java.awt.event.InputEvent.CTRL_MASK));
    workspaceItem.setText(bundle.getString("worksaceItem.title")); // NOI18N
    workspaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            workspaceItemActionPerformed(evt);
        }
    });
    jMenu3.add(workspaceItem);

    codeEditorItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4,
            java.awt.event.InputEvent.CTRL_MASK));
    codeEditorItem.setText(bundle.getString("codeEditorItem.title")); // NOI18N
    codeEditorItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            codeEditorItemActionPerformed(evt);
        }
    });
    jMenu3.add(codeEditorItem);

    pathsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5,
            java.awt.event.InputEvent.CTRL_MASK));
    pathsItem.setText(bundle.getString("setPathsItem.title")); // NOI18N
    pathsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pathsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pathsItem);

    pkgsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6,
            java.awt.event.InputEvent.CTRL_MASK));
    pkgsItem.setText(bundle.getString("pkgsItem.title")); // NOI18N
    pkgsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pkgsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pkgsItem);

    arrayEditItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7,
            java.awt.event.InputEvent.CTRL_MASK));
    arrayEditItem.setText(bundle.getString("arrayEidtorItem.title")); // NOI18N
    arrayEditItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            arrayEditItemActionPerformed(evt);
        }
    });
    jMenu3.add(arrayEditItem);

    jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem7.setText("Debugger Window");
    jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem7ActionPerformed(evt);
        }
    });
    jMenu3.add(jMenuItem7);

    jMenuBar1.add(jMenu3);

    jMenu1.setMnemonic('S');
    jMenu1.setText("Search");

    findItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F,
            java.awt.event.InputEvent.CTRL_MASK));
    findItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-find.png"))); // NOI18N
    findItem.setMnemonic('F');
    findItem.setText("Find...");
    findItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            findItemActionPerformed(evt);
        }
    });
    jMenu1.add(findItem);

    replaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H,
            java.awt.event.InputEvent.CTRL_MASK));
    replaceItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/edit-find-replace.png"))); // NOI18N
    replaceItem.setText("Replace...");
    replaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            replaceItemActionPerformed(evt);
        }
    });
    jMenu1.add(replaceItem);

    gotoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    gotoItem.setText("Go To...");
    gotoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            gotoItemActionPerformed(evt);
        }
    });
    jMenu1.add(gotoItem);
    jMenu1.add(jSeparator25);

    googleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.CTRL_MASK));
    googleItem.setText("Google Search");
    googleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            googleItemActionPerformed(evt);
        }
    });
    jMenu1.add(googleItem);

    wikiItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    wikiItem.setText("Wikipedia Search");
    wikiItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            wikiItemActionPerformed(evt);
        }
    });
    jMenu1.add(wikiItem);

    jMenuBar1.add(jMenu1);

    pkgMenu.setText(bundle.getString("pkgMenu.name")); // NOI18N
    jMenuBar1.add(pkgMenu);

    debugMenu.setText("Debug");

    runScriptItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0));
    runScriptItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/Run.png"))); // NOI18N
    runScriptItem.setText("Run Script");
    runScriptItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptItem);

    runScriptCItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6,
            java.awt.event.InputEvent.SHIFT_MASK));
    runScriptCItem.setText("Run Script from Console");
    runScriptCItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptCItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptCItem);

    jMenuItem8.setText("Edit Run Configuration");
    jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem8ActionPerformed(evt);
        }
    });
    debugMenu.add(jMenuItem8);
    debugMenu.add(jSeparator8);

    debugScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.CTRL_MASK));
    debugScriptMenuItem.setText("Debug Script");
    debugScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            debugScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(debugScriptMenuItem);

    testScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    testScriptMenuItem.setText("Test Script");
    testScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            testScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(testScriptMenuItem);

    toggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, 0));
    toggleBreakpointItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/resources/stop.png"))); // NOI18N
    toggleBreakpointItem.setText("Toggle Breakpoint");
    toggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            toggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(toggleBreakpointItem);

    removeToggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK));
    removeToggleBreakpointItem.setText("Remove Toggle Breakpoint");
    removeToggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removeToggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(removeToggleBreakpointItem);

    clearAllBreakpointsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    clearAllBreakpointsItem.setText("Clear All Breakpoints...");
    clearAllBreakpointsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearAllBreakpointsItemActionPerformed(evt);
        }
    });
    debugMenu.add(clearAllBreakpointsItem);
    debugMenu.add(jSeparator10);

    stepItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F10,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step.png"))); // NOI18N
    stepItem.setText("Step");
    stepItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepItem);

    stepInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0));
    stepInItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-in.png"))); // NOI18N
    stepInItem.setText("Step in");
    stepInItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepInItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepInItem);

    stepOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepOutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-out.png"))); // NOI18N
    stepOutItem.setText("Step out");
    stepOutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepOutItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepOutItem);

    continueItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
    continueItem.setText("Continue");
    continueItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            continueItemActionPerformed(evt);
        }
    });
    debugMenu.add(continueItem);
    debugMenu.add(jSeparator5);

    finishDebugItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.SHIFT_MASK));
    finishDebugItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/finish.png"))); // NOI18N
    finishDebugItem.setText("Finish Debugger Session");
    finishDebugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            finishDebugItemActionPerformed(evt);
        }
    });
    debugMenu.add(finishDebugItem);

    jMenuBar1.add(debugMenu);

    toolsMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("ToolsMenu.mnemonic").charAt(0));
    toolsMenu.setText(bundle.getString("ToolsMenu.name")); // NOI18N

    fltkplotItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    fltkplotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fltkPlotItem.mnemonic").charAt(0));
    fltkplotItem.setText(bundle.getString("fltkPlotItem.name")); // NOI18N
    fltkplotItem.setToolTipText(bundle.getString("fltkPlotItem.tooltip")); // NOI18N
    fltkplotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fltkplotItemActionPerformed(evt);
        }
    });
    toolsMenu.add(fltkplotItem);

    octaveCmdItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octaveCmdItem.mnemonic").charAt(0));
    octaveCmdItem.setText(bundle.getString("octaveCmdItem.name")); // NOI18N
    octaveCmdItem.setToolTipText(bundle.getString("octaveCmdItem.tooltip")); // NOI18N
    octaveCmdItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveCmdItemActionPerformed(evt);
        }
    });
    toolsMenu.add(octaveCmdItem);

    jMenuBar1.add(toolsMenu);

    jMenu2.setText(bundle.getString("windowMenu.title")); // NOI18N

    previousWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN,
            java.awt.event.InputEvent.CTRL_MASK));
    previousWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-previous.png"))); // NOI18N
    previousWindowItem.setText(bundle.getString("previousWindowItem.title")); // NOI18N
    previousWindowItem.setToolTipText(bundle.getString("previousWindowItem.tooltip")); // NOI18N
    previousWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            previousWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(previousWindowItem);

    nextWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP,
            java.awt.event.InputEvent.CTRL_MASK));
    nextWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-next.png"))); // NOI18N
    nextWindowItem.setText(bundle.getString("nextWindowItem.title")); // NOI18N
    nextWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            nextWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(nextWindowItem);
    jMenu2.add(jSeparator29);

    closeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK));
    closeItem.setText(bundle.getString("closeMenuItem.name")); // NOI18N
    closeItem.setToolTipText(bundle.getString("closeItem.tooltip")); // NOI18N
    closeItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeItem);

    closeAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.SHIFT_MASK));
    closeAllItem.setText(bundle.getString("closeAllItem.name")); // NOI18N
    closeAllItem.setToolTipText(bundle.getString("closeAllItem.tooltip")); // NOI18N
    closeAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeAllItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeAllItem);
    jMenu2.add(jSeparator18);

    windowsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4,
            java.awt.event.InputEvent.SHIFT_MASK));
    windowsItem.setText(bundle.getString("windowsItem.title")); // NOI18N
    windowsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            windowsItemActionPerformed(evt);
        }
    });
    jMenu2.add(windowsItem);

    jMenuBar1.add(jMenu2);

    helpMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("helpMenu.mnemonic").charAt(0));
    helpMenu.setText(bundle.getString("helpMenu.name")); // NOI18N

    forumItem.setText("Forum");
    forumItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            forumItemActionPerformed(evt);
        }
    });
    helpMenu.add(forumItem);

    octaveInfoItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octInfoItem.mnemonic").charAt(0));
    octaveInfoItem.setText(bundle.getString("octInfoItem.name")); // NOI18N
    octaveInfoItem.setToolTipText(bundle.getString("octInfoItem.tooltip")); // NOI18N
    octaveInfoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveInfoItemActionPerformed(evt);
        }
    });
    helpMenu.add(octaveInfoItem);
    helpMenu.add(jSeparator12);

    quickHelpItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
    quickHelpItem.setText(bundle.getString("quickHelpItem.name")); // NOI18N
    quickHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            quickHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(quickHelpItem);

    jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem9.setText("Package  Documentation");
    jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem9ActionPerformed(evt);
        }
    });
    helpMenu.add(jMenuItem9);

    docPkgItem.setText("Package Online  Documentation");
    docPkgItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            docPkgItemActionPerformed(evt);
        }
    });
    helpMenu.add(docPkgItem);

    referenceMenu.setText(bundle.getString("referencesMenu.name")); // NOI18N
    helpMenu.add(referenceMenu);

    referenceItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("addReferencesItem.mnemonic").charAt(0));
    referenceItem.setText(bundle.getString("addReferencesItem.name")); // NOI18N
    referenceItem.setToolTipText(bundle.getString("addReferencesItem.tooltip")); // NOI18N
    referenceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            referenceItemActionPerformed(evt);
        }
    });
    helpMenu.add(referenceItem);
    helpMenu.add(jSeparator6);

    checkForUpdatesMenuItem.setText(bundle.getString("checkForUpdatesMenuItem.text")); // NOI18N
    checkForUpdatesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkForUpdatesMenuItemActionPerformed(evt);
        }
    });
    helpMenu.add(checkForUpdatesMenuItem);

    onlineHelpItem.setText("Help and Support");
    onlineHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            onlineHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(onlineHelpItem);

    faqItem.setText("Online FAQ");
    faqItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            faqItemActionPerformed(evt);
        }
    });
    helpMenu.add(faqItem);
    helpMenu.add(jSeparator14);

    reportBugItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("reportBugItem.mnemonic").charAt(0));
    reportBugItem.setText(bundle.getString("reportBugItem.name")); // NOI18N
    reportBugItem.setToolTipText(bundle.getString("reportBugItem.tooltip")); // NOI18N
    reportBugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            reportBugItemActionPerformed(evt);
        }
    });
    helpMenu.add(reportBugItem);

    feedBackItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("yourFeedbackItem.mnemonic").charAt(0));
    feedBackItem.setText(bundle.getString("yourFeedbackItem.name")); // NOI18N
    feedBackItem.setToolTipText(bundle.getString("yourFeedbackItem.tooltip")); // NOI18N
    feedBackItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            feedBackItemActionPerformed(evt);
        }
    });
    helpMenu.add(feedBackItem);
    helpMenu.add(jSeparator7);

    AboutItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("aboutItem.mnemonic").charAt(0));
    AboutItem.setText(bundle.getString("aboutItem.name")); // NOI18N
    AboutItem.setToolTipText(bundle.getString("aboutItem.tooltip")); // NOI18N
    AboutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            AboutItemActionPerformed(evt);
        }
    });
    helpMenu.add(AboutItem);

    jMenuBar1.add(helpMenu);

    setJMenuBar(jMenuBar1);

    pack();
}