All Methods
zio package

context

zio
Class ZPixels


java.lang.Object

  extended byzio.ZObject

      extended byzio.ZPixels


public class ZPixels
extends ZObject

This, AS YET UNIMPLEMENTED, class will define an area of the screen where you can plot colored points.


Constructor Summary
ZPixels()
           
 
Method Summary
protected  void action(boolean isLeftButton, java.awt.Point point)
          For execution when user clicks the mouse over the ZPixels.
 ZPixels background(java.awt.Color c)
          Suffix that sets the background color.
 void clear()
           
 ZPixels color(java.awt.Color c)
          Sets the background color of the ZPixels.
 void draw()
           
protected  void enableMouseAction()
          Method for causing the action() method to be executed upon mouse clicks.
 void plot(java.awt.Color color, java.awt.Point p)
           
 ZPixels size(java.awt.Dimension desiredSize)
          Suffix that overrides the default size.
 
Methods inherited from class zio.ZObject
getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZPixels


public ZPixels()
Method Detail

size


public final ZPixels size(java.awt.Dimension desiredSize)
Suffix that overrides the default size.

Parameters:
desiredSize - the desired size

color


public final ZPixels color(java.awt.Color c)
Sets the background color of the ZPixels. Need not be used as a suffix but when it is used as a suffix the effect is the same as the background suffix

Parameters:
c - the desired color

background


public final ZPixels background(java.awt.Color c)
Suffix that sets the background color. The effect is identical to the color method.

Parameters:
c - the desired background color

plot


public final void plot(java.awt.Color color,
                       java.awt.Point p)

clear


public final void clear()

draw


public final void draw()

enableMouseAction


protected void enableMouseAction()
Method for causing the action() method to be executed upon mouse clicks. Has no discernable effect unless the action() method is overridden in a subclass.


action


protected void action(boolean isLeftButton,
                      java.awt.Point point)
For execution when user clicks the mouse over the ZPixels. In this base class the action() method does nothing and is not invoked.

To cause this method to be invoked whenever the user clicks the mouse,

  1. override the method in a subclass, and
  2. in the your subclass's constructor, execute enableMouseAction()
You can also execute suffixes inside this constructor rather than waiting for an object to be created. (When overriding a ZObject class, it is usually easier to use suffixes this way.)

The point passed to action() has the upper lefthand corner of the component as its origin. The y coordinate is positive in a downward direction.

Parameters:
isLeftButton - true when the clicked button was the left or "first" button
point - coordinates of the point where the left mouse button was released
See Also:
Point

author
context