|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.cs.algs4.growingtree.framework.NodeProperties
public class NodeProperties
This class hold the local state for a node. It can be extended by client code to include more properties. It also provides callbacks to allow for limited control over the animation.
Field Summary | |
---|---|
static int |
NULL_HEIGHT
|
Constructor Summary | |
---|---|
NodeProperties()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this NodeProperties object. |
boolean |
colorParentLink()
Determines whether the node itself is colored or its parent link |
int |
getHeight()
|
java.awt.Color |
getIntegerFieldColor()
|
java.awt.Color |
getLeftLinkColor()
|
java.lang.Integer |
getLLIntegerFieldValue()
|
java.lang.Integer |
getLRIntegerFieldValue()
|
java.awt.Color |
getNodeColor()
|
java.awt.Color |
getRightLinkColor()
|
int |
getSize()
|
java.lang.Integer |
getULIntegerFieldValue()
|
java.lang.Integer |
getURIntegerFieldValue()
|
NodeProperties |
makeDefaultProperties()
This functions as a factory for NodeProperty objects. |
void |
setHeight(int i)
The height field of NodeProperties is maintained by the framework, so this should not be called by the client |
void |
setSize(int i)
The size field of NodeProperties is maintained by the framework, so this should not be called by the client |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NULL_HEIGHT
Constructor Detail |
---|
public NodeProperties()
Method Detail |
---|
public java.lang.Object clone()
NodeProperties
object.
clone
in class java.lang.Object
Object
that is a copy of this
NodeProperties
object.public NodeProperties makeDefaultProperties()
public int getHeight()
public void setHeight(int i)
i
- The new height of the treepublic int getSize()
public void setSize(int i)
i
- The new height of the treepublic java.awt.Color getNodeColor()
public boolean colorParentLink()
public java.awt.Color getLeftLinkColor()
public java.awt.Color getRightLinkColor()
public java.lang.Integer getULIntegerFieldValue()
public java.lang.Integer getURIntegerFieldValue()
public java.lang.Integer getLLIntegerFieldValue()
public java.lang.Integer getLRIntegerFieldValue()
public java.awt.Color getIntegerFieldColor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |