de.fhg.igd.earth.model.graph
Class Text

java.lang.Object
  extended byde.fhg.igd.earth.model.graph.ProjectorObject
      extended byde.fhg.igd.earth.model.graph.ModelGraphObject
          extended byde.fhg.igd.earth.model.graph.Node
              extended byde.fhg.igd.earth.model.graph.Leaf
                  extended byde.fhg.igd.earth.model.graph.Shape
                      extended byde.fhg.igd.earth.model.graph.Text
All Implemented Interfaces:
Cloneable, Serializable

public class Text
extends Shape
implements Serializable, Cloneable

This class represents a text (graphic object, leaf). A text is defined by a string and a size. Different fonts are not supported yet. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel
See Also:
Serialized Form

Field Summary
private  int size_
          the text size
private  String text_
          the text string
 
Fields inherited from class de.fhg.igd.earth.model.graph.Shape
CULL_BACKFACE, CULL_FRONTFACE, CULL_NONE, STYLE_SOLID, STYLE_TEXTURE, STYLE_WIRE_FRAME
 
Fields inherited from class de.fhg.igd.earth.model.graph.Leaf
 
Fields inherited from class de.fhg.igd.earth.model.graph.Node
boundless_, collidable_, icon_, parent_, pickable_
 
Fields inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject
CHANGE_AddChild, CHANGE_Anything, CHANGE_Appearance, CHANGE_Color, CHANGE_Create, CHANGE_Delete, CHANGE_Focus, CHANGE_HistoryGroup, CHANGE_InfoTable, CHANGE_Object, CHANGE_RemoveChild, CHANGE_Shape, CHANGE_Trace, CHANGE_Update, CHANGE_Visibility, changes_, infoTable_, mutable_, name_, subChanges_, SUBTYPE_BackGround, SUBTYPE_Box, SUBTYPE_BranchGroup, SUBTYPE_Cone, SUBTYPE_Cylinder, SUBTYPE_DetailGroup, SUBTYPE_DistanceDetailGroup, SUBTYPE_Group, SUBTYPE_HistoryGroup, SUBTYPE_LatchGroup, SUBTYPE_ModelGraph, SUBTYPE_Polygon, SUBTYPE_Primitive, SUBTYPE_Sphere, SUBTYPE_Text, SUBTYPE_TransformGroup, SUBTYPE_WireBoxGroup, timeStamp_, trace_, traceable_, TYPE_Group, TYPE_Leaf
 
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject
projectorObject_
 
Constructor Summary
Text()
          Creates a default Text instance.
Text(String t)
          Creates a default Text instance with the given string.
Text(String t, int s)
          Creates a default Text instance with the given string and size.
 
Method Summary
protected  void calcBoundingBox(cBoundingBox boundingBox)
          not supported
 Object clone()
          Clones this text
 int getSize()
          Returns the size of the text.
 int getSubType()
          Returns SUBTYPE_TEXT
 String getText()
          Returns the text string.
 int getType()
          Returns TYPE_LEAF
 boolean setSize(int s)
          Sets a new text size (blocked by mutable).
 boolean setText(String t)
          Sets a new text (blocked by mutable).
 
Methods inherited from class de.fhg.igd.earth.model.graph.Shape
getColor, getCullingMode, getHighLight, getHighLightColor, getImage, getStyle, getTransparency, setColor, setCullingMode, setHighLight, setHighLightColor, setImage, setStyle, setTransparency
 
Methods inherited from class de.fhg.igd.earth.model.graph.Leaf
createLeafList, createSubGroupList, createSubNodeList, detach, getVisible, searchDown, searchDown, searchDown, searchDown, searchDownInserter, searchDownInserter, setMutable, setVisible
 
Methods inherited from class de.fhg.igd.earth.model.graph.Node
broadcastCreation, broadcastResetChanges, createParentGroupList, delete, delete, getBoundingBox, getBoundless, getBranchGroup, getCollidable, getGroup, getIcon, getLeafList, getModelGraph, getParent, getParentGroupList, getPickable, getSubGroupList, getSubNodeList, isFocused, move, move, moveTo, publishChanges, resetProjectorObject, searchUp, searchUp, searchUp, searchUp, setBoundless, setCollidable, setIcon, setParent, setPickable
 
Methods inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject
anyChanges, anySubChanges, getChanges, getChanges, getInfoTable, getInfoTableElements, getInfoTableKeys, getInfoTableSize, getInfoTableValues, getMutable, getName, getSubChanges, getSubChanges, getSubTypeName, getTimeStamp, getTrace, getTraceable, putInfo, resetChanges, setChanges, setInfoTable, setName, setSubChanges, setTrace, VectorClone
 
Methods inherited from class de.fhg.igd.earth.model.graph.ProjectorObject
getProjectorObject, setProjectorObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text_

private String text_
the text string


size_

private int size_
the text size

Constructor Detail

Text

public Text()
Creates a default Text instance. text="", size=1.


Text

public Text(String t)
Creates a default Text instance with the given string. size=1.

Parameters:
t - Text

Text

public Text(String t,
            int s)
Creates a default Text instance with the given string and size.

Parameters:
t - Text
s - Size
Method Detail

getType

public int getType()
Returns TYPE_LEAF

Specified by:
getType in class ModelGraphObject
Returns:
TYPE_LEAF

getSubType

public int getSubType()
Returns SUBTYPE_TEXT

Specified by:
getSubType in class ModelGraphObject
Returns:
SUBTYPE_TEXT

getText

public String getText()
Returns the text string.

Returns:
Text

setText

public boolean setText(String t)
Sets a new text (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_SHAPE

Parameters:
t - Text
Returns:
true on success.

getSize

public int getSize()
Returns the size of the text.

Returns:
Size

setSize

public boolean setSize(int s)
Sets a new text size (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_SHAPE

Parameters:
s - Size
Returns:
true on success.

calcBoundingBox

protected void calcBoundingBox(cBoundingBox boundingBox)
not supported

Specified by:
calcBoundingBox in class Node
Parameters:
boundingBox - which will be combined with

clone

public Object clone()
Clones this text

Overrides:
clone in class Shape


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.