Package objectdraw

This is a modified version of the objectdraw library originally created by Kim Bruce, Andrea Danyluk, and Thomas Murtagh.

See:
          Description

Interface Summary
ClientListener The ClientListener interface specifies which methods an object needs to have in order to be able to function as a client listener.
Drawable1DInterface Drawable1DInterface is the interface shared by all one dimensional graphical objects - that is, Lines and AngLines.
Drawable2DInterface Drawable2DInterface is the interface shared by all two dimensional graphical objects - rectangles, ovals, arcs, and text.
DrawableInterface DrawableInterface is the interface shared by all objects that can be drawn on a canvas.
DrawableStrokeInterface DrawableStrokeInterface is the interface shared by all objects that consist of lines, instead of filled in areas.
DrawingCanvas DrawingCanvas is the interface listing the methods of the canvas on which objects are placed.
LocatableInterface LocatableInterface is an interface shared by all objects except for lines, containing the methods for retrieving the object's reference point.
Resizable2DInterface Resizable2DInterface is the interface shared by all two dimensional object that can be resized.
ServerListener The ServerListener interface specifies what methods an object needs in order to be able to function as a server listener, the object managing a server.
 

Class Summary
ActiveObject The ActiveObject class allows you to create a separate "thread" of a program that runs its own code at its own pace, independently of other code that is running.
AngLine The AngLine class provides a different way to make lines: instead of specifying start and end points, you make an AngLine by providing a start point, the length of the line, and the direction (as an angle in radians) that the line should extend from the start point.
Animation Animation is similar to VisibleImage, but rather than simply displaying an unchanging image, it displays an animation.
Client A Client makes a connection to another computer (the server) and can send messages to the server and receive messages back.
Controller Controller is the class you should extend if you want to create an applet or window that contains your own custom GUI instead of a DrawingCanvas.
DrawableIterator A DrawableIterator is a list of DrawableInterface objects that you can read through one by one in order.
EventTimer EventTimer will repeatedly send a message to an object by calling one of its methods with a preset list of parameters.
FilledArc A FilledArc is a piece of an oval, shaped like a slice of pie.
FilledOval A FilledOval is an oval filled in with some color.
FilledRect A FilledRect is a rectangle filled in with some color.
FilledRoundedRect A FilledRoundedRect is a rectangle with rounded corners, filled in with some color.
FrameController FrameController is a Controller that automatically pops up in its own frame (window) when it is constructed.
FramedArc A FramedArc is a curved line that forms some portion of an oval.
FramedOval A FramedOval is an oval framed with some color.
FramedRect A FramedRect is a rectangle framed with some color.
FramedRoundedRect A FramedRoundedRect is a rectangle with rounded corners, framed with some color.
FrameWindowController FrameWindowController is a WindowController that automatically pops up in its own frame (window) when it is constructed.
KeyInterpreter KeyInterpreter is the class that processes key events and calls the appropriate methods in WindowController.
Line A Line represents a line segment connecting two points on the screen.
Location A Location object represents an (x, y) point on the screen.
MouseInterpreter MouseInterpreter is the class that processes mouse events and calls the appropriate methods in WindowController.
Network The Network class will allow you to set up networked communication between copies of your program running on different computers on a local area network (LAN).
RandomDoubleGenerator A RandomDoubleGenerator will produce a string of random doubles that are in the range it was created to produce.
RandomIntGenerator A RandomIntGenerator will produce a string of random ints that are in the range it was created to produce.
Server A Server runs on one computer and allows other computers (clients) to connect to it.
SizeablePanel SizeablePanel is a JPanel that allows you to set its size.
Text A Text object displays some text on the screen.
Turtle A Turtle object allows you to draw lines and filled-in polygons by giving instructions to a computer creature called a "turtle" that moves around on the screen and draws a line as it goes.
VisibleImage A VisibleImage is an image that can be placed on a canvas.
WindowController WindowController in the class that defines how you interact with the drawing canvas of your program.
 

Package objectdraw Description

This is a modified version of the objectdraw library originally created by Kim Bruce, Andrea Danyluk, and Thomas Murtagh. That library was used in programming classes at Williams college, and in the textbook Java: an Eventful Approach. The purpose of the library is to simplify the use of graphical objects and events so that they will be accessible to introductory students. The original library and more information are available at:

http://eventfuljava.cs.williams.edu/

This version of the library was created by Russell Zahniser, a teacher in the Boston Public Schools, for use in introductory Java classes there. It contains several improvements over the original library:


This new version of ObjectDraw is entirely backwards-compatible with the old version. So, any code in the book, or any code that works with the old library, will also work with the new one, although that code will have to be compiled again. There is an alternate form of this documentation that groups its descriptions of the library on the basis of tasks you might want to accomplish with it, rather than individual classes. You can access that documentation, and the high school class that I designed around this book and library, from my website:

http://www.zahniser.net/~russell/computer/