import jalview.io.gff.SequenceOntologyFactory;
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemeProperty;
-import jalview.util.BrowserLauncher;
import jalview.util.ChannelProperties;
import jalview.util.HttpUtils;
import jalview.util.MessageManager;
}.start();
}
- // set default browser
- String defaultBrowser = Cache.getProperty("DEFAULT_BROWSER");
- if (defaultBrowser != null)
- {
- System.setProperty(BrowserLauncher.getBrowserSystemProperty(),
- defaultBrowser);
- BrowserLauncher.resetBrowser();
- } // don't clearProperty if DEFAULT_BROWSER is null, might be set by user
-
String file = null, data = null;
FileFormatI format = null;
DataSourceType protocol = null;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.help.HelpSetException;
import javax.swing.JComboBox;
-import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.ListSelectionModel;
import jalview.urls.api.UrlProviderFactoryI;
import jalview.urls.api.UrlProviderI;
import jalview.urls.desktop.DesktopUrlProviderFactory;
-import jalview.util.BrowserLauncher;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.util.UrlConstants;
setCustomProxyEnabled();
applyProxyButtonEnabled(false);
- String browserPref = Cache.getDefault("DEFAULT_BROWSER", "");
- if (browserPref != null)
- {
- defaultBrowser.getModel().setSelectedItem(browserPref);
- }
-
usagestats.setSelected(Cache.getDefault("USAGESTATS", false));
// note antisense here: default is true
questionnaire
*/
// Proxy settings set first (to catch web services)
- Cache.setOrRemove("DEFAULT_BROWSER",
- (String) defaultBrowser.getSelectedItem());
- BrowserLauncher.resetBrowser(true);
-
// save user-defined and selected links
String menuLinks = sequenceUrlLinks.writeUrlsAsString(true);
if (menuLinks.isEmpty())
((UrlLinkTableModel) linkUrlTable.getModel()).removeRow(modelIndex);
}
- @Override
- public void defaultBrowser_mouseClicked(MouseEvent e)
- {
- // TODO: JAL-3048 not needed for j2s
- if (!Platform.isJS()) // BH 2019
- /**
- * Java only
- *
- * @j2sIgnore
- */
- {
- JFileChooser chooser = new JFileChooser(".");
- chooser.setDialogTitle(
- MessageManager.getString("label.select_default_browser"));
-
- int value = chooser.showOpenDialog(this);
-
- if (value == JFileChooser.APPROVE_OPTION)
- {
- defaultBrowser.getModel().setSelectedItem(
- chooser.getSelectedFile().getAbsolutePath());
- }
- }
- }
-
/*
* (non-Javadoc)
*
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,
}
- public void defaultBrowser_mouseClicked(MouseEvent e)
- {
-
- }
-
public void linkURLList_keyTyped(KeyEvent e)
{