001    package com.sptci.rwt.webui.tree;
002    
003    import com.sptci.rwt.MetaData;
004    
005    /**
006     * A {@link echopointng.tree.TreeNode} that represents a leaf in a tree.
007     *
008     * <p>&copy; Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
009     * @author Rakesh Vidyadharan 2007-09-28
010     * @version $Id: LeafNode.java 4123 2008-05-25 21:49:01Z rakesh $
011     */
012    public class LeafNode<S extends MetaData> extends AbstractNode<S>
013    {
014      /**
015       * Create a new tree node using the specified metadata object.  The
016       * object represents a column in the database.
017       *
018       * @param metadata The metadata object to use as the model for this node.
019       */
020      public LeafNode( final S metadata )
021      {
022        super( metadata );
023      }
024    
025      /**
026       * Determine whether this node holds children or not.  Over-ridden
027       * to always indicate that there are no children.
028       *
029       * @return Returns <code>true</code> if the receiver is a leaf.  Always
030       *   returns <code>true</code>.
031       */
032      @Override
033      public boolean isLeaf()
034      {
035        return true;
036      }
037    
038      /**
039       * Create the child nodes for this node.  Not applicable.
040       */
041      @Override
042      protected void createChildren() {}
043    }