@Override
public void destroy() {
- Util.printAppletMessage( NAME, "going to be destroyed" );
+ AptxUtil.printAppletMessage( NAME, "going to be destroyed" );
if ( getMainFrameApplet() != null ) {
getMainFrameApplet().close();
}
}
- private MainFrameApplet getMainFrameApplet() {
- return _mainframe_applet;
+ /**
+ * This method returns the current external node data which
+ * has been selected by the user by clicking the "Return ..."
+ * menu item. This method is expected to be called from Javascript or
+ * something like it.
+ *
+ * @return current external node data as String
+ */
+ public String getCurrentExternalNodesDataBuffer() {
+ return getMainFrameApplet().getCurrentTreePanel().getCurrentExternalNodesDataBufferAsString();
}
- private String getMessage1() {
- return _message_1;
+ public int getCurrentExternalNodesDataBufferCounter() {
+ return getMainFrameApplet().getCurrentTreePanel().getCurrentExternalNodesDataBufferChangeCounter();
}
- private String getMessage2() {
- return _message_2;
+ public int getCurrentExternalNodesDataBufferLength() {
+ return getMainFrameApplet().getCurrentTreePanel().getCurrentExternalNodesDataBufferAsString().length();
}
public String getUrlString() {
boolean has_exception = false;
setName( NAME );
setUrlString( getParameter( Constants.APPLET_PARAM_NAME_FOR_URL_OF_TREE_TO_LOAD ) );
- Util.printAppletMessage( NAME, "URL of phylogenies to load: \"" + getUrlString() + "\"" );
+ AptxUtil.printAppletMessage( NAME, "URL of phylogenies to load: \"" + getUrlString() + "\"" );
setBackground( background_color );
setForeground( font_color );
setFont( font );
repaint();
}
final String config_filename = getParameter( Constants.APPLET_PARAM_NAME_FOR_CONFIG_FILE_URL );
- Util.printAppletMessage( NAME, "URL for configuration file is: " + config_filename );
- final Configuration configuration = new Configuration( config_filename, true, true );
+ AptxUtil.printAppletMessage( NAME, "URL for configuration file is: " + config_filename );
+ final Configuration configuration = new Configuration( config_filename, true, true, true );
try {
if ( configuration.isUseNativeUI() ) {
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
_mainframe_applet = new MainFrameApplet( this, configuration );
URL url = null;
url = new URL( getUrlString() );
- final Phylogeny[] phys = Util.readPhylogeniesFromUrl( url, configuration.isValidatePhyloXmlAgainstSchema() );
- Util.addPhylogeniesToTabs( phys, new File( url.getFile() ).getName(), getUrlString(), getMainFrameApplet()
- .getConfiguration(), getMainFrameApplet().getMainPanel() );
+ final Phylogeny[] phys = AptxUtil.readPhylogeniesFromUrl( url, configuration
+ .isValidatePhyloXmlAgainstSchema(), configuration.isReplaceUnderscoresInNhParsing(), configuration
+ .isInternalNumberAreConfidenceForNhParsing(), configuration.getTaxonomyExtraction() );
+ AptxUtil.addPhylogeniesToTabs( phys,
+ new File( url.getFile() ).getName(),
+ getUrlString(),
+ getMainFrameApplet().getConfiguration(),
+ getMainFrameApplet().getMainPanel() );
getMainFrameApplet().getMainPanel().getControlPanel().showWholeAll();
getMainFrameApplet().getMainPanel().getControlPanel().showWhole();
setVisible( true );
if ( !has_exception ) {
setMessage1( NAME + " is now ready!" );
repaint();
- Util.printAppletMessage( NAME, "successfully initialized" );
+ AptxUtil.printAppletMessage( NAME, "successfully initialized" );
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
getMainFrameApplet().requestFocus();
g.drawString( getMessage1(), 10, 40 );
}
+ @Override
+ public void start() {
+ getMainFrameApplet().getMainPanel().validate();
+ getMainFrameApplet().requestFocus();
+ getMainFrameApplet().requestFocusInWindow();
+ getMainFrameApplet().requestFocus();
+ AptxUtil.printAppletMessage( NAME, "started" );
+ }
+
+ private MainFrameApplet getMainFrameApplet() {
+ return _mainframe_applet;
+ }
+
+ private String getMessage1() {
+ return _message_1;
+ }
+
+ private String getMessage2() {
+ return _message_2;
+ }
+
private void setMessage1( final String message_1 ) {
_message_1 = message_1;
}
private void setUrlString( final String url_string ) {
_url_string = url_string;
}
-
- @Override
- public void start() {
- getMainFrameApplet().getMainPanel().validate();
- getMainFrameApplet().requestFocus();
- getMainFrameApplet().requestFocusInWindow();
- getMainFrameApplet().requestFocus();
- Util.printAppletMessage( NAME, "started" );
- }
}