AlignmentViewport viewport)
throws FileNotFoundException, IOException, RuntimeException
{
-
+ String treeTitle = treeUrl.getFile();
Phylogeny[] trees = AptxUtil.readPhylogeniesFromUrl(treeUrl,
VALIDATE_PHYLOXML_XSD,
REPLACE_NHX_UNDERSCORES, INTERNAL_NUMBERS_AS_CONFIDENCE,
TAXONOMY_EXTRACTION, MIDPOINT_REROOT);
MainFrame aptxApp = Archaeopteryx.createApplication(trees, APTX_CONFIG,
- null);
+ treeTitle);
for (Phylogeny tree : trees)
{
+
public static MainFrame createAptxFrame(
final Phylogeny[] aptxTrees)
{
}
+
}
* Resend the selection to the tree view when tabs get switched, this
* has to be buried in invokeLater as Forester first resets the tree
* view on switching tabs, without invokeLater this would get called
- * before Forester resets which would nullify the selection
+ * before Forester resets which would nullify the selection.
*/
public void run()
{
parentAvport.sendSelection();
+ // PaintRefresher.Refresh(treeView,
+ // parentAvport.getSequenceSetId());
}
});
{
treeSelectionChanged(matchingSequence);
parentAvport.sendSelection();
- PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId());
+ PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId()); // redundant?
}
}
}
}
parentAvport.sendSelection();
- PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId());
+ PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId()); // redundant?
}
/**
--- /dev/null
+package jalview.ext.forester.io;
+
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+
+import org.forester.archaeopteryx.webservices.PhylogeniesWebserviceClient;
+import org.forester.archaeopteryx.webservices.WebservicesManager;
+
+public class TreeDatabaseMenuBuilder
+{
+ final WebservicesManager webservicesManager;
+
+ JMenuItem[] treeDatabaseMenuItems;
+
+ public TreeDatabaseMenuBuilder()
+
+ {
+ webservicesManager = WebservicesManager
+ .getInstance();
+
+ }
+
+ public JMenu fillMenu(JMenu treeDbMenu) {
+ treeDatabaseMenuItems = new JMenuItem[webservicesManager
+ .getAvailablePhylogeniesWebserviceClients().size()];
+
+ for (int i = 0; i < treeDatabaseMenuItems.length; ++i)
+ {
+ final PhylogeniesWebserviceClient client = webservicesManager
+ .getAvailablePhylogeniesWebserviceClient(i);
+ treeDatabaseMenuItems[i] = new JMenuItem(
+ client.getMenuName());
+ treeDbMenu.add(treeDatabaseMenuItems[i]);
+
+ }
+ return treeDbMenu;
+
+ }
+
+}
}
@Override
- protected void loadTreeDbItem_actionPerformed(ActionEvent e)
- {
- chooseTreeDb();
- }
-
- @Override
protected void loadTreeBaseStudy_actionPerformed(ActionEvent e)
{
- // TODO Auto-generated method stub
+ chooseTreeDb();
}
@Override
protected void loadTreeOfLife_actionPerformed(ActionEvent e)
{
- // TODO Auto-generated method stub
+ chooseTreeDb();
}
@Override
protected void loadTreeFam_actionPerformed(ActionEvent e)
{
- // TODO Auto-generated method stub
+ chooseTreeDb();
}
@Override
protected void loadTreePfam_actionPerformed(ActionEvent e)
{
- // TODO Auto-generated method stub
+ chooseTreeDb();
}
@Override
protected void loadTreeBase_actionPerformed(ActionEvent e)
{
- // TODO Auto-generated method stub
+ chooseTreeDb();
}
+
public void chooseTreeFile()
{
// Pick the tree file
{
String filePath = chooser.getSelectedFile().getPath();
Cache.setProperty("LAST_DIRECTORY", filePath);
-
+
+
TreeParser treeParser = new TreeParser(filePath);
treeParser.loadTree(viewport);
{
+
}
public TreePanel showNewickTree(NewickFile nf, String treeTitle)
}
- protected void loadTreeDbItem_actionPerformed(ActionEvent e)
- {
- }
/**
* Template method to handle the 'load T-Coffee scores' menu event.