epsRendering.addItem("Text");
epsRendering.setSelectedItem(Cache.getDefault("EPS_RENDERING",
"Prompt each time"));
-
+ autoIdWidth.setSelected(Cache.getDefault("FIGURE_AUTOIDWIDTH", false));
+ userIdWidth.setEnabled(!autoIdWidth.isSelected());
+ userIdWidthlabel.setEnabled(!autoIdWidth.isSelected());
+ Integer wi = Cache.getIntegerProperty("FIGURE_USERIDWIDTH");
+ userIdWidth.setText(wi == null ? "" : wi.toString());
blcjv.setSelected(Cache.getDefault("BLC_JVSUFFIX", true));
clustaljv.setSelected(Cache.getDefault("CLUSTAL_JVSUFFIX", true));
fastajv.setSelected(Cache.getDefault("FASTA_JVSUFFIX", true));
Boolean.toString(modellerOutput.isSelected()));
jalview.io.PIRFile.useModellerOutput = modellerOutput.isSelected();
+ Cache.applicationProperties.setProperty("FIGURE_AUTOIDWIDTH",
+ Boolean.toString(autoIdWidth.isSelected()));
+ userIdWidth_actionPerformed();
+ Cache.applicationProperties.setProperty("FIGURE_USERIDWIDTH",
+ userIdWidth.getText());
+
Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",
Boolean.toString(autoCalculateConsCheck.isSelected()));
Cache.applicationProperties.setProperty("SORT_BY_TREE",
maxColour.repaint();
}
+ @Override
+ protected void userIdWidth_actionPerformed()
+ {
+ try
+ {
+ String val = userIdWidth.getText().trim();
+ if (val.length() > 0)
+ {
+ Integer iw = Integer.parseInt(val);
+ if (iw.intValue() < 12)
+ {
+ throw new NumberFormatException();
+ }
+ userIdWidth.setText(iw.toString());
+ }
+ } catch (NumberFormatException x)
+ {
+ JOptionPane
+ .showInternalMessageDialog(
+ Desktop.desktop,
+ "The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide.",
+ "Invalid ID Column width",
+ JOptionPane.WARNING_MESSAGE);
+ userIdWidth.setText("");
+ }
+ }
+
+ @Override
+ protected void autoIdWidth_actionPerformed()
+ {
+ userIdWidth.setEnabled(!autoIdWidth.isSelected());
+ userIdWidthlabel.setEnabled(!autoIdWidth.isSelected());
+ }
+
}
JLabel epsLabel = new JLabel();
protected JComboBox epsRendering = new JComboBox();
+
+ protected JLabel userIdWidthlabel = new JLabel();
+ protected JCheckBox autoIdWidth = new JCheckBox();
+ protected JTextField userIdWidth = new JTextField();
+
JLabel jLabel1 = new JLabel();
sortByTree.setText("Sort With New Tree");
sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
+
+ autoIdWidth.setFont(JvSwingUtils.getLabelFont());
+ autoIdWidth.setText("Autofit Figure ID width");
+ autoIdWidth.setBounds(new Rectangle(228, 96,188,23));
+ autoIdWidth.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ autoIdWidth_actionPerformed();
+ }
+ });
+ userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
+ userIdWidthlabel.setText("Figure ID column width");
+ userIdWidthlabel.setBounds(new Rectangle(236, 120,168,23));
+ userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
+ userIdWidth.setText("");
+ userIdWidth.setBounds(new Rectangle(232,144,84,23));
+ userIdWidth.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ userIdWidth_actionPerformed();
+ }
+ });
modellerOutput.setFont(JvSwingUtils.getLabelFont());
modellerOutput.setText("Use Modeller Output");
modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
+
dasPanel.setLayout(borderLayout4);
wsPanel.setLayout(borderLayout5);
wrap.setFont(JvSwingUtils.getLabelFont());
jPanel11.add(pfamjv);
jPanel11.add(pileupjv);
jPanel11.add(pirjv);
+ exportTab.add(autoIdWidth);
+ exportTab.add(userIdWidth);
+ exportTab.add(userIdWidthlabel);
exportTab.add(modellerOutput);
tabbedPane.add(calcTab, "Editing");
calcTab.add(autoCalculateConsCheck);
exportTab.add(jPanel11);
}
+ protected void autoIdWidth_actionPerformed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void userIdWidth_actionPerformed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void maxColour_actionPerformed()
{
// TODO Auto-generated method stub