Class ERComponent

java.lang.Object
  |
  +--ERComponent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Attribute, Connection, Entity, ERSet, Relation

public abstract class ERComponent
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  Rect bounds
           
protected  ERPaintArea container
           
protected  java.awt.Font font
           
protected  java.lang.String name
           
protected  int nameHeight
           
protected  boolean selected
           
protected  int textX
           
protected  int textY
           
protected  int x
           
protected  int y
           
 
Constructor Summary
ERComponent()
           
ERComponent(java.lang.String name, java.awt.Font font, ERPaintArea container)
           
 
Method Summary
 void addAttribute(Attribute a)
           
abstract  void change()
           
abstract  void delete()
           
 java.awt.geom.Rectangle2D getBounds()
           
abstract  java.awt.Point getCoord(int x, int y)
           
 boolean isSelected()
           
abstract  void paint(java.awt.Graphics g)
           
 void removeAttribute(Attribute a)
           
 void rename(java.lang.String name)
           
 void select(boolean b)
           
 void setXY(int x, int y)
           
 void translate(int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected ERPaintArea container

font

protected java.awt.Font font

selected

protected boolean selected

name

protected java.lang.String name

bounds

protected Rect bounds

nameHeight

protected int nameHeight

textX

protected int textX

textY

protected int textY

x

protected int x

y

protected int y
Constructor Detail

ERComponent

public ERComponent()

ERComponent

public ERComponent(java.lang.String name,
                   java.awt.Font font,
                   ERPaintArea container)
Method Detail

rename

public void rename(java.lang.String name)

paint

public abstract void paint(java.awt.Graphics g)

removeAttribute

public void removeAttribute(Attribute a)

addAttribute

public void addAttribute(Attribute a)

delete

public abstract void delete()

change

public abstract void change()

getBounds

public java.awt.geom.Rectangle2D getBounds()

getCoord

public abstract java.awt.Point getCoord(int x,
                                        int y)

setXY

public void setXY(int x,
                  int y)

translate

public void translate(int x,
                      int y)

select

public void select(boolean b)

isSelected

public boolean isSelected()