import jalview.gui.JvSwingUtils;
import jalview.gui.StructureViewer.ViewerType;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.awt.BorderLayout;
import java.awt.Color;
*/
protected JComboBox<Object> epsRendering = new JComboBox<>();
+ protected JComboBox<Object> htmlRendering = new JComboBox<>();
+
+ protected JComboBox<Object> svgRendering = new JComboBox<>();
+
protected JLabel userIdWidthlabel = new JLabel();
protected JCheckBox autoIdWidth = new JCheckBox();
protected JCheckBox sortByTree = new JCheckBox();
- /*
- * DAS Settings tab
- */
- protected JPanel dasTab = new JPanel();
/*
* Web Services tab
*/
private void jbInit() throws Exception
{
- final JTabbedPane tabbedPane = new JTabbedPane();
+ final JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane();
this.setLayout(new BorderLayout());
JPanel okCancelPanel = initOkCancelPanel();
this.add(tabbedPane, BorderLayout.CENTER);
MessageManager.getString("label.editing"));
/*
- * See DasSourceBrowser for the real work of configuring this tab.
- */
- dasTab.setLayout(new BorderLayout());
- tabbedPane.add(dasTab, MessageManager.getString("label.das_settings"));
-
- /*
* See WsPreferences for the real work of configuring this tab.
*/
- wsTab.setLayout(new BorderLayout());
- tabbedPane.add(wsTab, MessageManager.getString("label.web_services"));
+ if (!Platform.isJS())
+ {
+ wsTab.setLayout(new BorderLayout());
+ tabbedPane.add(wsTab, MessageManager.getString("label.web_services"));
+ }
/*
* Handler to validate a tab before leaving it - currently only for
}
/**
- * Initialises the Output tabbed panel.
+ * Initialises the Output tab
*
* @return
*/
{
JPanel outputTab = new JPanel();
outputTab.setLayout(null);
- JLabel epsLabel = new JLabel();
+
+ JLabel epsLabel = new JLabel(
+ MessageManager.formatMessage("label.rendering_style", "EPS"));
epsLabel.setFont(LABEL_FONT);
epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
- epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
- epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
+ epsLabel.setBounds(new Rectangle(9, 31, 160, 24));
epsRendering.setFont(LABEL_FONT);
- epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
+ epsRendering.setBounds(new Rectangle(174, 34, 187, 21));
+ JLabel htmlLabel = new JLabel(
+ MessageManager.formatMessage("label.rendering_style", "HTML"));
+ htmlLabel.setFont(LABEL_FONT);
+ htmlLabel.setHorizontalAlignment(SwingConstants.RIGHT);
+ htmlLabel.setBounds(new Rectangle(9, 55, 160, 24));
+ htmlRendering.setFont(LABEL_FONT);
+ htmlRendering.setBounds(new Rectangle(174, 58, 187, 21));
+ JLabel svgLabel = new JLabel(
+ MessageManager.formatMessage("label.rendering_style", "SVG"));
+ svgLabel.setFont(LABEL_FONT);
+ svgLabel.setHorizontalAlignment(SwingConstants.RIGHT);
+ svgLabel.setBounds(new Rectangle(9, 79, 160, 24));
+ svgRendering.setFont(LABEL_FONT);
+ svgRendering.setBounds(new Rectangle(174, 82, 187, 21));
+
JLabel jLabel1 = new JLabel();
jLabel1.setFont(LABEL_FONT);
jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
jLabel1.setText(MessageManager.getString("label.append_start_end"));
jLabel1.setFont(LABEL_FONT);
+
fastajv.setFont(LABEL_FONT);
fastajv.setHorizontalAlignment(SwingConstants.LEFT);
clustaljv.setText(MessageManager.getString("label.clustal") + " ");
TitledBorder titledBorder2 = new TitledBorder(
MessageManager.getString("label.file_output"));
jPanel11.setBorder(titledBorder2);
- jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
+ jPanel11.setBounds(new Rectangle(30, 120, 196, 182));
GridLayout gridLayout3 = new GridLayout();
jPanel11.setLayout(gridLayout3);
gridLayout3.setRows(8);
MessageManager.getString("label.automatically_set_id_width"));
autoIdWidth.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager
.getString("label.adjusts_width_generated_eps_png")));
- autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
+ autoIdWidth.setBounds(new Rectangle(228, 144, 320, 23));
autoIdWidth.addActionListener(new ActionListener()
{
userIdWidthlabel.setToolTipText(
JvSwingUtils.wrapTooltip(true, MessageManager.getString(
"label.manually_specify_width_left_column")));
- userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
+ userIdWidthlabel.setBounds(new Rectangle(236, 168, 320, 23));
userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
userIdWidth.setText("");
- userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
+ userIdWidth.setBounds(new Rectangle(232, 192, 84, 23));
userIdWidth.addActionListener(new ActionListener()
{
modellerOutput.setFont(LABEL_FONT);
modellerOutput
.setText(MessageManager.getString("label.use_modeller_output"));
- modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
+ modellerOutput.setBounds(new Rectangle(228, 274, 320, 23));
embbedBioJSON.setFont(LABEL_FONT);
embbedBioJSON.setText(MessageManager.getString("label.embbed_biojson"));
- embbedBioJSON.setBounds(new Rectangle(228, 200, 250, 23));
+ embbedBioJSON.setBounds(new Rectangle(228, 248, 250, 23));
jPanel11.add(jLabel1);
jPanel11.add(blcjv);
outputTab.add(userIdWidth);
outputTab.add(userIdWidthlabel);
outputTab.add(modellerOutput);
- outputTab.add(embbedBioJSON);
- outputTab.add(epsLabel);
- outputTab.add(epsRendering);
+ if (!Platform.isJS())
+ {
+ /*
+ * JalviewJS doesn't support Lineart option or SVG output
+ */
+ outputTab.add(embbedBioJSON);
+ outputTab.add(epsLabel);
+ outputTab.add(epsRendering);
+ outputTab.add(htmlLabel);
+ outputTab.add(htmlRendering);
+ outputTab.add(svgLabel);
+ outputTab.add(svgRendering);
+ }
outputTab.add(jPanel11);
return outputTab;
}
MessageManager.getString("label.default_browser_unix"));
defaultBrowser.setFont(LABEL_FONT);
defaultBrowser.setText("");
-
+ final String tooltip = JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.double_click_to_browse"));
+ defaultBrowser.setToolTipText(tooltip);
defaultBrowser.addMouseListener(new MouseAdapter()
{
@Override
pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
pathLabel.setHorizontalAlignment(SwingConstants.LEFT);
pathLabel.setText(MessageManager.getString("label.chimera_path"));
- final String tooltip = JvSwingUtils.wrapTooltip(true,
- MessageManager.getString("label.chimera_path_tip"));
- pathLabel.setToolTipText(tooltip);
pathLabel.setBounds(new Rectangle(10, ypos, 140, height));
structureTab.add(pathLabel);
chimeraPath.setFont(LABEL_FONT);
chimeraPath.setText("");
+ final String tooltip = JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.chimera_path_tip"));
+ chimeraPath.setToolTipText(tooltip);
chimeraPath.setBounds(new Rectangle(160, ypos, 300, height));
chimeraPath.addMouseListener(new MouseAdapter()
{
docFieldPref.setBounds(new Rectangle(10, ypos, 450, 120));
structureTab.add(docFieldPref);
+ /*
+ * hide Chimera options in JalviewJS
+ */
+ if (Platform.isJS())
+ {
+ pathLabel.setVisible(false);
+ chimeraPath.setVisible(false);
+ viewerLabel.setVisible(false);
+ structViewer.setVisible(false);
+ }
+
return structureTab;
}
startupCheckbox.setSelected(true);
startupFileTextfield.setFont(LABEL_FONT);
startupFileTextfield.setBounds(new Rectangle(172, 310, 330, 20));
+ final String tooltip = JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.double_click_to_browse"));
+ startupFileTextfield.setToolTipText(tooltip);
startupFileTextfield.addMouseListener(new MouseAdapter()
{
@Override
visualTab.add(fontNameCB);
visualTab.add(fontSizeCB);
visualTab.add(fontStyleCB);
+
+ if (Platform.isJS())
+ {
+ startupCheckbox.setVisible(false);
+ startupFileTextfield.setVisible(false);
+ }
+
return visualTab;
}