|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.text.Text
public class Text
Title: Text - represents a text object.
Description: Represents a text object. Modelled in a similar way to the X3D Text node.
Copyright: Copyright (c) Hedgehog Software.
Company: Hedgehog Software.
| Field Summary | |
|---|---|
protected FontStyle |
mFontStyle
Font style node. |
protected boolean |
mIsSolid
Indicates whether or not the text is solid or wireframe. |
protected FloatingPointVector |
mLength
The length of each text string in the local coordinate system. |
protected double |
mMaxExtent
Limits and compresses all of the text strings if the length of the maximum string is longer than the maximum extent. |
protected Point3D |
mPosition
Text string position. |
protected java.util.Vector<java.lang.String> |
mString
Vector of strings that form text. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
Text()
Default constructor. |
|
Text(Point3D position,
FontStyle fontStyle,
FloatingPointVector length,
double maxExtent,
java.util.Vector<java.lang.String> string,
boolean isSolid)
Constructor. |
|
Text(Text object)
Copy constructor. |
|
| Method Summary | |
|---|---|
java.util.Vector<ModelObject> |
childModelObjects()
Returns a vector of this object's child ModelObject objects. |
java.lang.String |
concatenatedStringLengths()
Returns a space-concatenated string of the string lengths as sub-strings. |
java.lang.String |
concatenatedStrings()
Returns a space-concatenated string of the strings as sub-strings. |
java.sql.PreparedStatement |
databaseInsertStatement(java.sql.Connection connection,
int modelID)
Returns a prepared statement for inserting (INSERT command) a ModelObject object into a database. |
java.sql.PreparedStatement |
databaseUpdateStatement(java.sql.Connection connection,
int modelID)
Returns a prepared statement for updating (UPDATE command) a ModelObject object into a database. |
ModelObject |
fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int objectID)
Returns a model object from the specified database table. |
ModelObject |
fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
Returns a model object from the specified xml node. |
FontStyle |
getFontStyleNode()
Returns the font style node. |
boolean |
getIsSolid()
Returns the is-solid value. |
FloatingPointVector |
getLength()
Returns the length vector. |
double |
getMaxExtent()
Returns the maximum extent. |
Point3D |
getPosition()
Returns the text string position. |
java.util.Vector<java.lang.String> |
getString()
Returns the string vector. |
void |
setFontStyleNode(FontStyle fontStyle)
Sets the font style. |
void |
setIsSolid(boolean isSolid)
Sets the is-solid value. |
void |
setLength(FloatingPointVector length)
Sets the length vector. |
void |
setMaxExtent(double maxExtent)
Sets the maximum extent. |
void |
setPosition(Point3D position)
Sets the text string position. |
void |
setString(java.util.Vector<java.lang.String> string)
Sets the string vector. |
java.lang.String |
toString()
Returns a String representation of a Text3D object. |
X3DNode |
toX3DNode(X3DObject x3dObject)
X3D support. |
org.w3c.dom.Element |
toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode)
Returns the xml node of this object. |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Point3D mPosition
protected FontStyle mFontStyle
protected FloatingPointVector mLength
protected double mMaxExtent
protected java.util.Vector<java.lang.String> mString
protected boolean mIsSolid
| Constructor Detail |
|---|
public Text()
public Text(Point3D position,
FontStyle fontStyle,
FloatingPointVector length,
double maxExtent,
java.util.Vector<java.lang.String> string,
boolean isSolid)
position - Text string posiiton.fontStyle - Font style.length - Length vector.maxExtent - Maximum extent.string - String vector.isSolid - Is-solid value.public Text(Text object)
object - Object to copy.| Method Detail |
|---|
public Point3D getPosition()
public FontStyle getFontStyleNode()
public FloatingPointVector getLength()
public double getMaxExtent()
public java.util.Vector<java.lang.String> getString()
public boolean getIsSolid()
public void setPosition(Point3D position)
position - New text string position.public void setFontStyleNode(FontStyle fontStyle)
fontStyle - New font style.public void setLength(FloatingPointVector length)
length - New length vector.public void setMaxExtent(double maxExtent)
maxExtent - New maximum extent.public void setString(java.util.Vector<java.lang.String> string)
string - New string vector.public void setIsSolid(boolean isSolid)
isSolid - New is-solid value.public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Vector<ModelObject> childModelObjects()
childModelObjects in interface ModelObject
public java.sql.PreparedStatement databaseInsertStatement(java.sql.Connection connection,
int modelID)
throws java.sql.SQLException
databaseInsertStatement in interface ModelObjectconnection - Database connection.modelID - Model ID.
java.sql.SQLException - Thrown if an SQL exception occurs.
public java.sql.PreparedStatement databaseUpdateStatement(java.sql.Connection connection,
int modelID)
throws java.sql.SQLException
databaseUpdateStatement in interface ModelObjectconnection - Database connection.modelID - Model ID.
java.sql.SQLException - Thrown if an SQL exception occurs.
public ModelObject fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int objectID)
throws java.sql.SQLException
fromDatabase in interface ModelObjectconnection - Database connection.model - Model built from database.modelID - Model ID.objectID - Object ID in associated ModelObjects table.
java.sql.SQLException - Thrown if an SQL exception occurs.public java.lang.String concatenatedStringLengths()
public java.lang.String concatenatedStrings()
public org.w3c.dom.Element toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode)
throws InvalidObjectException
toXMLNode in interface ModelObjectdocument - XML document.documentRootNode - Document root node; ie Model node.
InvalidObjectException - Thrown if this object's ID is equal to the default ID of -1.
public ModelObject fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
throws InvalidObjectException
fromXMLNode in interface ModelObjectdocument - XML document.documentRootNode - Document root node; ie Model node.node - XML node.model - Model to which node object is added.
InvalidObjectException - Thrown if an error occurred building the object.
public X3DNode toX3DNode(X3DObject x3dObject)
throws InvalidObjectException
toX3DNode in interface ModelObjectx3dObject - X3D object.
InvalidObjectException - Thrown if this object is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||