ch.randelshofer.rubik
Class CubeEvent
java.lang.Object
java.util.EventObject
ch.randelshofer.rubik.CubeEvent
- All Implemented Interfaces:
- java.io.Serializable
public class CubeEvent
- extends java.util.EventObject
CubeEvent is used to notify interested parties that an event has occured
in a Cube object.
- Version:
- 1.1 2007-12-31 Added getChangedParts method.
1.0 December 21, 2003 Created.
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
CubeEvent(Cube src,
int axis,
int layerMask,
int angle)
Creates a new instance. |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CubeEvent
public CubeEvent(Cube src,
int axis,
int layerMask,
int angle)
- Creates a new instance.
getCube
public Cube getCube()
getAxis
public int getAxis()
getLayerMask
public int getLayerMask()
getAngle
public int getAngle()
getAffectedLocations
public int[] getAffectedLocations()
- Returns a list of part ID's, for each part location which is affected
if a cube is transformed using the axis, layerMaska and angle
parameters of this event.