MainPanel() {
}
- MainPanel( final Configuration configuration, final MainFrame parent ) {
+ public MainPanel( final Configuration configuration, final MainFrame parent ) {
if ( configuration == null ) {
throw new IllegalArgumentException( "configuration is null" );
}
getControlPanel().showWhole();
}
- void addPhylogenyInNewTab( final Phylogeny phy,
- final Configuration config,
- final String default_name,
- final String full_path ) {
+ public void addPhylogenyInNewTab( final Phylogeny phy,
+ final Configuration config,
+ final String default_name,
+ final String full_path ) {
final TreePanel treepanel = new TreePanel( phy, config, this );
getControlPanel().phylogenyAdded( config );
treepanel.setControlPanel( getControlPanel() );
_treepanels.add( treepanel );
String name = "";
- // if ( !ForesterUtil.isEmpty( phy.getName() ) ) {
- // name = phy.getName();
- // }
- // else if ( phy.getIdentifier() != null ) {
- // name = phy.getIdentifier().toString();
- // }
- /* else */
- if ( !ForesterUtil.isEmpty( default_name ) ) {
+ if ( !ForesterUtil.isEmpty( phy.getName() ) ) {
+ name = phy.getName();
+ }
+ else if ( phy.getIdentifier() != null ) {
+ name = phy.getIdentifier().toString();
+ }
+ else if ( !ForesterUtil.isEmpty( default_name ) ) {
name = default_name;
}
else {
treegraphic_scroll_pane_panel.add( treegraphic_scroll_pane, BorderLayout.CENTER );
_treegraphic_scroll_pane_panels.add( treegraphic_scroll_pane_panel );
_treegraphic_scroll_panes.add( treegraphic_scroll_pane );
- getTabbedPane().addTab( name,
- null,
- treegraphic_scroll_pane_panel,
- Util.createDescriptionForTab( phy, full_path ) );
+ getTabbedPane().addTab( name, null, treegraphic_scroll_pane_panel, "" );
getTabbedPane().setSelectedIndex( getTabbedPane().getTabCount() - 1 );
getControlPanel().showWhole();
}
}
}
- TreePanel getCurrentTreePanel() {
+ public TreePanel getCurrentTreePanel() {
final int selected = getTabbedPane().getSelectedIndex();
if ( selected >= 0 ) {
return _treepanels.get( selected );
return getCurrentScrollPane().getViewport().getExtentSize();
}
- JTabbedPane getTabbedPane() {
+ public JTabbedPane getTabbedPane() {
return _tabbed_pane;
}