+ case NODE_BRANCH_WIDTH:
+ if ( ForesterUtil.isEmpty( value ) || value.equals( "1" ) ) {
+ if ( getMyNode().getBranchData().getBranchWidth() != null ) {
+ getMyNode().getBranchData().setBranchWidth( new BranchWidth() );
+ }
+ }
+ else {
+ try {
+ final double bw = ForesterUtil.parseDouble( value );
+ if ( bw >= 0 ) {
+ getMyNode().getBranchData().setBranchWidth( new BranchWidth( bw ) );
+ }
+ }
+ catch ( final ParseException e ) {
+ JOptionPane.showMessageDialog( this,
+ "failed to parse branch width from: " + value,
+ "Error",
+ JOptionPane.ERROR_MESSAGE );
+ mtn.setUserObject( "" );
+ }
+ }
+ break;