// $Id: PmiiTreeNode.java,v 1.6 2004/02/27 16:30:00 m31 Exp $
//
// This file is part of the program suite "Principia Mathematica II"
// which is a working prototype for the main project:
// "Hilbert II" - http://www.qedeq.org
//
// Copyright 2001-2004  Michael Meyling <mime@qedeq.org>.
//
// "Principia Mathematica II" is free software; you can redistribute
// it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

package com.meyling.principia.gui.jtree;

import javax.swing.tree.*;

import com.meyling.principia.module.ModuleProperties;



/**
 * Node for a JTreee.
 *
 * @version $Revision: 1.6 $
 * @author  Michael Meyling
 */
public final class PmiiTreeNode extends DefaultMutableTreeNode{

/*
    public PmiiTreeNode() {
        super();
    }

    public PmiiTreeNode(final ModuleProperties userObject) {
        super(userObject);
    }

    public PmiiTreeNode(final ModuleElement userObject) {
        super(userObject);
    }
*/
    public PmiiTreeNode(final ModuleElement userObject, final boolean allowsChildren) {
        super(userObject, allowsChildren);
    }

    public PmiiTreeNode(final ModuleProperties userObject, final boolean allowsChildren) {
        super(userObject, allowsChildren);
    }


    /**
     * @see javax.swing.tree.MutableTreeNode#setUserObject(java.lang.Object)
     */
    public final void setUserObject(Object userObject) {

        if (userObject instanceof ModuleProperties) {
            this.userObject = userObject;
        } else {
            throw new IllegalArgumentException("Only ModuleElements could be managed!");
        }
    }



}
