}
}
public void addMarker( long pos )
{
final AbstractCompoundEdit ce;
pos = Math.max( 0, Math.min( doc.timeline.getLength(), pos ));
ce = new BasicCompoundEdit( getResourceString( "editAddMarker" ));
doc.markers.editBegin( ce );
try {
doc.markers.editAdd( this, new MarkerStake( pos, "Mark" ), ce );
}
catch( IOException e1 ) { // should never happen
System.err.println( e1 );
ce.cancel();
return;
}
finally {
doc.markers.editEnd( ce );
}
ce.perform();
ce.end();
doc.getUndoManager().addEdit( ce );
}