Rings
Version 0.3

threeD.ui.tree
Class ShaderTreeNode

java.lang.Object
  extended bythreeD.ui.tree.ShaderTreeNode
All Implemented Interfaces:
java.util.Collection, Editable, java.util.List, javax.swing.tree.TreeNode

public class ShaderTreeNode
extends java.lang.Object
implements Editable, javax.swing.tree.TreeNode, java.util.List

A ShaderTreeNode object wraps a Shader object and allows it to be displayed in a tree.


Nested Class Summary
 
Nested classes inherited from class threeD.raytracer.util.Editable
Editable.Selection
 
Constructor Summary
ShaderTreeNode(Shader s, javax.swing.tree.TreeNode parent)
          Constructs a new ShaderTreeNode object.
 
Method Summary
 void add(int index, java.lang.Object o)
           
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection c)
           
 boolean addAll(int index, java.util.Collection c)
           
 java.util.Enumeration children()
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection c)
           
 boolean equals(java.lang.Object o)
           
 java.lang.Object get(int index)
           
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int index)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 Producer[] getInputPropertyValues()
           
 javax.swing.tree.TreeNode getParent()
           
 java.lang.String[] getPropertyDescriptions()
          Returns an array of String objects with descriptions for each editable property of this Editable object.
 java.lang.String[] getPropertyNames()
          Returns an array of String objects with names for each editable property of this Editable object.
 java.lang.Class[] getPropertyTypes()
          Returns an array of Class objects representing the class types of each editable property of this Editable object.
 java.lang.Object[] getPropertyValues()
          Returns the values of the properties of this Editable object as an Object array.
 Shader getShader()
           
 int hashCode()
           
 int indexOf(java.lang.Object o)
           
 boolean isEmpty()
           
 boolean isLeaf()
           
 java.util.Iterator iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int i)
           
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 java.lang.Object set(int index, java.lang.Object o)
           
 void setInputPropertyValue(int index, Producer p)
           
 void setPropertyValue(java.lang.Object value, int index)
          Sets the value of the property of this Editable object at the specified index to the specified value.
 void setPropertyValues(java.lang.Object[] values)
          Sets the values of properties of this Editable object to those specified.
 int size()
           
 java.util.List subList(int start, int end)
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] o)
           
 java.lang.String toString()
           
 void updateChildren()
          Updates the list of child nodes stored by this ShaderTreeNode object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShaderTreeNode

public ShaderTreeNode(Shader s,
                      javax.swing.tree.TreeNode parent)
Constructs a new ShaderTreeNode object.

Parameters:
s - Shader object to use.
Method Detail

getShader

public Shader getShader()
Returns:
The Shader object stored by this ShaderTreeNode object.

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
See Also:
TreeNode.getChildCount()

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
See Also:
TreeNode.getAllowsChildren()

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
See Also:
TreeNode.isLeaf()

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode
See Also:
TreeNode.children()

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode
See Also:
TreeNode.getParent()

getChildAt

public javax.swing.tree.TreeNode getChildAt(int index)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode
See Also:
TreeNode.getChildAt(int)

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode
See Also:
TreeNode.getIndex(javax.swing.tree.TreeNode)

updateChildren

public void updateChildren()
Updates the list of child nodes stored by this ShaderTreeNode object.


getPropertyNames

public java.lang.String[] getPropertyNames()
Description copied from interface: Editable
Returns an array of String objects with names for each editable property of this Editable object.

Specified by:
getPropertyNames in interface Editable
See Also:
Editable.getPropertyNames()

getPropertyDescriptions

public java.lang.String[] getPropertyDescriptions()
Description copied from interface: Editable
Returns an array of String objects with descriptions for each editable property of this Editable object.

Specified by:
getPropertyDescriptions in interface Editable
See Also:
Editable.getPropertyDescriptions()

getPropertyTypes

public java.lang.Class[] getPropertyTypes()
Description copied from interface: Editable
Returns an array of Class objects representing the class types of each editable property of this Editable object.

Specified by:
getPropertyTypes in interface Editable
See Also:
Editable.getPropertyTypes()

getPropertyValues

public java.lang.Object[] getPropertyValues()
Description copied from interface: Editable
Returns the values of the properties of this Editable object as an Object array.

Specified by:
getPropertyValues in interface Editable
See Also:
Editable.getPropertyValues()

setPropertyValue

public void setPropertyValue(java.lang.Object value,
                             int index)
Description copied from interface: Editable
Sets the value of the property of this Editable object at the specified index to the specified value.

Specified by:
setPropertyValue in interface Editable
See Also:
Editable.setPropertyValue(java.lang.Object, int)

setPropertyValues

public void setPropertyValues(java.lang.Object[] values)
Description copied from interface: Editable
Sets the values of properties of this Editable object to those specified.

Specified by:
setPropertyValues in interface Editable
See Also:
Editable.setPropertyValues(java.lang.Object[])

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.List

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.List

toString

public java.lang.String toString()

size

public int size()
Specified by:
size in interface java.util.List
Returns:
this.getChildCount().

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.List
See Also:
List.isEmpty()

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.List
See Also:
List.contains(java.lang.Object)

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.List
See Also:
List.iterator()

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.List
See Also:
List.toArray()

toArray

public java.lang.Object[] toArray(java.lang.Object[] o)
Specified by:
toArray in interface java.util.List
Returns:
this.toArray().

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.List
See Also:
List.add(java.lang.Object)

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.List
See Also:
List.remove(java.lang.Object)

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.List
See Also:
List.containsAll(java.util.Collection)

addAll

public boolean addAll(java.util.Collection c)
Specified by:
addAll in interface java.util.List
See Also:
List.addAll(java.util.Collection)

addAll

public boolean addAll(int index,
                      java.util.Collection c)
Specified by:
addAll in interface java.util.List
Returns:
false.
See Also:
List.addAll(int, java.util.Collection)

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.List
See Also:
List.removeAll(java.util.Collection)

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.List
Returns:
false.
See Also:
List.retainAll(java.util.Collection)

clear

public void clear()
Specified by:
clear in interface java.util.List
See Also:
List.clear()

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List
See Also:
List.get(int)

set

public java.lang.Object set(int index,
                            java.lang.Object o)
Specified by:
set in interface java.util.List
See Also:
List.set(int, java.lang.Object)

add

public void add(int index,
                java.lang.Object o)
Specified by:
add in interface java.util.List
See Also:
List.add(int, java.lang.Object)

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List
See Also:
List.remove(int)

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List
See Also:
List.indexOf(java.lang.Object)

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List
See Also:
List.lastIndexOf(java.lang.Object)

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List
Returns:
null.
See Also:
List.listIterator()

listIterator

public java.util.ListIterator listIterator(int i)
Specified by:
listIterator in interface java.util.List
Returns:
null.
See Also:
List.listIterator(int)

subList

public java.util.List subList(int start,
                              int end)
Specified by:
subList in interface java.util.List
Returns:
null.
See Also:
List.subList(int, int)

getInputPropertyValues

public Producer[] getInputPropertyValues()
Specified by:
getInputPropertyValues in interface Editable
Returns:
An array of Producer objects containing the property values of those properties that are repeatedly evaluated.
See Also:
Editable.getInputPropertyValues()

setInputPropertyValue

public void setInputPropertyValue(int index,
                                  Producer p)
Specified by:
setInputPropertyValue in interface Editable
Parameters:
index - Index of input property (array index from this.getInputPropertyValue).
p - Producer object to use for input property.
See Also:
Editable.setInputPropertyValue(int, threeD.raytracer.util.Producer)

Rings
Version 0.3

Copyright 2003-05 Mike Murray