|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet javax.swing.JApplet ch.randelshofer.rubik.virtual.AbstractVirtualCubeApplet
public abstract class AbstractVirtualCubeApplet
This is the base class for Applets featuring a Rubik's Cube like puzzle which can be taken apart.
Nested Class Summary | |
---|---|
class |
AbstractVirtualCubeApplet.EventHandler
|
Nested classes/interfaces inherited from class javax.swing.JApplet |
---|
javax.swing.JApplet.AccessibleJApplet |
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 | |
---|---|
protected idx3d_JCanvas |
canvas
|
protected AbstractCubeIdx3D |
cube3d
|
protected AbstractVirtualCubeApplet.EventHandler |
cube3DHandler
|
protected float |
defaultScaleFactor
|
protected java.util.ResourceBundle |
labels
|
protected AbstractVirtualCubeApplet.EventHandler |
linkHandler
|
protected java.lang.String |
linkTarget
Target frame for sticker links. |
protected AbstractVirtualCubeApplet.EventHandler |
partsHandler
|
protected java.util.Random |
random
|
protected idx3d_Scene |
scene
|
protected java.lang.String[] |
stickerLinks
Each array element holds a link on a sticker of the cube. |
protected AbstractVirtualCubeApplet.EventHandler |
stickersHandler
|
protected int |
tool
|
protected AbstractVirtualCubeApplet.EventHandler |
twistHandler
|
Fields inherited from class javax.swing.JApplet |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
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 | |
---|---|
AbstractVirtualCubeApplet()
|
Method Summary | |
---|---|
protected boolean |
canBeDisassembled()
|
protected abstract AbstractCubeIdx3D |
createCube3D()
|
protected java.awt.Image |
decodeBase64Image(java.lang.String base64)
|
void |
destroy()
Destroys the applet. |
protected void |
doInit()
Initializes the applet. |
java.lang.String |
getAppletInfo()
Returns information about this applet. |
protected java.lang.String |
getAppletVersion()
|
protected AbstractVirtualCubeApplet.EventHandler |
getCube3DHandler()
|
protected AbstractVirtualCubeApplet.EventHandler |
getLinkHandler()
|
java.lang.String |
getParameter(java.lang.String name)
|
java.lang.String[][] |
getParameterInfo()
Returns information about the parameters that are understood by this applet. |
protected AbstractVirtualCubeApplet.EventHandler |
getPartsHandler()
|
protected AbstractVirtualCubeApplet.EventHandler |
getStickersHandler()
|
protected AbstractVirtualCubeApplet.EventHandler |
getTwistHandler()
|
void |
init()
Initializes the applet. |
static void |
main(AbstractVirtualCubeApplet applet)
|
protected void |
readCubeAttributes(nanoxml.XMLElement resources,
DefaultCubeAttributes attr)
Reads cube attributes from the specified XML Element. |
protected void |
readParameters()
|
protected void |
readStateFromCookies()
|
protected void |
reset()
|
protected void |
resetCanvas()
|
protected void |
scramble()
|
void |
stop()
Flush resources used by the applet. |
protected void |
writeStateToCookies()
|
Methods inherited from class javax.swing.JApplet |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.applet.Applet |
---|
getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, 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, 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 |
Field Detail |
---|
protected AbstractCubeIdx3D cube3d
protected int tool
protected idx3d_JCanvas canvas
protected java.util.Random random
protected idx3d_Scene scene
protected java.util.ResourceBundle labels
protected float defaultScaleFactor
protected AbstractVirtualCubeApplet.EventHandler cube3DHandler
protected AbstractVirtualCubeApplet.EventHandler twistHandler
protected AbstractVirtualCubeApplet.EventHandler linkHandler
protected AbstractVirtualCubeApplet.EventHandler stickersHandler
protected AbstractVirtualCubeApplet.EventHandler partsHandler
protected java.lang.String[] stickerLinks
protected java.lang.String linkTarget
Constructor Detail |
---|
public AbstractVirtualCubeApplet()
Method Detail |
---|
public void init()
init
in class java.applet.Applet
public void stop()
stop
in class java.applet.Applet
public void destroy()
destroy
in class java.applet.Applet
public java.lang.String getParameter(java.lang.String name)
getParameter
in class java.applet.Applet
protected void doInit() throws AppletParameterException
AppletParameterException
protected void readParameters() throws AppletParameterException
AppletParameterException
protected void readStateFromCookies()
protected void writeStateToCookies()
protected void readCubeAttributes(nanoxml.XMLElement resources, DefaultCubeAttributes attr)
resources
- The XML element which holds the attribute data.attr
- The CubeAttributes onto which we set the attribute values.protected java.awt.Image decodeBase64Image(java.lang.String base64)
protected abstract AbstractCubeIdx3D createCube3D()
protected boolean canBeDisassembled()
protected AbstractVirtualCubeApplet.EventHandler getCube3DHandler()
protected AbstractVirtualCubeApplet.EventHandler getTwistHandler()
protected AbstractVirtualCubeApplet.EventHandler getLinkHandler()
protected AbstractVirtualCubeApplet.EventHandler getStickersHandler()
protected AbstractVirtualCubeApplet.EventHandler getPartsHandler()
protected void scramble()
protected void resetCanvas()
protected void reset()
public java.lang.String[][] getParameterInfo()
Strings
describing these parameters.
Each element of the array should be a set of three
Strings
containing the name, the type, and a
description. For example:
String pinfo[][] = { {"fps", "1-10", "frames per second"}, {"repeat", "boolean", "repeat image loop"}, {"imgs", "url", "images directory"} };
The implementation of this method provided by the
Applet
class returns null
.
getParameterInfo
in class java.applet.Applet
protected java.lang.String getAppletVersion()
public java.lang.String getAppletInfo()
String
containing information
about the author, version, and copyright of the applet.
The implementation of this method provided by the
Applet
class returns null
.
getAppletInfo
in class java.applet.Applet
public static void main(AbstractVirtualCubeApplet applet)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |