label.select_eps_character_rendering_style = Select EPS character rendering style
label.invert_selection = Invert Selection
label.optimise_order = Optimise Order
-label.seq_sort_by_score = Seq sort by Score
+label.seq_sort_by_score = Sequence sort by Score
label.load_colours = Load Colours
label.save_colours = Save Colours
label.fetch_das_features = Fetch DAS Features
label.rest_client_submit = {0} using {1}
label.fetch_retrieve_from =Retrieve from {0}</html>
label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}<br>First is :{2}<html>
-label.feature_settings_click_drag = <html>Click/drag feature types up or down to change render order.<br/>Double click to select columns containing feature in alignment/current selection<br/>Pressing Alt will select columns outside features rather than inside<br/>Pressing Shift to modify current selection (rather than clear current selection)<br/>Press CTRL or Command/Meta to toggle columns in/outside features<br/></html>
+#label.feature_settings_click_drag = <html>Click/drag feature types up or down to change render order.<br/>Double click to select columns containing feature in alignment/current selection<br/>Pressing Alt will select columns outside features rather than inside<br/>Pressing Shift to modify current selection (rather than clear current selection)<br/>Press CTRL or Command/Meta to toggle columns in/outside features<br/></html>
+label.feature_settings_click_drag = Drag up or down to change render order.<br/>Double click to select columns containing feature.
+label.transparency_tip = Adjust transparency to 'see through' feature colours.
label.opt_and_params_further_details = see further details by right-clicking
label.opt_and_params_show_brief_desc_image_link = <html>Click to show brief description<br><img src="{0}"/> Right click for further information.</html>
label.opt_and_params_show_brief_desc = <html>Click to show brief description<br></html>
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.gui.Help.HelpId;
import jalview.io.JalviewFileChooser;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.GraduatedColor;
import java.util.List;
import java.util.Vector;
+import javax.help.HelpSetException;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
import javax.swing.Icon;
ex.printStackTrace();
}
- table = new JTable();
+ table = new JTable() {
+ @Override
+ public String getToolTipText(MouseEvent e) {
+ if (table.columnAtPoint(e.getPoint()) == 0) {
+ /*
+ * Tooltip for feature name only
+ */
+ return JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.feature_settings_click_drag"));
+ }
+ return null;
+ }
+ };
table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
table.setFont(new Font("Verdana", Font.PLAIN, 12));
table.setDefaultRenderer(Color.class, new ColorRenderer());
}
}
});
- table.setToolTipText(JvSwingUtils
- .wrapTooltip(true, MessageManager.getString("label.feature_settings_click_drag")));
+// table.setToolTipText(JvSwingUtils.wrapTooltip(true,
+// MessageManager.getString("label.feature_settings_click_drag")));
scrollPane.setViewportView(table);
dassourceBrowser = new DasSourceBrowser(this);
|| ((Boolean) fr.featureGroups.get(group)).booleanValue())
{
if (group != null)
+ {
checkGroupState(group);
+ }
type = tmpfeatures[index].getType();
if (!visibleChecks.contains(type))
{
if (fr.renderOrder != null)
{
if (!handlingUpdate)
+ {
fr.findAllFeatures(groupChanged != null); // prod to update
+ }
// colourschemes. but don't
// affect display
// First add the checks in the previous render order,
{
order[i] = fr.getOrder(data[i][0].toString());
if (order[i] < 0)
+ {
order[i] = fr.setOrder(data[i][0].toString(), i / order.length);
+ }
if (i > 1)
+ {
sort = sort || order[i - 1] > order[i];
+ }
}
if (sort)
+ {
jalview.util.QuickSort.sort(order, data);
+ }
}
void load()
public void orderByAvWidth()
{
if (table == null || table.getModel() == null)
+ {
return;
+ }
Object[][] data = ((FeatureTableModel) table.getModel()).getData();
float[] width = new float[data.length];
float[] awidth;
width[i] = 0;
}
if (max < width[i])
+ {
max = width[i];
+ }
}
boolean sort = false;
for (int i = 0; i < width.length; i++)
fr.setOrder(data[i][0].toString(), width[i]); // store for later
}
if (i > 0)
+ {
sort = sort || width[i - 1] > width[i];
+ }
}
if (sort)
+ {
jalview.util.QuickSort.sort(width, data);
// update global priority order
+ }
updateFeatureRenderer(data, false);
table.repaint();
JButton sortByDens = new JButton();
- JPanel transbuttons = new JPanel(new GridLayout(4, 1));
+ JButton help = new JButton();
+
+ JPanel transbuttons = new JPanel(new GridLayout(5, 1));
private void jbInit() throws Exception
{
sortByDens(null);
}
});
+ help.setFont(JvSwingUtils.getLabelFont());
+ help.setText(MessageManager.getString("action.help"));
+ help.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ try
+ {
+ Help.showHelpWindow(HelpId.SequenceFeatureSettings);
+ } catch (HelpSetException e1)
+ {
+ e1.printStackTrace();
+ }
+ }
+ });
cancel.setFont(JvSwingUtils.getLabelFont());
cancel.setText(MessageManager.getString("action.cancel"));
cancel.addActionListener(new ActionListener()
});
transparency.setMaximum(70);
+ transparency.setToolTipText(MessageManager
+ .getString("label.transparency_tip"));
fetchDAS.setText(MessageManager.getString("label.fetch_das_features"));
fetchDAS.addActionListener(new ActionListener()
{
transbuttons.add(invert);
transbuttons.add(sortByScore);
transbuttons.add(sortByDens);
+ transbuttons.add(help);
+ JPanel sliderPanel = new JPanel();
+ sliderPanel.add(transparency);
transPanel.add(transparency);
transPanel.add(transbuttons);
buttonPanel.add(ok);
import java.net.URL;
+import javax.help.BadIDException;
import javax.help.HelpBroker;
import javax.help.HelpSet;
import javax.help.HelpSetException;
*/
public class Help
{
+ public enum HelpId
+ {
+ Home("home"), SequenceFeatureSettings("seqfeatures.settings");
+
+ private String id;
+
+ private HelpId(String loc)
+ {
+ this.id = loc;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.id;
+ }
+ }
private static final long HALF_A_MO = 500; // half a second
*
* This is a workaround for issue JAL-914 - both Desktop and AlignFrame
* responding to F1 key, resulting in duplicate help windows opened.
+ * @param id TODO
*
* @throws HelpSetException
*/
- public static void showHelpWindow() throws HelpSetException
+ public static void showHelpWindow(HelpId id) throws HelpSetException
{
long timeNow = System.currentTimeMillis();
HelpSet hs = new HelpSet(cl, url);
HelpBroker hb = hs.createHelpBroker();
- hb.setCurrentID("home");
+ try
+ {
+ hb.setCurrentID(id.toString());
+ } catch (BadIDException bad)
+ {
+ System.out.println("Bad help link: " + id.toString()
+ + ": must match a target in help.jhm");
+ throw bad;
+ }
hb.setDisplayed(true);
}
}
+
+ public static void showHelpWindow() throws HelpSetException
+ {
+ showHelpWindow(HelpId.Home);
+ }
}