CheckboxMenuItem showColourText = new CheckboxMenuItem();
+ CheckboxMenuItem displayNonconserved = new CheckboxMenuItem();
+
Menu editMenu = new Menu("Edit");
MenuItem copy = new MenuItem("Copy (Jalview Only)");
showText.setState(sg.getDisplayText());
showColourText.setState(sg.getColourText());
showBoxes.setState(sg.getDisplayBoxes());
+ displayNonconserved.setState(sg.getShowunconserved());
if (!ap.av.alignment.getGroups().contains(sg))
{
groupMenu.remove(unGroupMenuItem);
}
// addshowLink(linkMenu, target, url_pref + id + url_suff);
}
- // TODO: introduce applet parameter option to dis/en/able URl generation from description
- // hard-disable the construction of URLs from regexes that match the description
-// if (descr != null)
-// {
-// // create link for this URL from description where regex matches
-// String[] urls = urlLink.makeUrls(descr, false);
-// if (urls != null)
-// {
-// for (int u = 0; u < urls.length; u += 2)
-// {
-// addshowLink(linkMenu, label, urls[u + 1]);
-// }
-// }
-// // addshowLink(linkMenu, target, url_pref + id + url_suff);
-// }
+ // Now construct URLs from description but only try to do it for regex URL links
+ if (descr != null && urlLink.getRegexReplace()!=null)
+ {
+ // create link for this URL from description only if regex matches
+ String[] urls = urlLink.makeUrls(descr, true);
+ if (urls != null)
+ {
+ for (int u = 0; u < urls.length; u += 2)
+ {
+ addshowLink(linkMenu, label, urls[u + 1]);
+ }
+ }
+ }
}
else
{
{
showBoxes_itemStateChanged();
}
+ else if (evt.getSource() == displayNonconserved)
+ {
+ this.showNonconserved_itemStateChanged();
+ }
}
public void actionPerformed(ActionEvent evt)
showBoxes.setState(true);
showBoxes.addItemListener(this);
sequenceName.addActionListener(this);
-
+ displayNonconserved.setLabel("Show Nonconserved");
+ displayNonconserved.setState(false);
+ displayNonconserved.addItemListener(this);
showText.setLabel("Text");
showText.addItemListener(this);
showColourText.setLabel("Colour Text");
menu1.add(showBoxes);
menu1.add(showText);
menu1.add(showColourText);
+ menu1.add(displayNonconserved);
toggleCase.addActionListener(this);
pdb.addActionListener(this);
hideSeqs.addActionListener(this);
refresh();
}
+ public void showNonconserved_itemStateChanged()
+ {
+ getGroup().setShowunconserved(this.displayNonconserved.getState());
+ refresh();
+ }
+
public void showBoxes_itemStateChanged()
{
getGroup().setDisplayBoxes(showBoxes.getState());