// and Howard Hughes Medical Institute
// Copyright (C) 2003-2007 Ethalinda K.S. Cannon
// All rights reserved
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
package org.forester.archaeopteryx;
NodeFrame( final PhylogenyNode n, final Phylogeny tree, final TreePanel tp, final int x ) {
super( "Node " + ( ForesterUtil.isEmpty( n.getName() ) ? n.getId() : n.getName() ) );
_reepanel = tp;
- setSize( Constants.NODE_FRAME_SIZE );
+ setSize( AptxConstants.NODE_FRAME_SIZE );
_index = x;
final Container contentPane = getContentPane();
- final NodePanel nodepanel = new NodePanel( n );
- contentPane.add( nodepanel, BorderLayout.CENTER );
+ final NodePanel nodepanel = new NodePanel( n, this );
+ contentPane.add( nodepanel );
addWindowListener( new WindowAdapter() {
@Override
public void windowClosing( final WindowEvent e ) {
- remove(); // to release slot in array
- dispose();
+ close();
}
} );
- setResizable( false );
+ this.setLocationRelativeTo( tp );
+ setResizable( true );
nodepanel.setVisible( true );
setVisible( true );
}
+
+ void close() {
+ remove(); // to release slot in array
+ dispose();
+ }
+
NodeFrame( final PhylogenyNode n, final Phylogeny tree, final TreePanel tp, final int x, final String dummy ) {
super( "Editable Node " + ( ForesterUtil.isEmpty( n.getName() ) ? n.getId() : n.getName() ) );
_reepanel = tp;
- setSize( Constants.NODE_FRAME_SIZE );
+ setSize( AptxConstants.NODE_FRAME_SIZE );
_index = x;
final Container contentPane = getContentPane();
- final NodeEditPanel nodepanel = new NodeEditPanel( n, tp );
+ final NodeEditPanel nodepanel = new NodeEditPanel( n, tp, this );
contentPane.add( nodepanel, BorderLayout.CENTER );
addWindowListener( new WindowAdapter() {
dispose();
}
} );
+ this.setLocationRelativeTo( tp );
setResizable( false );
nodepanel.setVisible( true );
setVisible( true );