FileDocCategorySizeDatePackage
ColoringAttributes_Info.javaAPI DocExample1481Fri Dec 10 12:56:38 GMT 1999com.tornadolabs.j3dtree

ColoringAttributes_Info.java

/*
//*****************************************************************************
/*
*	@(#) ColoringAttributes_Info.java
*
*	Project:		Java3dTree
*	Client:		Java 3D Community
*
*	Project Information:
*		dselman@tornadolabs.com
*		http://www.tornadolabs.com
*	
*	@author Daniel Selman: dselman@tornadolabs.com
*/
//*****************************************************************************

package com.tornadolabs.j3dtree;
import javax.media.j3d.*;
import javax.vecmath.Color3f;

public class ColoringAttributes_Info extends ObjectInfo
{

	private static final int[] 		m_kCapabilityArray = 
												{
													ColoringAttributes.ALLOW_COLOR_READ,
													ColoringAttributes.ALLOW_SHADE_MODEL_READ,
												};

	public ColoringAttributes_Info()
	{
	}
	
	java.util.Enumeration getChildren( Object obj )
	{
		return super.getChildren( obj );
	}
	
	public int[] getCapabilityBits()
	{
		return createCompoundArray( m_kCapabilityArray, super.getCapabilityBits() );
	}
	
	public String getInfo( Object obj )
	{
		String szText = super.getInfo( obj );

		szText = insertSectionBreak( szText );
		szText += "Coloring Attributes\r\n";
		
		ColoringAttributes colAttribs = (ColoringAttributes) obj;
		
		Color3f color = new Color3f();
		colAttribs.getColor( color );
		
		szText += "Color: " + color.toString() + "\r\n";
		szText += "Shade Model: " + colAttribs.getShadeModel() + "\r\n";

		return szText;
	}
}