org.simbrain.world.visionworld
Class Pixel

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by org.simbrain.world.visionworld.Pixel
All Implemented Interfaces:
Shape, Serializable, Cloneable

public class Pixel
extends Rectangle

The Pixel class represents a unit in the VisionWorld.

Author:
RJB
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
 
Field Summary
static boolean OFF
          The boolean value representing the inactive state of the pixel.
static Color OFF_COLOR
          The color of the inactive pixel.
static boolean ON
          The boolean value representing the activated state of the pixel.
static Color ON_COLOR
          The color of the activated pixel.
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
Pixel()
           
 
Method Summary
 boolean getState()
           
 void setState(boolean state)
           
 void show(Graphics g)
           
 void switchState()
          Switches the state of the pixel.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

ON_COLOR

public static final Color ON_COLOR
The color of the activated pixel.


OFF_COLOR

public static final Color OFF_COLOR
The color of the inactive pixel.


ON

public static final boolean ON
The boolean value representing the activated state of the pixel.

See Also:
Constant Field Values

OFF

public static final boolean OFF
The boolean value representing the inactive state of the pixel.

See Also:
Constant Field Values
Constructor Detail

Pixel

public Pixel()
Method Detail

show

public void show(Graphics g)
Parameters:
g - the graphics for visionworld

switchState

public void switchState()
Switches the state of the pixel.


getState

public boolean getState()
Returns:
the current state of the pixel

setState

public void setState(boolean state)
Parameters:
state - desired state of the pixel