|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hdcookbook.grin.Feature
com.hdcookbook.grin.features.Box
com.hdcookbook.grin.features.SEBox
public class SEBox
| Field Summary |
|---|
| Fields inherited from class com.hdcookbook.grin.features.Box |
|---|
fillColor, height, outlineColor, outlineWidthX, outlineWidthY, scaledBounds, scalingModel, width, x, y |
| Fields inherited from class com.hdcookbook.grin.Feature |
|---|
name, show |
| Constructor Summary | |
|---|---|
SEBox(SEShow show)
|
|
SEBox(SEShow show,
java.lang.String name,
int x,
int y,
int width,
int height,
int outlineWidth,
java.awt.Color outlineColor,
java.awt.Color fillColor)
|
|
| Method Summary | |
|---|---|
void |
accept(SEShowVisitor visitor)
Calls the visit method corresponding to this node type. |
void |
changeFeatureReference(Feature from,
Feature to)
Change a feature reference from one feature to a new one. |
java.awt.Color |
getFillColor()
|
int |
getHeight()
|
java.awt.Color |
getOutlineColor()
|
int |
getOutlineWidthX()
|
int |
getOutlineWidthY()
|
java.lang.String |
getRuntimeClassName()
Returns the class that should be constructed at Show runtime to represent this SENode. |
InterpolatedModel |
getScalingModel()
|
int |
getWidth()
|
void |
postProcess(ShowBuilder builder)
Do any needed post-processing in this show. |
void |
scaleBy(int xScale,
int yScale,
int xOffset,
int yOffset)
Scale this node by the given scale factor, and apply the given offset. |
void |
setFillColor(java.awt.Color color)
|
void |
setHeight(int h)
|
void |
setOutlineColor(java.awt.Color color)
|
void |
setOutlineWidthX(int w)
|
void |
setOutlineWidthY(int w)
|
void |
setScalingModel(InterpolatedModel model)
|
void |
setWidth(int w)
|
void |
setX(int x)
|
void |
setY(int y)
|
java.lang.String |
toString()
|
void |
writeInstanceData(GrinDataOutputStream out)
Record this node information to the binary file format. |
| Methods inherited from class com.hdcookbook.grin.features.Box |
|---|
addDisplayAreas, changeBoxColor, changeBoxOutlineColor, createClone, destroy, getX, getY, initialize, initializeClone, markDisplayAreasChanged, needsMoreSetup, nextFrame, paintFrame, readInstanceData, resize, resizeOutline, setActivateMode, setSetupMode |
| Methods inherited from class com.hdcookbook.grin.Feature |
|---|
activate, addSubgraph, cloneCommands, clonedReference, cloneSubgraph, deactivate, destroyClonedSubgraph, getName, isSetup, makeNewClone, resetFeature, sendFeatureSetup, setName, setup, unsetup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SEBox(SEShow show)
public SEBox(SEShow show,
java.lang.String name,
int x,
int y,
int width,
int height,
int outlineWidth,
java.awt.Color outlineColor,
java.awt.Color fillColor)
| Method Detail |
|---|
public int getWidth()
public int getHeight()
public int getOutlineWidthX()
public int getOutlineWidthY()
public java.awt.Color getOutlineColor()
public java.awt.Color getFillColor()
public void setScalingModel(InterpolatedModel model)
public InterpolatedModel getScalingModel()
public void setX(int x)
public void setY(int y)
public void setWidth(int w)
public void setHeight(int h)
public void setOutlineWidthX(int w)
public void setOutlineWidthY(int w)
public void setOutlineColor(java.awt.Color color)
public void setFillColor(java.awt.Color color)
public void writeInstanceData(GrinDataOutputStream out)
throws java.io.IOException
SENode
writeInstanceData in interface SENodeout - The stream to write out.
java.io.IOException - if error occurs.GrinDataOutputStream.writeSuperClassData(Feature),
GrinDataOutputStream.writeSuperClassData(RCHandler),
GrinDataOutputStream.writeSuperClassData(Segment),
GrinDataOutputStream.writeSuperClassData(Command)public java.lang.String getRuntimeClassName()
SENode
getRuntimeClassName in interface SENodepublic void accept(SEShowVisitor visitor)
SENode
If you are defining a user-defined feature, there are some
restrictions that you'll want to follow. If your extension is
a feature that has children, then you should make it a subclass
of one of the built-in feature types, Assembly, Modifer or Group.
That's because the GRIN compiler defines visitors that need to
visit every node in the tree, but these built-in visitors don't
know about your extension types. By making your extension type
a subclass of one of the standard ones, and by making your
accept() method call either
visitAssembly(), visitGroup() or
visitUserDefinedModifier(), as appropriate,
you'll ensure that all the children get visited.
accept in interface SENodevisitor - SEShowVisitor object.SEShowVisitor
public void postProcess(ShowBuilder builder)
throws java.io.IOException
During the post-process phase, a node can add new features to the
show, by calling ShowBuilder.addSyntheticFeature(),
and it can insert a new feature as the parent of a given feature,
by calling ShowBuilder.injectParent(). It can also
add segments and handlers by calling the appropriate builder methods.
When a parent is injected, the ShowBuilder calls postProcess() on all nodes automatically, including nodes that are created during the execution of postProcess() in another node.
postProcess in interface SENodebuilder - The builder that holds state for the show
java.io.IOException - if an error is encounteredShowBuilder.addSyntheticFeature(Feature),
ShowBuilder.injectParent(Feature, Feature)
public void changeFeatureReference(Feature from,
Feature to)
from, it should be
changed to refer to to. This is called for every node
in an SEShow when SENode.injectParent is used.
The ShowBuilder calls changeFeatureReference() on all nodes automatically, including nodes that are created during the execution of postProcess().
changeFeatureReference in interface SENodeSENode.changeFeatureReference(Feature, Feature)
public void scaleBy(int xScale,
int yScale,
int xOffset,
int yOffset)
scaleBy in interface SEScalableNodexScale - x scale factor in millsyScale - y scale factor in millsxOffset - x offset in pixelsyOffset - y offset in pixelspublic java.lang.String toString()
toString in class Feature
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||