import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Arrays;
+import java.util.EnumSet;
import java.util.List;
import javax.swing.AbstractCellEditor;
protected JPasswordField proxyAuthPasswordPB = new JPasswordField();
- protected JComboBox defaultBrowser = new JComboBox<String>();
-
protected ButtonGroup proxyType = new ButtonGroup();
protected JRadioButton noProxy = new JRadioButton();
connectTab = new JPanel();
connectTab.setLayout(new GridBagLayout());
- // Label for browser text box
- JLabel browserLabel = new JLabel();
- browserLabel.setFont(LABEL_FONT);
- browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
- browserLabel.setText(
- MessageManager.getString("label.default_browser_unix_windows"));
- defaultBrowser.setFont(LABEL_FONT);
- final String tooltip = JvSwingUtils.wrapTooltip(true,
- MessageManager.getString("label.double_click_to_browse"));
- defaultBrowser.setToolTipText(tooltip);
- /*
- defaultBrowser.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent e)
- {
- if (e.getClickCount() > 1)
- {
- defaultBrowser_mouseClicked(e);
- }
- }
- });
- */
-
JPanel proxyPanel = initConnTabProxyPanel();
initConnTabCheckboxes();
- /* removing default browser preference and using Desktop.browse()
- // Add default Browser text box
- connectTab.add(browserLabel,
- new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
- GridBagConstraints.WEST, GridBagConstraints.NONE,
- new Insets(10, 0, 5, 5), 5, 1));
- defaultBrowser.setFont(LABEL_FONT);
-
- ComboBoxModel<String> cbModel = new DefaultComboBoxModel(
- BrowserLauncher.getInstance().getBrowserList().toArray());
- String browserPref = Cache.getProperty("DEFAULT_BROWSER");
- if (browserPref != null)
- {
- cbModel.setSelectedItem(browserPref);
- }
- defaultBrowser.setModel(cbModel);
-
- connectTab.add(defaultBrowser, new GridBagConstraints(1, 0, 1, 1, 1.0,
- 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
- new Insets(10, 0, 5, 10), 30, 1));
- */
-
// Add proxy server panel
connectTab.add(proxyPanel, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
*/
structViewer.setFont(LABEL_FONT);
structViewer.setBounds(new Rectangle(190, ypos, 120, height));
+ for (ViewerType v : EnumSet.allOf(ViewerType.class))
+ {
+ structViewer.addItem(v.name());
+ }
+ /*
structViewer.addItem(ViewerType.JMOL.name());
structViewer.addItem(ViewerType.CHIMERA.name());
structViewer.addItem(ViewerType.CHIMERAX.name());
structViewer.addItem(ViewerType.PYMOL.name());
+ */
structViewer.addActionListener(new ActionListener()
{
@Override
}
- public void defaultBrowser_mouseClicked(MouseEvent e)
- {
-
- }
-
public void linkURLList_keyTyped(KeyEvent e)
{