<HTML>
<HEAD>
<TITLE>Untitled file 'Kali.html'</TITLE>
<!-- Copyright (c) 1996 by The Geometry Center. All Rights Reserved. -->
</HEAD>
<BODY BGCOLOR="FFFFFF">
<!-- *Navigation-Links -->
<B>Up:</B> <A HREF="source.html"><I>Java Kali Source Code and Documentation</I></A><BR>
<HR>
<p>

<!-- *Begin-Document-Body -->
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Sep 16 15:20:48 CDT 1996 -->
<A NAME="_top_"></A>
<TITLE>
  Class Kali
</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<H1>Class Kali</H1>
<PRE>
<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.Object.html#_top_">java.lang.Object</A>
   |
   +----<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Component.html#_top_">java.awt.Component</A>
           |
           +----<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Container.html#_top_">java.awt.Container</A>
                   |
                   +----<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Panel.html#_top_">java.awt.Panel</A>
                           |
                           +----<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.applet.Applet.html#_top_">java.applet.Applet</A>
                                   |
                                   +----Kali
</PRE>
<HR>
<DL>
  <DT>public class <B>Kali</B>
  <DT>extends <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.applet.Applet.html#_top_">Applet</A>
</DL>
<A NAME="_intro_">
Kali is the top level Applet class for Kali; i.e. this is where it
all begins.  The <A HREF="#init()"><B>init</B></A>() method of this
class creates the various objects which comprise Kali and lays out
the main window.
<p>
It generally works as follows:
<p>
<UL>
  <LI>Create a <A HREF="KaliCanvas.html#_top_">KaliCanvas</A>
	 object; this is the object which
	 manages the various coordinate systems that Kali uses.
  <LI>Create a <A HREF="Panorama.html#_top_">Panorama</A>
	 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.
  <LI>Create a <A HREF="DrawPanel.html#_top_">DrawPanel</A>
	 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.
  <LI>Create a new <A HREF="ControlPanel.html#_top_">ControlPanel</A>
	 object, and connect the Kali
	 object (applet id), DrawPanel, and Panorama objects to it.
  <LI>Lay out the ControlPanel and DrawPanel in the window.
</UL>
<p>
The other classes of interest are
<A HREF="SymmetryGroup.html#_top_">SymmetryGroup</A>, which represents
a group, and
<A HREF="SymmetryGroups.html#_top_">SymmetryGroups</A>, which holds a
list of all the groups that the program knows about.
<DL>
    <DT><B>See Also:</B>
    <DD><A HREF="Panorama.html#_top_">Panorama</A>, <A HREF="DrawPanel.html#_top_">DrawPanel</A>, <A HREF="ControlPanel.html#_top_">ControlPanel</A>, <A HREF="KaliCanvas.html#_top_">KaliCanvas</A>, <A HREF="SymmetryGroup.html#_top_">SymmetryGroup</A>, <A HREF="SymmetryGroups.html#_top_">SymmetryGroups</A>
</DL>
<HR>
<A NAME="index"></A>
<H2><IMG SRC="images/constructor-index.gif" WIDTH=275 HEIGHT=38 ALT="Constructor Index"></H2>
<DL>
  <DT><IMG SRC="images/yellow-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#Kali()"><B>Kali</B></A>()
<DD></DL>
<H2><IMG SRC="images/method-index.gif" WIDTH=207 HEIGHT=38 ALT="Method Index"></H2>
<DL>
  <DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#getImageNow(java.lang.String)"><B>getImageNow</B></A>(String)
  <DD>Load an image immediately.
  <DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#handleEvent(java.awt.Event)"><B>handleEvent</B></A>(Event)
<DD><DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#init()"><B>init</B></A>()
  <DD>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.
  <DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#main(java.lang.String[])"><B>main</B></A>(String[])
<DD><DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#redraw()"><B>redraw</B></A>()
<DD></DL>
<A NAME="constructors"></A>
<H2><IMG SRC="images/constructors.gif" WIDTH=231 HEIGHT=38 ALT="Constructors"></H2>
<A NAME="Kali"></A>
<A NAME="Kali()"><IMG SRC="images/yellow-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<B>Kali</B>
<PRE>
  public Kali()
</PRE>
<A NAME="methods"></A>
<H2><IMG SRC="images/methods.gif" WIDTH=151 HEIGHT=38 ALT="Methods"></H2>
<A NAME="getImageNow(java.lang.String)"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="getImageNow"><B>getImageNow</B></A>
<PRE>
  public <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Image.html#_top_">Image</A> getImageNow(<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.String.html">String</A> imagePath)
</PRE>
<DL>
  <DD>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.)
</DL>
<A NAME="init()"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="init"><B>init</B></A>
<PRE>
  public void init()
</PRE>
<DL>
  <DD>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 <A HREF="#_intro_">introduction to the
Kali class</A> above for more details on what happens here.
  <DL>
    <DT><B>Overrides:</B>
    <DD><A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.applet.Applet.html#init()">init</A> in class <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.applet.Applet.html">Applet</A>
  </DL>
</DL>
<A NAME="redraw()"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="redraw"><B>redraw</B></A>
<PRE>
  public void redraw()
</PRE>
<A NAME="handleEvent(java.awt.Event)"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="handleEvent"><B>handleEvent</B></A>
<PRE>
  public boolean handleEvent(<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Event.html#_top_">Event</A> e)
</PRE>
<DL>
  <DL>
    <DT><B>Overrides:</B>
    <DD><A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Component.html#handleEvent(java.awt.Event)">handleEvent</A> in class <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.awt.Component.html">Component</A>
  </DL>
</DL>
<A NAME="main(java.lang.String[])"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="main"><B>main</B></A>
<PRE>
  public static void main(<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.String.html#_top_">String</A> args[])
</PRE>
<!-- *End-Document-Body -->
<p>

<!-- *Navigation-Links -->
<HR>
<B>Up:</B> <A HREF="source.html"><I>Java Kali Source Code and Documentation</I></A><BR>

<!-- *GC-Common-Footer -->
<HR>
<NOBR><A HREF="/"><IMG SRC="/pix/home.gif" ALT="[HOME]" ALIGN=MIDDLE></A>
<I>The Geometry Center Home Page</I></NOBR>
<p>
Author: <A HREF="http://www.geom.umn.edu/locate/mbp">Mark Phillips</A><BR>
Comments to:
<A HREF="/admin/mail/webmaster.html">webmaster@geom.umn.edu</A><BR>
Created:  Sep 16 1996 --- 
<!-- hhmts start -->
Last modified: Sep 18 1996
<!-- hhmts end -->
</BODY>
</HTML>
