src/main/java/ca/phon/plugins/praat/export/ExportEntryCheckboxTree.java
/**
	 * Find the tree node for the given entry
	 * 
	 * @param entry
	 * @return tree node or <code>null</code> if not found
	 */
Find the tree node for the given entry

@param entry
@return tree node or null if not found
Find the tree node for the given entry @param entry @return tree node or null if not found
public TristateCheckBoxTreeNode nodeForEntry(TextGridExportEntry entry) {
		final String tierName = entry.getPhonTier();
		final Segmentation type = entry.getExportType();
		TristateCheckBoxTreeNode tierNode = null;
		for(int i = 0; i < rootNode.getChildCount(); i++) {
			final TristateCheckBoxTreeNode cNode = (TristateCheckBoxTreeNode)rootNode.getChildAt(i);
			if(cNode.getUserObject().toString().equals(tierName)) {
				tierNode = cNode;
				break;
			}
		}
		if(tierNode == null) return null;
		for(int i = 0; i < tierNode.getChildCount(); i++) {
			final TristateCheckBoxTreeNode cNode = (TristateCheckBoxTreeNode)tierNode.getChildAt(i);
			if(cNode.getUserObject() == type) {
				return cNode;
			}
		}
		return null;
	}
public TristateCheckBoxTreeNode nodeForEntry ( TextGridExportEntry entry ) { final String tierName = entry . getPhonTier ( ) ; final Segmentation type = entry . getExportType ( ) ; TristateCheckBoxTreeNode tierNode = null ; for ( int i = 0 ; i < rootNode . getChildCount ( ) ; i ++ ) { final TristateCheckBoxTreeNode cNode = ( TristateCheckBoxTreeNode ) rootNode . getChildAt ( i ) ; if ( cNode . getUserObject ( ) . toString ( ) . equals ( tierName ) ) { tierNode = cNode ; break ; } } if ( tierNode == null ) return null ; for ( int i = 0 ; i < tierNode . getChildCount ( ) ; i ++ ) { final TristateCheckBoxTreeNode cNode = ( TristateCheckBoxTreeNode ) tierNode . getChildAt ( i ) ; if ( cNode . getUserObject ( ) == type ) { return cNode ; } } return null ; }
Find the tree node for the given entry
Find the tree node for the given entry
// find tier // now type