org.simbrain.world.visionworld
Class Pixel
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
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
|
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. |
|
Constructor Summary |
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 |
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
Pixel
public Pixel()
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