swarm.gui
Interface Raster

All Known Subinterfaces:
ZoomRaster
All Known Implementing Classes:
RasterImpl, ZoomRasterImpl

public interface Raster
extends ArchivedGeometryWidgetS, ArchivedGeometryWidget

A two dimension color display class.. 2 dimensional, colour pixel images. Raster is based on a Tk frame widget with our own code for fast display of images. You can draw coloured dots on a Raster, or generic Drawers. Raster widgets are double buffered - the pixels you draw are not actually put on the screen until drawSelf is called. In addition, Rasters handle mouse clicks.


Method Summary
 Object draw$X$Y(Object drawer, int x, int y)
          Draw an object at a given position.
 Object drawPointX$Y$Color(int x, int y, byte c)
          Draw a point at the given coordinates with the given color.
 Object drawSelf()
          Draw the raster to the display.
 Object ellipseX0$Y0$X1$Y1$Width$Color(int x0, int y0, int x1, int y1, int penWidth, byte c)
          Draw an ellipse of given geometry, pen width, and color.
 Object erase()
          Erase the raster.
 Object fillRectangleX0$Y0$X1$Y1$Color(int x0, int y0, int x1, int y1, byte color)
          Fill a rectangle of given geometry and color.
 Object lineX0$Y0$X1$Y1$Width$Color(int x0, int y0, int x1, int y1, int penWidth, byte c)
          Draw a line of given geometry, pen width, and color.
 Object rectangleX0$Y0$X1$Y1$Width$Color(int x0, int y0, int x1, int y1, int penWidth, byte c)
          Draw a rectangle of given geometry, pen width, and color.
 Object setButton$Client$Message(int n, Object c, Selector sel)
          Configure at mouse button to send a message to a given client object.
 Object setColormap(Colormap c)
          Set the palette for this raster.
 Object setWidth$Height(int newWidth, int newHeight)
          Set the size of the raster.
 
Methods inherited from interface swarm.gui.ArchivedGeometryWidget
drop, updateArchiver
 
Methods inherited from interface swarm.gui.Widget
disableDestroyNotification, enableDestroyNotification$notificationMethod, getDestroyedFlag, getHeight, getParent, getTopLevel, getWidgetName, getWidth, getWindowGeometry, getX, getY, pack, packBeforeAndFillLeft$expand, packFill, packFillLeft, packForgetAndExpand, packToRight, setActiveFlag, setHeight, setWidth, setWindowGeometry, setWindowTitle, setX$Y
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 

Method Detail

setColormap

public Object setColormap(Colormap c)
Set the palette for this raster.

drawPointX$Y$Color

public Object drawPointX$Y$Color(int x,
                                 int y,
                                 byte c)
Draw a point at the given coordinates with the given color.

drawSelf

public Object drawSelf()
Draw the raster to the display.

setWidth$Height

public Object setWidth$Height(int newWidth,
                              int newHeight)
Set the size of the raster.

setButton$Client$Message

public Object setButton$Client$Message(int n,
                                       Object c,
                                       Selector sel)
Configure at mouse button to send a message to a given client object.

fillRectangleX0$Y0$X1$Y1$Color

public Object fillRectangleX0$Y0$X1$Y1$Color(int x0,
                                             int y0,
                                             int x1,
                                             int y1,
                                             byte color)
Fill a rectangle of given geometry and color.

ellipseX0$Y0$X1$Y1$Width$Color

public Object ellipseX0$Y0$X1$Y1$Width$Color(int x0,
                                             int y0,
                                             int x1,
                                             int y1,
                                             int penWidth,
                                             byte c)
Draw an ellipse of given geometry, pen width, and color.

lineX0$Y0$X1$Y1$Width$Color

public Object lineX0$Y0$X1$Y1$Width$Color(int x0,
                                          int y0,
                                          int x1,
                                          int y1,
                                          int penWidth,
                                          byte c)
Draw a line of given geometry, pen width, and color.

rectangleX0$Y0$X1$Y1$Width$Color

public Object rectangleX0$Y0$X1$Y1$Width$Color(int x0,
                                               int y0,
                                               int x1,
                                               int y1,
                                               int penWidth,
                                               byte c)
Draw a rectangle of given geometry, pen width, and color.

draw$X$Y

public Object draw$X$Y(Object drawer,
                       int x,
                       int y)
Draw an object at a given position.

erase

public Object erase()
Erase the raster.