CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.rubik
Interface Cube3D

All Known Implementing Classes:
AbstractCube3D, AbstractCube6Geom3D, AbstractCube6Idx3D, AbstractCube7Geom3D, AbstractCube7Idx3D, AbstractCubeGeom3D, AbstractCubeIdx3D, AbstractPocketCubeGeom3D, AbstractPocketCubeIdx3D, AbstractProfessorCubeGeom3D, AbstractProfessorCubeIdx3D, AbstractRevengeCubeGeom3D, AbstractRevengeCubeIdx3D, AbstractRubiksCubeGeom3D, AbstractRubiksCubeIdx3D, Cube6Geom3D, Cube6Idx3D, Cube7Geom3D, Cube7Idx3D, PocketCubeGeom3D, PocketCubeIdx3D, ProfessorCubeGeom3D, ProfessorCubeIdx3D, RevengeCubeGeom3D, RevengeCubeIdx3D, RubiksBarrelGeom3D, RubiksBarrelIdx3D, RubiksCubeGeom3D, RubiksCubeIdx3D, RubiksCuboctahedronGeom3D, RubiksCuboctahedronIdx3D, RubiksDiamondGeom3D, RubiksDiamondIdx3D, VCube6Geom3D, VCube6Idx3D, VCube7Geom3D, VCube7Idx3D

public interface Cube3D

The interface for objects which represent the three dimensional geometry of a Rubik's Cube-like puzzle.

Version:
5.0 2010-04-06 Added methods setInStartedPlayer and isInStartedPlayer.
4.1 2009-04-15 Added method setStickerBeveling.
4.0 2008-12-20 Added method getKind.
3.0 2008-04-28 Added method setAnimator.
2.0 2007-11-15 Upgraded to Java 1.4.
1.0 April 10, 2006 Created.
Author:
Werner Randelshofer.

Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Adds a change listener.
 void addCube3DListener(Cube3DListener listener)
           
 void dispose()
           
 org.monte.media.Animator getAnimator()
           
 CubeAttributes getAttributes()
          Gets cube attributees.
 Cube getCube()
          Gets the underlying permutation model.
 Dispatcher getDispatcher()
          Gets the dispatcher used to process animations of the 3D geometry.
 CubeKind getKind()
          Gets the kind of the cube.
 java.lang.Object getLock()
          Returns the lock object used for synchronizing model and view changes.
 int getPartCount()
           
 int getPartIndexForStickerIndex(int i)
           
 java.lang.Object getScene()
           
 boolean isAnimated()
          Returns true when the 3D geometry animates permutation changes.
 boolean isAnimating()
          Returns true if the cube is currently performing an animation.
 boolean isInStartedPlayer()
          Returns true if the cube is in a started script player.
 boolean isShowGhostParts()
           
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Removes a change listener.
 void removeCube3DListener(Cube3DListener listener)
           
 void setAnimated(boolean b)
          Sets whether changes in the permutation model shall cause an animated (multi-frame) change in the 3D geometry or whether they shall be reflected immediately.
 void setAnimator(org.monte.media.Animator animator)
           
 void setAttributes(CubeAttributes attributes)
          Sets cube attributees.
 void setCube(Cube cube)
          Sets the underlying permutation model.
 void setDispatcher(Dispatcher dispatcher)
          Sets the dispatcher used to process animations of the 3D geometry.
 void setInStartedPlayer(boolean newValue)
          This is set to true by the script player if it is started.
 void setLock(java.lang.Object o)
          Sets the lock object used for synchronizing model and view changes.
 void setShowGhostParts(boolean b)
           
 void setStickerBeveling(float newValue)
           
 void stopAnimation()
          Stops all running animations.
 

Method Detail

getPartCount

int getPartCount()

getScene

java.lang.Object getScene()

getLock

java.lang.Object getLock()
Returns the lock object used for synchronizing model and view changes.


setAnimator

void setAnimator(org.monte.media.Animator animator)

getAnimator

org.monte.media.Animator getAnimator()

setLock

void setLock(java.lang.Object o)
Sets the lock object used for synchronizing model and view changes.


setDispatcher

void setDispatcher(Dispatcher dispatcher)
Sets the dispatcher used to process animations of the 3D geometry.


getDispatcher

Dispatcher getDispatcher()
Gets the dispatcher used to process animations of the 3D geometry.


setAnimated

void setAnimated(boolean b)
Sets whether changes in the permutation model shall cause an animated (multi-frame) change in the 3D geometry or whether they shall be reflected immediately.


isAnimated

boolean isAnimated()
Returns true when the 3D geometry animates permutation changes.


stopAnimation

void stopAnimation()
Stops all running animations.


setCube

void setCube(Cube cube)
Sets the underlying permutation model.


getCube

Cube getCube()
Gets the underlying permutation model.


getKind

CubeKind getKind()
Gets the kind of the cube.


setAttributes

void setAttributes(CubeAttributes attributes)
Sets cube attributees.


getAttributes

CubeAttributes getAttributes()
Gets cube attributees.


addChangeListener

void addChangeListener(javax.swing.event.ChangeListener listener)
Adds a change listener. The change listener is notified about geometry changes. This is useful for a 3D canvas interested to know when to repaint.


removeChangeListener

void removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a change listener.


addCube3DListener

void addCube3DListener(Cube3DListener listener)

removeCube3DListener

void removeCube3DListener(Cube3DListener listener)

isAnimating

boolean isAnimating()
Returns true if the cube is currently performing an animation.


isInStartedPlayer

boolean isInStartedPlayer()
Returns true if the cube is in a started script player.


setInStartedPlayer

void setInStartedPlayer(boolean newValue)
This is set to true by the script player if it is started.


isShowGhostParts

boolean isShowGhostParts()

setShowGhostParts

void setShowGhostParts(boolean b)

dispose

void dispose()

getPartIndexForStickerIndex

int getPartIndexForStickerIndex(int i)

setStickerBeveling

void setStickerBeveling(float newValue)

(c) Werner Randelshofer.
All rights reserved.