|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.polito.elite.visualization.ontoviewer.tools.InstanceCube
public class InstanceCube
This class offers an utility to draw cubes as a building block for scenes. It exposes a dummy constructor, a group of set methods in order to explicitly set characteristics as transparency, the radius.. It provides also a method createColoredCube which return a java 3D TransformGroup that will be included by the scene itself. An example of its use is: TransformGroup tgx = new TransformGroup(); String label="..."; InstanceCube cube = new InstanceCube(); tgx.addChild(cube.createColoredCube(......));
Field Summary | |
---|---|
private javax.vecmath.Color3f |
black
|
private com.sun.j3d.utils.geometry.Box |
cube
|
private javax.vecmath.Color3f |
cubeColor
|
private java.lang.String |
cubeLabel
|
private java.lang.String |
fontFamily
|
private int |
fontModifier
|
private boolean |
isWithLabel
|
private javax.vecmath.Color3f |
labelColor
|
private float |
labelScale
|
private float |
side
|
private float |
transparency
|
Constructor Summary | |
---|---|
InstanceCube()
Void constructor. |
Method Summary | |
---|---|
private javax.media.j3d.TransformGroup |
addCubeLabel()
This method creates a TransformGroup containing the label. |
javax.media.j3d.BranchGroup |
createColoredCube(javax.vecmath.Color3f color,
java.lang.String label,
boolean hasPertainingFacts)
Creates and adds a Sphere to a TransformGroup. |
private javax.media.j3d.BranchGroup |
drawInstanceCube(boolean hasFacts)
This method actually draws the sphere |
float |
getSide()
|
void |
setFontFamily(java.lang.String fontFamily)
|
void |
setFontModifier(int fontModifier)
|
void |
setIsWithLabel(boolean isWithLabel)
|
void |
setLabelAppearance(javax.vecmath.Color3f labelColor,
float scale)
Sets color and dimension scale for the label |
void |
setSide(float side)
|
void |
setTransparency(float transparency)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final javax.vecmath.Color3f black
private com.sun.j3d.utils.geometry.Box cube
private javax.vecmath.Color3f cubeColor
private java.lang.String cubeLabel
private java.lang.String fontFamily
private int fontModifier
private boolean isWithLabel
private javax.vecmath.Color3f labelColor
private float labelScale
private float side
private float transparency
Constructor Detail |
---|
public InstanceCube()
Method Detail |
---|
private javax.media.j3d.TransformGroup addCubeLabel()
public javax.media.j3d.BranchGroup createColoredCube(javax.vecmath.Color3f color, java.lang.String label, boolean hasPertainingFacts)
color
- The Color of the Cubelabel
- The label of the Cube (can be null)hasPertainingFacts
- Indicates if the instance is involved in facts (relations with other instances).
private javax.media.j3d.BranchGroup drawInstanceCube(boolean hasFacts)
public float getSide()
public void setFontFamily(java.lang.String fontFamily)
fontFamily
- The fontFamily to set.public void setFontModifier(int fontModifier)
fontModifier
- The fontModifier to set.public void setIsWithLabel(boolean isWithLabel)
public void setLabelAppearance(javax.vecmath.Color3f labelColor, float scale)
labelColor
- scale
- public void setSide(float side)
side
- The side to set.public void setTransparency(float transparency)
transparency
- The transparency to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |