Up: Java Kali Source Code and Documentation
Class Kali
Class Kali
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----Kali
- public class Kali
- extends Applet
Kali is the top level Applet class for Kali; i.e. this is where it
all begins. The init() method of this
class creates the various objects which comprise Kali and lays out
the main window.
It generally works as follows:
- Create a KaliCanvas
object; this is the object which
manages the various coordinate systems that Kali uses.
- Create a Panorama
object, and connect the KaliCanvas to it.
The Panorama object is where the math happens; it keeps
track of the current group, and applies the group actions
to draw individual line segments in the KaliCanvas.
- Create a DrawPanel
object, and connect the Panorama and
KaliCanvas objects to it. The DrawPanel object is the
actual drawing area; it handles mouse events related to
drawing, and maintains the list of segments to be drawn.
- Create a new ControlPanel
object, and connect the Kali
object (applet id), DrawPanel, and Panorama objects to it.
- Lay out the ControlPanel and DrawPanel in the window.
The other classes of interest are
SymmetryGroup, which represents
a group, and
SymmetryGroups, which holds a
list of all the groups that the program knows about.
- See Also:
- Panorama, DrawPanel, ControlPanel, KaliCanvas, SymmetryGroup, SymmetryGroups

Kali()

getImageNow(String)
- Load an image immediately.
handleEvent(Event)
init()
- Initialize the applet; this is where we create the objects that
the applet uses, connect them up to each other, and lay out the
window.
main(String[])
redraw()

Kali
public Kali()

getImageNow
public Image getImageNow(String imagePath)
- Load an image immediately. Kali uses this to load an image
containing its button bitmaps from the server. This method will
not return until the image is finished loading (The Applet
getImage() method always returns immediately, while the image
loads in another thread. In our case, however, we want to wait
until the image has finished loading before continuing, because
the next thing we do is carve the image up into individual
buttons. This all happens in the constructor for the
ControlPanel object.)
init
public void init()
- Initialize the applet; this is where we create the objects that
the applet uses, connect them up to each other, and lay out the
window. See the introduction to the
Kali class above for more details on what happens here.
- Overrides:
- init in class Applet
redraw
public void redraw()
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class Component
main
public static void main(String args[])
Up: Java Kali Source Code and Documentation
The Geometry Center Home Page
Author: Mark Phillips
Comments to:
webmaster@www.geom.uiuc.edu
Created: Sep 16 1996 ---
Last modified: Sep 18 1996