/* ========================
* JSynoptic : a free Synoptic editor
* ========================
*
* Project Info: http://jsynoptic.sourceforge.net/index.html
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation;
* either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* (C) Copyright 2001-2004, by :
* Corporate:
* EADS Corporate Research Center
* Individual:
* Nicolas Brodu
*
* $Id: SwitchNodeXith3D.java,v 1.3 2004/03/30 15:03:22 brodu Exp $
*
* Changes
* -------
* 19-Mar-2004 : Creation date (NB);
*
*/
package syn3d.nodes.xith3d;
import syn3d.base.ActiveNode;
import syn3d.nodes.SwitchNode;
import com.xith3d.scenegraph.Group;
import com.xith3d.scenegraph.Switch;
/**
*
*/
public class SwitchNodeXith3D extends SwitchNode {
protected Switch sw;
public SwitchNodeXith3D(ActiveNode parent) {
super(parent);
sw = new Switch(Switch.CHILD_MASK, status);
sw.setName(name);
sw.setUserData(this);
sw.setPickable(true);
((Group)parent.get3DObject()).addChild(sw);
}
/* (non-Javadoc)
* @see syn3d.base.ActiveNode#remove()
*/
public void remove() {
((Group)parent.get3DObject()).removeChild(sw);
super.remove();
}
/* (non-Javadoc)
* @see syn3d.base.ActiveNode#setName(java.lang.String)
*/
public void setName(String name) {
super.setName(name);
sw.setName(name);
}
public Object get3DObject() {
return sw;
}
}