Up: Java Kali Source Code and Documentation

Class Panorama

Class Panorama

java.lang.Object
   |
   +----Panorama

class Panorama
extends Object
The Panorama object is where the math happens in Kali. It keeps track of the current group, and applies that group's action to the line segments as they are drawn. (The DrawPanel object, which stores the list of line segments, called the Panorama's drawSegment() method once for each line segment.)
See Also:
DrawPanel, KaliCanvas

Constructor Index

 o Panorama(KaliCanvas)
Create a new Panorama object

Method Index

 o drawSegment(Segment, Color)
Draw a single segment in the given color under the action of the current group.
 o getGroup()
Return the current group
 o prepareToDraw()
Do the internal calculations necessary to prepare for drawing with the current KaliCanvas coordinate systems.
 o setGroup(int)
Set the current group.

Constructors

 o Panorama
  public Panorama(KaliCanvas kaliCanvas)
Create a new Panorama object
Parameters:
kaliCanvas - The KaliCanvas object that this Panorama should use for drawing.

Methods

 o setGroup
  public void setGroup(int index)
Set the current group.
Parameters:
index - The group index; should be one of the constants defined in Constants.java, e.g. GROUP_w2222 or GROUP_w3x3, etc.
 o getGroup
  public SymmetryGroup getGroup()
Return the current group
 o prepareToDraw
  public boolean prepareToDraw()
Do the internal calculations necessary to prepare for drawing with the current KaliCanvas coordinate systems. This should be called immediately before a sequence of drawSegment() calls to draw the screen, but after the KaliCanvas object's coordinate systems have been set.
 o drawSegment
  public void drawSegment(Segment s,
                          Color c)
Draw a single segment in the given color under the action of the current group.


Up: Java Kali Source Code and Documentation

[HOME] The Geometry Center Home Page

Author: Mark Phillips
Comments to: webmaster@www.geom.uiuc.edu
Created: Sep 16 1996 --- Last modified: Sep 18 1996