jcreek.cke.conceptview
Class VisualEntity

java.lang.Object
  extended byjcreek.cke.conceptview.VisualEntity
All Implemented Interfaces:
java.lang.Cloneable, Node, java.io.Serializable

public class VisualEntity
extends java.lang.Object
implements Node

See Also:
Serialized Form

Field Summary
protected  java.awt.Color DEFAULT_COLOR
           
protected  double depth_
           
protected  java.awt.Font entityFont
           
 java.lang.Object entityID
           
protected  java.awt.Color FONT_COLOR
           
protected  double height
           
protected  double scale
           
protected  boolean selected
           
protected  double width
           
protected  double x_
           
protected  double y_
           
protected  double z_
           
 
Constructor Summary
VisualEntity(Entity myEntity, int startX, int startY)
           
VisualEntity(Entity myEntity, java.awt.Point pos)
           
 
Method Summary
protected  void addChild(Node child)
           
 boolean addEdge(Edge edge)
           
 java.lang.Object clone()
           
 boolean containsChild(Node child)
           
 boolean containsEdge(Edge edge)
           
 void draw(java.awt.Graphics2D graphics, Matrix33 transform)
           
 void draw(java.awt.Graphics2D graphics, Matrix33 transform, double currentScale)
           
 boolean equals(java.lang.Object ob)
           
 DDimension getBoundingBox()
           
 java.util.Iterator getChildIterator()
           
 int getCount(Relation relation)
           
 java.awt.geom.Rectangle2D.Double getDrawBounds(java.awt.Graphics g)
           
 java.util.Iterator getEdgeIterator()
           
 Entity getEntity()
           
 int getNumChildren()
           
 DPoint getPosition()
           
protected  java.awt.geom.Rectangle2D.Double getTextBounds(java.awt.Graphics g)
           
 int hashCode()
           
 DPoint intersectWithLineTo(DPoint to)
           
 boolean isSelected()
           
 boolean relationIsActive(Relation relation)
           
 boolean relationIsActive(RelationType rcd)
           
 boolean relationIsActive(java.lang.String relationName)
           
 void removeChild(Node child)
           
 void removeEdge(Edge edge)
           
 boolean represents(Entity e)
           
 void setBoundingBox(DDimension new_bbox)
           
 void setBoundingBox(double new_width, double new_height)
           
 void setPosition(double new_x, double new_y)
           
 void setPosition(double new_x, double new_y, double new_z)
           
 void setPosition(DPoint new_position)
           
 void setSelected(boolean selected)
           
 void slide(int xoffs, int yoffs)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entityID

public java.lang.Object entityID

scale

protected double scale

entityFont

protected java.awt.Font entityFont

selected

protected boolean selected

width

protected double width

height

protected double height

depth_

protected double depth_

x_

protected double x_

y_

protected double y_

z_

protected double z_

DEFAULT_COLOR

protected java.awt.Color DEFAULT_COLOR

FONT_COLOR

protected java.awt.Color FONT_COLOR
Constructor Detail

VisualEntity

public VisualEntity(Entity myEntity,
                    java.awt.Point pos)

VisualEntity

public VisualEntity(Entity myEntity,
                    int startX,
                    int startY)
Method Detail

represents

public boolean represents(Entity e)

draw

public void draw(java.awt.Graphics2D graphics,
                 Matrix33 transform)

draw

public void draw(java.awt.Graphics2D graphics,
                 Matrix33 transform,
                 double currentScale)

setPosition

public void setPosition(DPoint new_position)

setPosition

public void setPosition(double new_x,
                        double new_y,
                        double new_z)

setBoundingBox

public void setBoundingBox(double new_width,
                           double new_height)

setBoundingBox

public void setBoundingBox(DDimension new_bbox)

getBoundingBox

public DDimension getBoundingBox()
Specified by:
getBoundingBox in interface Node

slide

public void slide(int xoffs,
                  int yoffs)

intersectWithLineTo

public DPoint intersectWithLineTo(DPoint to)

getDrawBounds

public java.awt.geom.Rectangle2D.Double getDrawBounds(java.awt.Graphics g)

getTextBounds

protected java.awt.geom.Rectangle2D.Double getTextBounds(java.awt.Graphics g)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

getPosition

public DPoint getPosition()
Specified by:
getPosition in interface Node

setPosition

public void setPosition(double new_x,
                        double new_y)
Specified by:
setPosition in interface Node

setSelected

public void setSelected(boolean selected)
Specified by:
setSelected in interface Node

isSelected

public boolean isSelected()
Specified by:
isSelected in interface Node

addEdge

public boolean addEdge(Edge edge)
Specified by:
addEdge in interface Node

removeEdge

public void removeEdge(Edge edge)
Specified by:
removeEdge in interface Node

containsEdge

public boolean containsEdge(Edge edge)
Specified by:
containsEdge in interface Node

removeChild

public void removeChild(Node child)
Specified by:
removeChild in interface Node

containsChild

public boolean containsChild(Node child)
Specified by:
containsChild in interface Node

getChildIterator

public java.util.Iterator getChildIterator()
Specified by:
getChildIterator in interface Node

getNumChildren

public int getNumChildren()
Specified by:
getNumChildren in interface Node

getEdgeIterator

public java.util.Iterator getEdgeIterator()
Specified by:
getEdgeIterator in interface Node

addChild

protected void addChild(Node child)

getEntity

public Entity getEntity()
Specified by:
getEntity in interface Node

relationIsActive

public boolean relationIsActive(RelationType rcd)
Specified by:
relationIsActive in interface Node

relationIsActive

public boolean relationIsActive(Relation relation)
Specified by:
relationIsActive in interface Node

relationIsActive

public boolean relationIsActive(java.lang.String relationName)
Specified by:
relationIsActive in interface Node

getCount

public int getCount(Relation relation)
Specified by:
getCount in interface Node

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object ob)

toString

public java.lang.String toString()


Created at IDI, NTNU by the Artificial Intelligence and Learning group