EVolve.util.painters.shapes
Class Shape

java.lang.Object
  |
  +--EVolve.util.painters.shapes.Shape
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Ball, Box, Line

public abstract class Shape
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
protected  java.awt.Color color
           
protected  java.util.HashMap consumerMap
           
protected  long entity_id
           
protected  long entity_type
           
 int x
           
 int y
           
 
Constructor Summary
Shape(long entity_type, long entity_id)
           
 
Method Summary
 void addConsumer(Shape consumer, int gravity)
           
 java.lang.Object clone()
           
abstract  void draw(java.awt.Graphics2D g)
           
protected  void drawArrows(java.awt.Graphics2D g2)
           
abstract  void fill(java.awt.Graphics2D g)
           
 java.awt.Color getColor()
           
 java.util.HashMap getConsumers()
           
 long getEntityID()
           
 long getEntityType()
           
abstract  int getHeight()
           
abstract  java.lang.String getName()
           
 java.awt.Rectangle getPosition()
           
abstract  int getWidth()
           
abstract  boolean insideShape(int x, int y)
           
 void move(int x, int y)
           
 void setColor(java.awt.Color color)
           
abstract  void setSize(int width, int height)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x

y

public int y

entity_id

protected long entity_id

entity_type

protected long entity_type

consumerMap

protected java.util.HashMap consumerMap

color

protected java.awt.Color color
Constructor Detail

Shape

public Shape(long entity_type,
             long entity_id)
Method Detail

getEntityID

public long getEntityID()

getPosition

public java.awt.Rectangle getPosition()

move

public void move(int x,
                 int y)

addConsumer

public void addConsumer(Shape consumer,
                        int gravity)

getConsumers

public java.util.HashMap getConsumers()

getEntityType

public long getEntityType()

setColor

public void setColor(java.awt.Color color)

getColor

public java.awt.Color getColor()

drawArrows

protected void drawArrows(java.awt.Graphics2D g2)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

draw

public abstract void draw(java.awt.Graphics2D g)

fill

public abstract void fill(java.awt.Graphics2D g)

getName

public abstract java.lang.String getName()

insideShape

public abstract boolean insideShape(int x,
                                    int y)

getWidth

public abstract int getWidth()

getHeight

public abstract int getHeight()

setSize

public abstract void setSize(int width,
                             int height)