Example usage for javax.swing TransferHandler TransferHandler

List of usage examples for javax.swing TransferHandler TransferHandler

Introduction

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

Prototype

public TransferHandler(String property) 

Source Link

Document

Constructs a transfer handler that can transfer a Java Bean property from one component to another via the clipboard or a drag and drop operation.

Usage

From source file:MainClass.java

private void setMyTransferHandlers(String s) {
    TransferHandler th = new TransferHandler(s);
    tf.setTransferHandler(th);
    l.setTransferHandler(th);
}

From source file:com.eviware.soapui.impl.wsdl.panels.teststeps.support.PropertyHolderTable.java

protected JTable buildPropertiesTable() {
    propertiesModel = getPropertyHolderTableModel();
    propertiesTable = new PropertiesHolderJTable();
    propertiesTable.setName(PROPERTIES_HOLDER_TABLE_NAME);
    propertiesTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    propertiesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            int selectedRow = propertiesTable.getSelectedRow();
            if (removePropertyAction != null) {
                removePropertyAction.setEnabled(selectedRow != -1);
            }//from   w w w  .j a v  a  2 s . c  o  m

            if (movePropertyUpAction != null) {
                movePropertyUpAction.setEnabled(selectedRow > 0);
            }

            if (movePropertyDownAction != null) {
                movePropertyDownAction
                        .setEnabled(selectedRow >= 0 && selectedRow < propertiesTable.getRowCount() - 1);
            }
        }
    });

    propertiesTable.setDragEnabled(true);
    propertiesTable.setTransferHandler(new TransferHandler("testProperty"));

    if (getHolder().getModelItem() != null) {
        DropTarget dropTarget = new DropTarget(propertiesTable,
                new PropertyHolderTablePropertyExpansionDropTarget());
        dropTarget.setDefaultActions(DnDConstants.ACTION_COPY_OR_MOVE);
    }

    // Set render this only for value column. In this cell render we handle password shadowing.
    propertiesTable.getColumnModel().getColumn(1).setCellRenderer(new PropertiesTableCellRenderer());
    return propertiesTable;
}

From source file:edu.harvard.i2b2.query.ui.QueryTopPanel.java

/**
 * This method is called from within the constructor to initialize the form.
 *///w ww  . jav a 2  s.  co  m
private void initComponents() {
    jNameLabel = new javax.swing.JLabel();
    jSetSizeLabel = new javax.swing.JLabel();
    jNameTextField = new javax.swing.JTextField();
    jSetSizeFiled = new javax.swing.JLabel();
    jDeleteButton = new javax.swing.JButton();
    jScrollPane1 = new QueryConceptTreePanel("Group 1", this);
    jRunQueryButton = new javax.swing.JButton();
    jCancelButton = new javax.swing.JButton();
    jClearGroupsButton = new javax.swing.JButton();
    jScrollPane2 = new QueryConceptTreePanel("Group 2", this);
    jScrollPane3 = new QueryConceptTreePanel("Group 3", this);
    jScrollPane4 = new javax.swing.JScrollPane();
    jPanel1 = new javax.swing.JPanel();
    // jVisitComboBox = new javax.swing.JComboBox();
    jAndOrLabel1 = new javax.swing.JLabel();
    jAndOrLabel2 = new javax.swing.JLabel();
    jMorePanelsButton = new javax.swing.JButton();
    jWorkflowToolBar = new javax.swing.JToolBar();
    jTimelineToggleButton = new javax.swing.JToggleButton();
    jPatientCountToggleButton = new javax.swing.JToggleButton();
    jPatientSetToggleButton = new javax.swing.JToggleButton();
    jToolbarPanel = new javax.swing.JPanel();
    jQueryNamePanel = new javax.swing.JPanel();

    jOptionsScrollPane = new javax.swing.JScrollPane();
    jOptionsPanel = new javax.swing.JPanel();
    jShowTimelineCheckBox = new javax.swing.JCheckBox();
    jGetPatientCountCheckBox = new javax.swing.JCheckBox();
    jGetPatientSetCheckBox = new javax.swing.JCheckBox();

    setLayout(null);

    // jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
    // ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jPanel1.setLayout(null);

    jPanel1.add(jScrollPane1);
    jScrollPane1.setBounds(0, 0, 180, 200);

    jPanel1.add(jScrollPane2);
    jScrollPane2.setBounds(185, 0, 180, 200);

    jPanel1.add(jScrollPane3);
    jScrollPane3.setBounds(370, 0, 180, 200);

    //jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    jAndOrLabel1.setText("and");
    //jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel1);
    // jAndOrLabel1.setBounds(190, 90, 30, 18);

    //jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    // jAndOrLabel2.setText("and");
    //jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel2);
    // jAndOrLabel2.setBounds(410, 90, 30, 18);

    jQueryNamePanel.setLayout(null);
    jQueryNamePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jNameLabel.setText(" Query Name: ");
    jNameLabel.setToolTipText("You may drag this item to workplace to save the query definition");
    jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jNameLabel.setBounds(2, 2, 70, 23);
    add(jNameLabel);
    // jQueryNamePanel.add(jNameLabel);
    jNameLabel.setTransferHandler(new NameLabelTextHandler());
    jNameLabel.addMouseListener(new DragMouseAdapter());
    jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseMoved(java.awt.event.MouseEvent evt) {
            jNameLabelMouseMoved(evt);
        }
    });
    jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseExited(java.awt.event.MouseEvent evt) {
            jNameLabelMouseExited(evt);
        }
    });

    jNameTextField.setText("");
    jNameTextField.setBounds(95, 10, 400, 20);
    jNameTextField.setEditable(false);
    jNameTextField.setDragEnabled(true);
    jNameTextField.setTransferHandler(new TransferHandler("Text"));
    // jQueryNamePanel.add(jNameTextField);
    // add(jNameTextField);
    // add(jQueryNamePanel);
    // jQueryNamePanel.setBounds(5, 5, 400, 50);

    jClearGroupsButton.setText("Reset Groups");
    jClearGroupsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jClearGroupsButtonActionPerformed(evt);
        }
    });
    jClearGroupsButton.setBounds(600, 10, 115, 20);
    add(jClearGroupsButton);

    jPanel1.setPreferredSize(new Dimension(700, 150));
    jScrollPane4.setViewportView(jPanel1);
    add(jScrollPane4);
    jScrollPane4.setBounds(20, 35, 635, 220);
    jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

    jCancelButton.setText("Cancel");
    jCancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCancelButtonActionPerformed(evt);
        }
    });
    // add(jCancelButton);
    // jCancelButton.setBounds(20, 255, 90, 23);
    // jCancelButton.setFont(new Font("Tahoma", Font.PLAIN, 10));

    jRunQueryButton.setText("Run Query");
    jRunQueryButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRunQueryButtonActionPerformed(evt);
        }
    });
    add(jRunQueryButton);
    jRunQueryButton.setBounds(100, 255, 625, 23);

    jSetSizeLabel.setText(" Patient(s) returned:");
    add(jSetSizeLabel);
    jSetSizeLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jSetSizeLabel.setBounds(20, 275, 70, 23);

    // jSetSizeFiled.setText(" subjects");
    // jSetSizeFiled.setEditable(false);
    // jSetSizeFiled.setHorizontalAlignment(SwingConstants.LEFT);
    // add(jSetSizeFiled);
    // jSetSizeLabel.setBounds(20, 275, 70, 23);

    jToolbarPanel.setLayout(new java.awt.BorderLayout());

    // jWorkflowToolBar.setRollover(true);
    // jWorkflowToolBar.setInheritsPopupMenu(true);
    jTimelineToggleButton.setIcon(
            new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    jTimelineToggleButton.setText("Show TimeLine");
    jTimelineToggleButton.setFocusPainted(false);
    jWorkflowToolBar.add(jTimelineToggleButton);

    jPatientCountToggleButton.setIcon(
            new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    jPatientCountToggleButton.setText("Get Patient Count");
    jPatientCountToggleButton.setFocusPainted(false);
    jWorkflowToolBar.add(jPatientCountToggleButton);

    jPatientSetToggleButton.setIcon(
            new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    jPatientSetToggleButton.setText("Get Patient Set");
    jPatientSetToggleButton.setFocusPainted(false);
    jWorkflowToolBar.add(jPatientSetToggleButton);
    jWorkflowToolBar.setPreferredSize(new Dimension(380, 40));

    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.PAGE_START);
    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.CENTER);

    // add(jToolbarPanel);
    jToolbarPanel.setBounds(20, 130, 240, 23);

    jMorePanelsButton.setText("<html><center>Add<br>" + "<left>Group");
    jMorePanelsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMorePanelsButtonActionPerformed(evt);
        }
    });
    // add(jMorePanelsButton);
    // jMorePanelsButton.setBounds(655, 35, 60, 220);

    jPanel1.add(jMorePanelsButton);
    jMorePanelsButton.setBounds(550, 0, 60, 200);

    jOptionsPanel.setLayout(null);
    jOptionsScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jOptionsPanel.setPreferredSize(new java.awt.Dimension(100, 100));
    jShowTimelineCheckBox.setText("Timeline");
    jShowTimelineCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jShowTimelineCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jShowTimelineCheckBox.setToolTipText("Get the patient set and display it in timeline view");
    jOptionsPanel.add(jShowTimelineCheckBox);
    jShowTimelineCheckBox.setBounds(5, 20, 110, 15);

    jGetPatientCountCheckBox.setText("Patient Count");
    jGetPatientCountCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jGetPatientCountCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jGetPatientCountCheckBox.setToolTipText("Get the patient count XML");
    jOptionsPanel.add(jGetPatientCountCheckBox);
    jGetPatientCountCheckBox.setBounds(5, 50, 110, 15);

    jGetPatientSetCheckBox.setText("Patient Set");
    jGetPatientSetCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jGetPatientSetCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    // jOptionsPanel.add(jGetPatientSetCheckBox);
    // jGetPatientSetCheckBox.setBounds(10, 80, 80, 15);

    jOptionsScrollPane.setViewportView(jOptionsPanel);

    add(jOptionsScrollPane);
    jOptionsScrollPane.setBounds(500, 30, 120, 190);

    /*
     * jDeleteButton.setText("Delete"); jDeleteButton.addActionListener(new
     * java.awt.event.ActionListener() { public void
     * actionPerformed(java.awt.event.ActionEvent evt) {
     * jDeleteButtonActionPerformed(evt); } });
     * 
     * jVisitComboBox.setModel(new javax.swing.DefaultComboBoxModel(new
     * String[] { "Groups don't have to occur in the same visit", "Groups
     * must all occur in the same visit" })); add(jVisitComboBox);
     * jVisitComboBox.setBounds(20, 40, 240, 22);
     * 
     * //add(jDeleteButton); //jDeleteButton.setBounds(20, 10, 65, 23);
     * 
     * add(jScrollPane1); jScrollPane1.setBounds(20, 70, 170, 320);
     * 
     * jRunQueryButton.setText("Run Query");
     * jRunQueryButton.addActionListener(new java.awt.event.ActionListener()
     * { public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRunQueryButtonActionPerformed(evt); } });
     * 
     * add(jRunQueryButton); jRunQueryButton.setBounds(20, 10, 87, 23);
     * 
     * jCancelButton.setText("Remove All");
     * jCancelButton.addActionListener(new java.awt.event.ActionListener() {
     * public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRemoveAllButtonActionPerformed(evt); } });
     * 
     * add(jCancelButton); jCancelButton.setBounds(115, 10, 90, 23);
     * 
     * //jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
     * ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
     * jPanel1.setLayout(null);
     * jScrollPane4.getHorizontalScrollBar().setUnitIncrement(20);
     * //jPanel1.setVisible(false);
     * 
     * //jScrollPane1.setToolTipText("scrollpane 1");
     * jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 170, 350);
     * 
     * jPanel1.add(jScrollPane2); jScrollPane2.setBounds(210, 0, 170, 350);
     */

    jAndOrLabel1.setBackground(new java.awt.Color(255, 255, 255));
    jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel1.setText("and");
    jAndOrLabel1.setToolTipText("Click to change the relationship");
    jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel1MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel1);

    jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel2.setText("and");
    jAndOrLabel2.setToolTipText("Click to change the relationship");
    jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel2MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel2);

    /*
     * jPanel1.add(jScrollPane3); jScrollPane3.setBounds(420, 0, 170, 350);
     * 
     * jScrollPane4.setViewportView(jPanel1);
     * 
     * add(jScrollPane4); jScrollPane4.setBounds(20, 70, 594, 370);
     * 
     * jMorePanelsButton.setText("Add Panel");
     * jMorePanelsButton.addActionListener(new
     * java.awt.event.ActionListener() { public void
     * actionPerformed(java.awt.event.ActionEvent evt) {
     * jMorePanelsButtonActionPerformed(evt); } });
     * 
     * add(jMorePanelsButton); jMorePanelsButton.setBounds(215, 10, 90, 23);
     */

    // jTree1.addTreeWillExpandListener(this);
    // jTree1.addTreeExpansionListener(this);
    // jScrollPane1.setViewportView(new QueryConceptTreePanel("Group 1"));
    // jScrollPane1.setToolTipText("Double click on a folder to view the
    // items inside");
    // jTree2.addTreeExpansionListener(this);
    // jScrollPane2.setViewportView(new QueryConceptTreePanel("Group 2"));
    // jTree3.addTreeExpansionListener(this);
    // treepanel = new QueryConceptTreePanel("", this);
    // jScrollPane3.setViewportView(new QueryConceptTreePanel("Group 3"));
    // jSlider1.setMajorTickSpacing(20);
    /*
     * jSlider1.setPaintTicks(true); jSlider1.setValue(0);
     * jSlider1.setMinorTickSpacing(10); jSlider1.setToolTipText("Slider on
     * left is more Sensitive Query, " + "on right is more Specific");
     * add(jSlider1); jSlider1.setBounds(380, 40, 140, 18);
     * 
     * //jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
     * jLabel1.setText("Sensitivity <"); add(jLabel1);
     * jLabel1.setBounds(290, 40, 80, 20);
     * 
     * //jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel2.setText("> Specificity"); add(jLabel2);
     * jLabel2.setBounds(525, 40, 70, 20);
     */

    dataModel.addPanel(jScrollPane1, null, 0);
    dataModel.addPanel(jScrollPane2, jAndOrLabel1, 0);
    dataModel.addPanel(jScrollPane3, jAndOrLabel2, 555);
}

From source file:edu.harvard.i2b2.query.ui.TopPanel.java

/**
 * This method is called from within the constructor to initialize the form.
 *//*  ww w.j av a  2  s.com*/
private void initComponents() {
    jAnalysisLabel = new javax.swing.JLabel();
    jNameLabel = new javax.swing.JLabel();
    jSetSizeLabel = new javax.swing.JLabel();
    jNameTextField = new javax.swing.JTextField();
    jSetSizeFiled = new javax.swing.JLabel();
    jDeleteButton = new javax.swing.JButton();
    jScrollPane1 = new ConceptTreePanel("Group 1", this);
    jRunQueryButton = new javax.swing.JButton();
    jCancelButton = new javax.swing.JButton();
    jClearGroupsButton = new javax.swing.JButton();
    jScrollPane2 = new ConceptTreePanel("Group 2", this);
    jScrollPane3 = new ConceptTreePanel("Group 3", this);
    jScrollPane4 = new javax.swing.JScrollPane();
    jPanel1 = new javax.swing.JPanel();
    // jVisitComboBox = new javax.swing.JComboBox();
    jAndOrLabel1 = new javax.swing.JLabel();
    jAndOrLabel2 = new javax.swing.JLabel();
    jMorePanelsButton = new javax.swing.JButton();
    jWorkflowToolBar = new javax.swing.JToolBar();
    // jTimelineToggleButton = new javax.swing.JToggleButton();
    jPatientCountToggleButton = new javax.swing.JToggleButton();
    // jPatientSetToggleButton = new javax.swing.JToggleButton();
    jToolbarPanel = new javax.swing.JPanel();
    jQueryNamePanel = new javax.swing.JPanel();

    // jOptionsScrollPane = new javax.swing.JScrollPane();
    jOptionsPanel = new AnalysisPanel();
    jShowTimelineCheckBox = new javax.swing.JCheckBox();
    jGetAllPatientsCheckBox = new javax.swing.JCheckBox();
    // jGetPatientCountCheckBox = new javax.swing.JCheckBox();
    // jGetPatientSetCheckBox = new javax.swing.JCheckBox();

    setLayout(null);

    // jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
    // ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jPanel1.setLayout(null);

    jPanel1.add(jScrollPane1);
    jScrollPane1.setBounds(0, 0, 180, 200);

    jPanel1.add(jScrollPane2);
    jScrollPane2.setBounds(185, 0, 180, 200);

    jPanel1.add(jScrollPane3);
    jScrollPane3.setBounds(370, 0, 180, 200);

    // jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    jAndOrLabel1.setText("and");
    // jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel1);
    // jAndOrLabel1.setBounds(190, 90, 30, 18);

    // jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    // jAndOrLabel2.setText("and");
    // jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel2);
    // jAndOrLabel2.setBounds(410, 90, 30, 18);

    jQueryNamePanel.setLayout(null);
    jQueryNamePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jNameLabel.setText(" Query Name: ");
    jNameLabel.setToolTipText("You may drag this item to workplace to save the query definition");
    jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jNameLabel.setBounds(2, 2, 70, 23);
    add(jNameLabel);
    // jQueryNamePanel.add(jNameLabel);
    jNameLabel.setTransferHandler(new NameLabelTextHandler());
    jNameLabel.addMouseListener(new DragMouseAdapter());
    jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseMoved(java.awt.event.MouseEvent evt) {
            jNameLabelMouseMoved(evt);
        }
    });
    jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseExited(java.awt.event.MouseEvent evt) {
            jNameLabelMouseExited(evt);
        }
    });

    jNameTextField.setText("");
    jNameTextField.setBounds(95, 10, 370, 20);
    jNameTextField.setEditable(false);
    jNameTextField.setDragEnabled(true);
    jNameTextField.setTransferHandler(new TransferHandler("Text"));
    // jQueryNamePanel.add(jNameTextField);
    // add(jNameTextField);
    // add(jQueryNamePanel);
    // jQueryNamePanel.setBounds(5, 5, 400, 50);

    jClearGroupsButton.setFont(new java.awt.Font("Tahoma", 1, 10));
    jClearGroupsButton.setText("X");
    jClearGroupsButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jClearGroupsButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
    jClearGroupsButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
    jClearGroupsButton.setToolTipText("Reset all panels");
    if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) {
        jClearGroupsButton.setMargin(new java.awt.Insets(-10, -15, -10, -20));
    }
    jClearGroupsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jClearGroupsButtonActionPerformed(evt);
        }
    });
    jClearGroupsButton.setBounds(600, 10, 30, 20);
    add(jClearGroupsButton);

    jAnalysisLabel.setText("Analysis Types");
    // jAnalysisLabel.setBackground(Color.WHITE);
    // jAnalysisLabel.setOpaque(true);
    jAnalysisLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jAnalysisLabel.setBounds(2, 2, 70, 23);
    jAnalysisLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAnalysisLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    add(jAnalysisLabel);

    jPanel1.setPreferredSize(new Dimension(700, 150));
    jScrollPane4.setViewportView(jPanel1);
    add(jScrollPane4);
    jScrollPane4.setBounds(20, 35, 635, 220);
    jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    // jScrollPane4.setBorder(javax.swing.BorderFactory
    // .createLineBorder(new java.awt.Color(0, 0, 0)));
    jCancelButton.setText("Cancel");
    jCancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCancelButtonActionPerformed(evt);
        }
    });
    // add(jCancelButton);
    // jCancelButton.setBounds(20, 255, 90, 23);
    // jCancelButton.setFont(new Font("Tahoma", Font.PLAIN, 10));

    jGetAllPatientsCheckBox.setText("Get Everyone");
    jGetAllPatientsCheckBox.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    // jGetAllPatientsCheckBox
    // .setBorder(new javax.swing.border.SoftBevelBorder(
    // javax.swing.border.BevelBorder.RAISED));
    jGetAllPatientsCheckBox.setBorderPainted(true);
    jGetAllPatientsCheckBox.setContentAreaFilled(false);
    jGetAllPatientsCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jGetAllPatientsCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    jGetAllPatientsCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jGetAllPatientsCheckBox.setToolTipText("Get all the patients in datamart");
    add(jGetAllPatientsCheckBox);
    jGetAllPatientsCheckBox.setBounds(5, 255, 110, 15);
    jGetAllPatientsCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jGetAllPatientsCheckBoxActionPerformed(evt);
        }
    });

    jRunQueryButton.setText("Run Query Above");
    jRunQueryButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRunQueryButtonActionPerformed(evt);
        }
    });
    add(jRunQueryButton);
    jRunQueryButton.setBounds(100, 255, 625, 23);

    jSetSizeLabel.setText(" Patient(s) returned:");
    add(jSetSizeLabel);
    jSetSizeLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jSetSizeLabel.setBounds(20, 275, 70, 23);

    // jSetSizeFiled.setText(" subjects");
    // jSetSizeFiled.setEditable(false);
    // jSetSizeFiled.setHorizontalAlignment(SwingConstants.LEFT);
    // add(jSetSizeFiled);
    // jSetSizeLabel.setBounds(20, 275, 70, 23);

    jToolbarPanel.setLayout(new java.awt.BorderLayout());

    // jWorkflowToolBar.setRollover(true);
    // jWorkflowToolBar.setInheritsPopupMenu(true);
    // jTimelineToggleButton
    // .setIcon(new javax.swing.ImageIcon(
    // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    // /jTimelineToggleButton.setText("Show TimeLine");
    // jTimelineToggleButton.setFocusPainted(false);
    // jWorkflowToolBar.add(jTimelineToggleButton);

    jPatientCountToggleButton.setIcon(
            new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    jPatientCountToggleButton.setText("Get Patient Count");
    jPatientCountToggleButton.setFocusPainted(false);
    jWorkflowToolBar.add(jPatientCountToggleButton);

    // jPatientSetToggleButton
    // .setIcon(new javax.swing.ImageIcon(
    // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    // jPatientSetToggleButton.setText("Get Patient Set");
    // jPatientSetToggleButton.setFocusPainted(false);
    // jWorkflowToolBar.add(jPatientSetToggleButton);
    jWorkflowToolBar.setPreferredSize(new Dimension(380, 40));

    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.PAGE_START);
    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.CENTER);

    // add(jToolbarPanel);
    jToolbarPanel.setBounds(20, 130, 240, 23);

    jMorePanelsButton.setText("<html><center>Add<br>" + "<left>Group");
    jMorePanelsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMorePanelsButtonActionPerformed(evt);
        }
    });
    // add(jMorePanelsButton);
    // jMorePanelsButton.setBounds(655, 35, 60, 220);

    jPanel1.add(jMorePanelsButton);
    jMorePanelsButton.setBounds(550, 0, 60, 200);

    // jOptionsPanel.setLayout(null);
    // jOptionsScrollPane.setBorder(javax.swing.BorderFactory
    // .createEtchedBorder());

    // jOptionsPanel.setPreferredSize(new java.awt.Dimension(100, 100));
    jShowTimelineCheckBox.setText("Timeline");
    jShowTimelineCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jShowTimelineCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jShowTimelineCheckBox.setToolTipText("Get the patient set and display it in timeline view");
    // jOptionsPanel.add(jShowTimelineCheckBox);
    jShowTimelineCheckBox.setBounds(5, 20, 110, 15);

    // jGetPatientCountCheckBox.setText("Patient Count");
    // jGetPatientCountCheckBox.setBorder(javax.swing.BorderFactory
    // .createEmptyBorder(0, 0, 0, 0));
    // jGetPatientCountCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    // jGetPatientCountCheckBox.setToolTipText("Get the patient count XML");
    // jOptionsPanel.add(jGetPatientCountCheckBox);
    // jGetPatientCountCheckBox.setBounds(5, 50, 110, 15);

    // jGetPatientSetCheckBox.setText("Patient Set");
    // jGetPatientSetCheckBox.setBorder(javax.swing.BorderFactory
    // .createEmptyBorder(0, 0, 0, 0));
    // jGetPatientSetCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    // jOptionsPanel.add(jGetPatientSetCheckBox);
    // jGetPatientSetCheckBox.setBounds(10, 80, 80, 15);

    // jOptionsScrollPane.setViewportView(jOptionsPanel);

    add(jOptionsPanel);
    jOptionsPanel.setBounds(500, 30, 120, 190);

    /*
     * jDeleteButton.setText("Delete"); jDeleteButton.addActionListener(new
     * java.awt.event.ActionListener() { public void
     * actionPerformed(java.awt.event.ActionEvent evt) {
     * jDeleteButtonActionPerformed(evt); } });
     * 
     * jVisitComboBox.setModel(new javax.swing.DefaultComboBoxModel(new
     * String[] { "Groups don't have to occur in the same visit", "Groups
     * must all occur in the same visit" })); add(jVisitComboBox);
     * jVisitComboBox.setBounds(20, 40, 240, 22);
     * 
     * //add(jDeleteButton); //jDeleteButton.setBounds(20, 10, 65, 23);
     * 
     * add(jScrollPane1); jScrollPane1.setBounds(20, 70, 170, 320);
     * 
     * jRunQueryButton.setText("Run Query");
     * jRunQueryButton.addActionListener(new java.awt.event.ActionListener()
     * { public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRunQueryButtonActionPerformed(evt); } });
     * 
     * add(jRunQueryButton); jRunQueryButton.setBounds(20, 10, 87, 23);
     * 
     * jCancelButton.setText("Remove All");
     * jCancelButton.addActionListener(new java.awt.event.ActionListener() {
     * public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRemoveAllButtonActionPerformed(evt); } });
     * 
     * add(jCancelButton); jCancelButton.setBounds(115, 10, 90, 23);
     * 
     * //jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
     * ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
     * jPanel1.setLayout(null);
     * jScrollPane4.getHorizontalScrollBar().setUnitIncrement(20);
     * //jPanel1.setVisible(false);
     * 
     * //jScrollPane1.setToolTipText("scrollpane 1");
     * jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 170, 350);
     * 
     * jPanel1.add(jScrollPane2); jScrollPane2.setBounds(210, 0, 170, 350);
     */

    jAndOrLabel1.setBackground(new java.awt.Color(255, 255, 255));
    jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel1.setText("and");
    jAndOrLabel1.setToolTipText("Click to change the relationship");
    jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel1MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel1);

    jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel2.setText("and");
    jAndOrLabel2.setToolTipText("Click to change the relationship");
    jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel2MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel2);
    // jTree1.addTreeWillExpandListener(this);
    // jTree1.addTreeExpansionListener(this);
    // jScrollPane1.setViewportView(new QueryConceptTreePanel("Group 1"));
    // jScrollPane1.setToolTipText("Double click on a folder to view the
    // items inside");
    // jTree2.addTreeExpansionListener(this);
    // jScrollPane2.setViewportView(new QueryConceptTreePanel("Group 2"));
    // jTree3.addTreeExpansionListener(this);
    // treepanel = new QueryConceptTreePanel("", this);
    // jScrollPane3.setViewportView(new QueryConceptTreePanel("Group 3"));
    // jSlider1.setMajorTickSpacing(20);
    /*
     * jSlider1.setPaintTicks(true); jSlider1.setValue(0);
     * jSlider1.setMinorTickSpacing(10); jSlider1.setToolTipText("Slider on
     * left is more Sensitive Query, " + "on right is more Specific");
     * add(jSlider1); jSlider1.setBounds(380, 40, 140, 18);
     * 
     * //jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
     * jLabel1.setText("Sensitivity <"); add(jLabel1);
     * jLabel1.setBounds(290, 40, 80, 20);
     * 
     * //jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel2.setText("> Specificity"); add(jLabel2);
     * jLabel2.setBounds(525, 40, 70, 20);
     */

    dataModel.addPanel(jScrollPane1, null, 0);
    dataModel.addPanel(jScrollPane2, jAndOrLabel1, 0);
    dataModel.addPanel(jScrollPane3, jAndOrLabel2, 555);
}

From source file:edu.harvard.i2b2.query.ui.MainPanel.java

/**
 * This method is called from within the constructor to initialize the form.
 *//*ww  w .ja  v  a  2s  .com*/
private void initComponents() {
    jAnalysisLabel = new javax.swing.JLabel();
    jTimingLabel = new javax.swing.JLabel();
    jNameLabel = new javax.swing.JLabel();
    jSetSizeLabel = new javax.swing.JLabel();
    jNameTextField = new javax.swing.JTextField();
    jSetSizeFiled = new javax.swing.JLabel();
    jDeleteButton = new javax.swing.JButton();
    jScrollPane1 = new GroupPanel("Group 1", this);
    jRunQueryButton = new javax.swing.JButton();
    jCancelButton = new javax.swing.JButton();
    jClearGroupsButton = new javax.swing.JButton();
    jScrollPane2 = new GroupPanel("Group 2", this);
    jScrollPane3 = new GroupPanel("Group 3", this);
    jScrollPane4 = new javax.swing.JScrollPane();
    jPanel1 = new javax.swing.JPanel();
    // jVisitComboBox = new javax.swing.JComboBox();
    jAndOrLabel1 = new javax.swing.JLabel();
    jAndOrLabel2 = new javax.swing.JLabel();
    jMorePanelsButton = new javax.swing.JButton();
    jWorkflowToolBar = new javax.swing.JToolBar();
    // jTimelineToggleButton = new javax.swing.JToggleButton();
    jPatientCountToggleButton = new javax.swing.JToggleButton();
    // jPatientSetToggleButton = new javax.swing.JToggleButton();
    jToolbarPanel = new javax.swing.JPanel();
    jQueryNamePanel = new javax.swing.JPanel();

    // jOptionsScrollPane = new javax.swing.JScrollPane();
    jOptionsPanel = new AnalysisPanel();
    jTimingPanel = new TimingPanel(this.dataModel);
    jShowTimelineCheckBox = new javax.swing.JCheckBox();
    jGetAllPatientsCheckBox = new javax.swing.JCheckBox();
    // jGetPatientCountCheckBox = new javax.swing.JCheckBox();
    // jGetPatientSetCheckBox = new javax.swing.JCheckBox();

    setLayout(null);

    // jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
    // ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jPanel1.setLayout(null);

    jPanel1.add(jScrollPane1);
    jScrollPane1.setBounds(0, 0, 180, 200);

    jPanel1.add(jScrollPane2);
    jScrollPane2.setBounds(185, 0, 180, 200);

    jPanel1.add(jScrollPane3);
    jScrollPane3.setBounds(370, 0, 180, 200);

    // jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    jAndOrLabel1.setText("and");
    // jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel1);
    // jAndOrLabel1.setBounds(190, 90, 30, 18);

    // jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER)
    // ;
    // jAndOrLabel2.setText("and");
    // jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder())
    // ;
    // jPanel1.add(jAndOrLabel2);
    // jAndOrLabel2.setBounds(410, 90, 30, 18);

    jQueryNamePanel.setLayout(null);
    jQueryNamePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jNameLabel.setText(" Query Name: ");
    jNameLabel.setToolTipText("You may drag this item to workplace to save the query definition");
    jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jNameLabel.setBounds(2, 2, 70, 23);
    add(jNameLabel);
    // jQueryNamePanel.add(jNameLabel);
    jNameLabel.setTransferHandler(new NameLabelTextHandler());
    jNameLabel.addMouseListener(new DragMouseAdapter());
    jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseMoved(java.awt.event.MouseEvent evt) {
            jNameLabelMouseMoved(evt);
        }
    });
    jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseExited(java.awt.event.MouseEvent evt) {
            jNameLabelMouseExited(evt);
        }
    });

    jNameTextField.setText("");
    jNameTextField.setBounds(95, 10, 370, 20);
    jNameTextField.setEditable(false);
    jNameTextField.setDragEnabled(true);
    jNameTextField.setTransferHandler(new TransferHandler("Text"));
    // jQueryNamePanel.add(jNameTextField);
    // add(jNameTextField);
    // add(jQueryNamePanel);
    // jQueryNamePanel.setBounds(5, 5, 400, 50);

    jClearGroupsButton.setFont(new java.awt.Font("Tahoma", 1, 10));
    jClearGroupsButton.setText("X");
    jClearGroupsButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jClearGroupsButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
    jClearGroupsButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
    jClearGroupsButton.setToolTipText("Reset all panels");
    if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) {
        jClearGroupsButton.setMargin(new java.awt.Insets(-10, -15, -10, -20));
    }
    jClearGroupsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jClearGroupsButtonActionPerformed(evt);
        }
    });
    jClearGroupsButton.setBounds(600, 10, 30, 20);
    add(jClearGroupsButton);

    jAnalysisLabel.setText("Analysis Types");
    // jAnalysisLabel.setBackground(Color.WHITE);
    // jAnalysisLabel.setOpaque(true);
    jAnalysisLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jAnalysisLabel.setBounds(2, 2, 120, 23);
    jAnalysisLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAnalysisLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    add(jAnalysisLabel);

    jPanel1.setPreferredSize(new Dimension(700, 150));
    jScrollPane4.setViewportView(jPanel1);
    add(jScrollPane4);
    jScrollPane4.setBounds(20, 35, 635, 220);
    jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    // jScrollPane4.setBorder(javax.swing.BorderFactory
    // .createLineBorder(new java.awt.Color(0, 0, 0)));
    jCancelButton.setText("Cancel");
    jCancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCancelButtonActionPerformed(evt);
        }
    });
    // add(jCancelButton);
    // jCancelButton.setBounds(20, 255, 90, 23);
    // jCancelButton.setFont(new Font("Tahoma", Font.PLAIN, 10));

    jGetAllPatientsCheckBox.setText("Get Everyone");
    jGetAllPatientsCheckBox.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    // jGetAllPatientsCheckBox
    // .setBorder(new javax.swing.border.SoftBevelBorder(
    // javax.swing.border.BevelBorder.RAISED));
    jGetAllPatientsCheckBox.setBorderPainted(true);
    jGetAllPatientsCheckBox.setContentAreaFilled(false);
    jGetAllPatientsCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jGetAllPatientsCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    jGetAllPatientsCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jGetAllPatientsCheckBox.setToolTipText("Get all the patients in datamart");
    add(jGetAllPatientsCheckBox);
    jGetAllPatientsCheckBox.setBounds(5, 255, 110, 15);
    jGetAllPatientsCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jGetAllPatientsCheckBoxActionPerformed(evt);
        }
    });

    jRunQueryButton.setText("Run Query Above");
    jRunQueryButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRunQueryButtonActionPerformed(evt);
        }
    });
    add(jRunQueryButton);
    jRunQueryButton.setBounds(100, 255, 625, 23);

    jSetSizeLabel.setText(" Patient(s) returned:");
    add(jSetSizeLabel);
    jSetSizeLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jSetSizeLabel.setBounds(20, 275, 70, 23);

    // jSetSizeFiled.setText(" subjects");
    // jSetSizeFiled.setEditable(false);
    // jSetSizeFiled.setHorizontalAlignment(SwingConstants.LEFT);
    // add(jSetSizeFiled);
    // jSetSizeLabel.setBounds(20, 275, 70, 23);

    jToolbarPanel.setLayout(new java.awt.BorderLayout());

    // jWorkflowToolBar.setRollover(true);
    // jWorkflowToolBar.setInheritsPopupMenu(true);
    // jTimelineToggleButton
    // .setIcon(new javax.swing.ImageIcon(
    // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    // /jTimelineToggleButton.setText("Show TimeLine");
    // jTimelineToggleButton.setFocusPainted(false);
    // jWorkflowToolBar.add(jTimelineToggleButton);

    jPatientCountToggleButton.setIcon(
            new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    jPatientCountToggleButton.setText("Get Patient Count");
    jPatientCountToggleButton.setFocusPainted(false);
    jWorkflowToolBar.add(jPatientCountToggleButton);

    // jPatientSetToggleButton
    // .setIcon(new javax.swing.ImageIcon(
    // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif"));
    // jPatientSetToggleButton.setText("Get Patient Set");
    // jPatientSetToggleButton.setFocusPainted(false);
    // jWorkflowToolBar.add(jPatientSetToggleButton);
    jWorkflowToolBar.setPreferredSize(new Dimension(380, 40));

    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.PAGE_START);
    jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.CENTER);

    // add(jToolbarPanel);
    jToolbarPanel.setBounds(20, 130, 240, 23);

    jMorePanelsButton.setText("<html><center>Add<br>" + "<left>Group");
    jMorePanelsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMorePanelsButtonActionPerformed(evt);
        }
    });
    // add(jMorePanelsButton);
    // jMorePanelsButton.setBounds(655, 35, 60, 220);

    jPanel1.add(jMorePanelsButton);
    jMorePanelsButton.setBounds(550, 0, 60, 200);

    // jOptionsPanel.setLayout(null);
    // jOptionsScrollPane.setBorder(javax.swing.BorderFactory
    // .createEtchedBorder());

    // jOptionsPanel.setPreferredSize(new java.awt.Dimension(100, 100));
    jShowTimelineCheckBox.setText("Timeline");
    jShowTimelineCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jShowTimelineCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jShowTimelineCheckBox.setToolTipText("Get the patient set and display it in timeline view");
    // jOptionsPanel.add(jShowTimelineCheckBox);
    jShowTimelineCheckBox.setBounds(5, 20, 110, 15);

    // jGetPatientCountCheckBox.setText("Patient Count");
    // jGetPatientCountCheckBox.setBorder(javax.swing.BorderFactory
    // .createEmptyBorder(0, 0, 0, 0));
    // jGetPatientCountCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    // jGetPatientCountCheckBox.setToolTipText("Get the patient count XML");
    // jOptionsPanel.add(jGetPatientCountCheckBox);
    // jGetPatientCountCheckBox.setBounds(5, 50, 110, 15);

    // jGetPatientSetCheckBox.setText("Patient Set");
    // jGetPatientSetCheckBox.setBorder(javax.swing.BorderFactory
    // .createEmptyBorder(0, 0, 0, 0));
    // jGetPatientSetCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
    // jOptionsPanel.add(jGetPatientSetCheckBox);
    // jGetPatientSetCheckBox.setBounds(10, 80, 80, 15);

    // jOptionsScrollPane.setViewportView(jOptionsPanel);

    add(jOptionsPanel);
    jOptionsPanel.setBounds(500, 30, 120, 120);

    jTimingLabel.setText("Query Timing");
    // jAnalysisLabel.setBackground(Color.WHITE);
    // jAnalysisLabel.setOpaque(true);
    jTimingLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jTimingLabel.setBounds(2, 2, 120, 23);
    jTimingLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jTimingLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    add(jTimingLabel);
    jTimingLabel.setBounds(500, 30, 120, 120);

    add(jTimingPanel);
    jTimingPanel.setBounds(500, 122, 120, 70);

    /*
     * jDeleteButton.setText("Delete"); jDeleteButton.addActionListener(new
     * java.awt.event.ActionListener() { public void
     * actionPerformed(java.awt.event.ActionEvent evt) {
     * jDeleteButtonActionPerformed(evt); } });
     * 
     * jVisitComboBox.setModel(new javax.swing.DefaultComboBoxModel(new
     * String[] { "Groups don't have to occur in the same visit", "Groups
     * must all occur in the same visit" })); add(jVisitComboBox);
     * jVisitComboBox.setBounds(20, 40, 240, 22);
     * 
     * //add(jDeleteButton); //jDeleteButton.setBounds(20, 10, 65, 23);
     * 
     * add(jScrollPane1); jScrollPane1.setBounds(20, 70, 170, 320);
     * 
     * jRunQueryButton.setText("Run Query");
     * jRunQueryButton.addActionListener(new java.awt.event.ActionListener()
     * { public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRunQueryButtonActionPerformed(evt); } });
     * 
     * add(jRunQueryButton); jRunQueryButton.setBounds(20, 10, 87, 23);
     * 
     * jCancelButton.setText("Remove All");
     * jCancelButton.addActionListener(new java.awt.event.ActionListener() {
     * public void actionPerformed(java.awt.event.ActionEvent evt) {
     * jRemoveAllButtonActionPerformed(evt); } });
     * 
     * add(jCancelButton); jCancelButton.setBounds(115, 10, 90, 23);
     * 
     * //jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.
     * ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
     * jPanel1.setLayout(null);
     * jScrollPane4.getHorizontalScrollBar().setUnitIncrement(20);
     * //jPanel1.setVisible(false);
     * 
     * //jScrollPane1.setToolTipText("scrollpane 1");
     * jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 170, 350);
     * 
     * jPanel1.add(jScrollPane2); jScrollPane2.setBounds(210, 0, 170, 350);
     */

    jAndOrLabel1.setBackground(new java.awt.Color(255, 255, 255));
    jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel1.setText("and");
    jAndOrLabel1.setToolTipText("Click to change the relationship");
    jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel1MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel1);

    jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jAndOrLabel2.setText("and");
    jAndOrLabel2.setToolTipText("Click to change the relationship");
    jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jAndOrLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
        @Override
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jAndOrLabel2MouseClicked(evt);
        }
    });

    // jPanel1.add(jAndOrLabel2);
    // jTree1.addTreeWillExpandListener(this);
    // jTree1.addTreeExpansionListener(this);
    // jScrollPane1.setViewportView(new QueryConceptTreePanel("Group 1"));
    // jScrollPane1.setToolTipText("Double click on a folder to view the
    // items inside");
    // jTree2.addTreeExpansionListener(this);
    // jScrollPane2.setViewportView(new QueryConceptTreePanel("Group 2"));
    // jTree3.addTreeExpansionListener(this);
    // treepanel = new QueryConceptTreePanel("", this);
    // jScrollPane3.setViewportView(new QueryConceptTreePanel("Group 3"));
    // jSlider1.setMajorTickSpacing(20);
    /*
     * jSlider1.setPaintTicks(true); jSlider1.setValue(0);
     * jSlider1.setMinorTickSpacing(10); jSlider1.setToolTipText("Slider on
     * left is more Sensitive Query, " + "on right is more Specific");
     * add(jSlider1); jSlider1.setBounds(380, 40, 140, 18);
     * 
     * //jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
     * jLabel1.setText("Sensitivity <"); add(jLabel1);
     * jLabel1.setBounds(290, 40, 80, 20);
     * 
     * //jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11));
     * jLabel2.setText("> Specificity"); add(jLabel2);
     * jLabel2.setBounds(525, 40, 70, 20);
     */

    dataModel.addPanel(jScrollPane1, null, 0);
    dataModel.addPanel(jScrollPane2, jAndOrLabel1, 0);
    dataModel.addPanel(jScrollPane3, jAndOrLabel2, 555);
}