|
|||||||||
| 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
org.jscience.mathematics.geometry.polyhedrons.PolyhedronDisplayer
public class PolyhedronDisplayer
The class Kaleidoscope 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 case-nonsensitive applet parameters are:
<APPLET CODE=kaleido.Kaleidoscope 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>
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
UniformPolyhedrons.
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 PolyhedronDisplayer, Polyhedron, UniformPolyhedrons, Vector3D and Rational. This excludes the classes
Kaleido and PolyhedronVRMLOutputter.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
java.applet.Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
java.awt.Panel.AccessibleAWTPanel |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
PolyhedronDisplayer()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
java.lang.String |
getAppletInfo()
|
void |
init()
Initializes the applet. |
void |
paint(java.awt.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(java.awt.Graphics g)
Update the display by computing the new rotation angle and invoking the Polyhedron.paint(org.jscience.mathematics.geometry.polyhedrons.PolyhedronDisplayer, 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.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PolyhedronDisplayer()
| Method Detail |
|---|
public void init()
Kaleido constructor. Reads the applet parametes, sets the display colors,
and build the display buttons.
init in class java.applet.AppletColor,
Buttonpublic java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void start()
start in class java.applet.AppletThread.start()public void stop()
stop in class java.applet.Appletpublic void run()
run in interface java.lang.Runnablepublic void paint(java.awt.Graphics g)
update(java.awt.Graphics).
paint in class java.awt.Containerpublic void update(java.awt.Graphics g)
Polyhedron.paint(org.jscience.mathematics.geometry.polyhedrons.PolyhedronDisplayer, 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 java.awt.Container
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||