|
Java API by Zvi Har’El |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
kaleido.Scope
public class Scope
The class Scope is loaded by a web browser or by the Java
Applet Viewer. It contains the code decode the HTML parameters and start
displaying the applet embedded in the web page.
The relevant HTML fragment is:
<APPLET CODE=kaleido.Scope ARCHIVE=scope.jar WIDTH=400 HEIGHT=480>
<PARAM NAME=COLOR VALUE=GR>
<IMG SRC=kaleido.gif BORDER=0>
<BR>
Sorry, you need a Java enabled browser to see this in action...
</APPLET>
The case-nonsensitive applet parameters are:
color
RGBL. The first three represent
a color as a combination of the basic colors red, green and
blue. This determines the forefround basic color, with the
backgroung being black. If the letter L, light, is
specified, the background color is determined by the other letters, and the
forground is painted in black.
The default colors are white on black.
input
Uniform.
azimuth
elevation
kaleido is run as a full fledged application, the applet is
embedded within a Kaleido, and the run parameters are explained
there.
The applet archive scope.jar includes
all the classes in this package which are necessary to display an applet.
This includes the classes Scope, Polyhedron, Uniform, Vector3D and Rational. This excludes the classes
Kaleido and Output.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
Panel.AccessibleAWTPanel |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) double |
azimuth
Direction in space of rotation axis. |
private Button |
back
References to buttons. |
(package private) Font |
bigFont
Font for titles. |
(package private) boolean |
blue
Boolean flag describing the color setup. |
(package private) Thread |
clock
An object reference to the clock thread. |
(package private) Color[] |
color
The 16 chosen display colors. |
(package private) static String |
copyright
Copyright notice. |
private boolean |
disabled
True if a button was disabeled. |
(package private) double |
elevation
Direction in space of rotation axis. |
(package private) boolean |
green
Boolean flag describing the color setup. |
(package private) Object |
in
Input source. |
(package private) int |
index
Index of polyhedron in the input. |
(package private) boolean |
light
Boolean flag describing the color setup. |
private long |
lostTime
Accumulated time of pausing in millis. |
private Button |
next
References to buttons. |
(package private) Polyhedron |
P
An object reference to the currently showing polyhedron. |
(package private) boolean |
red
Boolean flag describing the color setup. |
(package private) Font |
smallFont
Font for subtitles. |
private long |
stoppedAt
System current millis when rotation stopped. |
(package private) boolean |
uniform
If true, the uniform polyhedron is on display. |
(package private) static String |
version
Version information. |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Scope()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
private Button |
button(String s)
|
String |
getAppletInfo()
|
void |
init()
Initializes the applet. |
private Polyhedron |
next()
Returns the next polyhedron from the input source. |
void |
paint(Graphics g)
If there is a polylehedron to display, invoke update(java.awt.Graphics). |
void |
run()
The clock thread activity method. |
void |
start()
Start the clock thead. |
void |
stop()
Stop the clock thread. |
void |
update(Graphics g)
Update the display by computing the new rotation angle and invoking the Polyhedron.paint(kaleido.Scope, java.awt.Graphics, double, boolean) method. |
| Methods inherited from class java.applet.Applet |
|---|
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final String version
static final String copyright
Object in
int index
Polyhedron P
boolean uniform
Color[] color
Font bigFont
Font smallFont
Thread clock
boolean red
boolean green
boolean blue
boolean light
double azimuth
double elevation
private long stoppedAt
private long lostTime
private Button next
private Button back
private boolean disabled
| Constructor Detail |
|---|
public Scope()
| Method Detail |
|---|
public void init()
Kaleido constructor. Reads the applet parametes, sets the display colors,
and build the display buttons.
init in class AppletColor,
Buttonpublic String getAppletInfo()
getAppletInfo in class Appletprivate Button button(String s)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void start()
start in class AppletThread.start()public void stop()
stop in class Appletpublic void run()
run in interface Runnablepublic void paint(Graphics g)
update(java.awt.Graphics).
paint in class Containerpublic void update(Graphics g)
Polyhedron.paint(kaleido.Scope, java.awt.Graphics, double, boolean) method. The angle is conmputed from the system
clock, compensating for pausing periods, and a rate of 1 revolution in 5
seconds (12 RPM).
update in class Containerprivate Polyhedron next()
|
Java API by Zvi Har’El |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||