setMinimumSize(new Dimension(200, 32));
// setPreferredSize(new Dimension(800, 32));
JideBoxLayout layout = new JideBoxLayout(this, JideBoxLayout.X_AXIS);
setLayout(layout);
// This controls the vertical height of the command bar
locationPanel = new javax.swing.JPanel();
locationPanel.setBorder(new LineBorder(Color.lightGray, 1, true));
// BorderFactory.createMatteBorder(2, 2, 2, 2, Color.lightGray));
// new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
locationPanel.setPreferredSize(new java.awt.Dimension(150, 20));
locationPanel.setLayout(new JideBoxLayout(locationPanel, JideBoxLayout.X_AXIS));
locationPanel.setAlignmentY(CENTER_ALIGNMENT);
locationPanel.add(Box.createRigidArea(new Dimension(10, 36)), JideBoxLayout.FIX);
genomeComboBox = new JComboBox();
genomeComboBox.setMinimumSize(new Dimension(180, 27));
genomeComboBox.setPreferredSize(new Dimension(180, 27));
genomeComboBox.addPopupMenuListener(new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
try {
adjustPopupWidth(genomeComboBox);
} catch (Exception e1) {
log.warn(e1.getMessage(), e1);
}
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
//TODO
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
//TODO
}
});
locationPanel.add(genomeComboBox, JideBoxLayout.FIX);
locationPanel.add(Box.createHorizontalStrut(5), JideBoxLayout.FIX);
chromosomeComboBox = new javax.swing.JComboBox();
chromosomeComboBox.setToolTipText("Select a chromosome to view");
chromosomeComboBox.setMaximumSize(new java.awt.Dimension(DEFAULT_CHROMOSOME_DROPDOWN_WIDTH, 30));
chromosomeComboBox.setMinimumSize(new java.awt.Dimension(DEFAULT_CHROMOSOME_DROPDOWN_WIDTH, 30));
chromosomeComboBox.setPreferredSize(new java.awt.Dimension(DEFAULT_CHROMOSOME_DROPDOWN_WIDTH, 30));
chromosomeComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chromosomeComboBoxActionPerformed(evt);
}
});
locationPanel.add(chromosomeComboBox, JideBoxLayout.FIX);
locationPanel.add(Box.createHorizontalStrut(5), JideBoxLayout.FIX);
searchTextField = new JTextField();
searchTextField.setToolTipText("Enter a gene of locus, e.f. EGFR, chr1, or chr1:100,000-200,000");
searchTextField.setMaximumSize(new java.awt.Dimension(250, 15));
searchTextField.setMinimumSize(new java.awt.Dimension(100, 28));
searchTextField.setPreferredSize(new java.awt.Dimension(230, 28));
searchTextField.setAlignmentY(CENTER_ALIGNMENT);
locationPanel.add(searchTextField, JideBoxLayout.FIX);
goButton = new JideButton("Go");
// goButton.setButtonStyle(ButtonStyle.TOOLBOX_STYLE);
// goButton.setPreferredSize(new java.awt.Dimension(30, 30));
// goButton.setMaximumSize(new java.awt.Dimension(30, 30));
// goButton.setMinimumSize(new java.awt.Dimension(30, 30));
// goButton.setText("Go");
goButton.setToolTipText("Jump to gene or locus");
goButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
goButtonActionPerformed(evt);
}
});
locationPanel.add(goButton, JideBoxLayout.FIX);
add(locationPanel, JideBoxLayout.FIX);
add(Box.createHorizontalStrut(10), JideBoxLayout.FIX);
toolPanel = new javax.swing.JPanel();
toolPanel.setAlignmentX(RIGHT_ALIGNMENT);
toolPanel.setLayout(new JideBoxLayout(toolPanel, JideBoxLayout.X_AXIS));
//final Border toolButtonBorder = BorderFactory.createLineBorder(Color.gray, 1);
homeButton = new com.jidesoft.swing.JideButton();
homeButton.setAlignmentX(RIGHT_ALIGNMENT);
//homeButton.setButtonStyle(JideButton.TOOLBOX_STYLE);