CubeTwister 2.0alpha141 2011-10-13

ch.randelshofer.rubik
Interface CubeAttributes

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
CubeModel, DefaultCubeAttributes, SolverModel

public interface CubeAttributes
extends java.lang.Cloneable

The interface for objects which describe the attributes of a Rubik's Cube-like puzzle.

Version:
2.4 2008-01-03 Added methods clone and setTo.
2.3 2007-11-14 Added property twistDuration. Renamed property constants.
2.2 2007-08-29 Property partExplosion added.
2.0 2004-10-08 Renamed from CubeColorModel3D to CubeAttributes.
1.2 2002-05-05 Methods setAlpha and setBeta added.
1.1 Now uses the original Rubik's Cube Color scheme.
1.0 2001-08-19 Created.
Author:
Werner Randelshofer

Field Summary
static java.lang.String ALPHA_PROPERTY
           
static java.lang.String BETA_PROPERTY
           
static java.lang.String EXPLOSION_FACTOR_PROPERTY
           
static java.lang.String FRONT_BG_COLOR_PROPERTY
           
static java.lang.String FRONT_BG_IMAGE_PROPERTY
           
static java.lang.String FRONT_BG_IMAGE_VISIBLE_PROPERTY
           
static java.lang.String PART_EXPLOSION_PROPERTY
           
static java.lang.String PART_FILL_COLOR_PROPERTY
           
static java.lang.String PART_OUTLINE_COLOR_PROPERTY
           
static java.lang.String PART_VISIBLE_PROPERTY
           
static java.lang.String REAR_BG_COLOR_PROPERTY
           
static java.lang.String REAR_BG_IMAGE_PROPERTY
           
static java.lang.String REAR_BG_IMAGE_VISIBLE_PROPERTY
           
static java.lang.String SCALE_FACTOR_PROPERTY
           
static java.lang.String STICKER_EXPLOSION_PROPERTY
           
static java.lang.String STICKER_FILL_COLOR_PROPERTY
           
static java.lang.String STICKER_OUTLINE_COLOR_PROPERTY
           
static java.lang.String STICKER_VISIBLE_PROPERTY
           
static java.lang.String STICKERS_IMAGE_PROPERTY
           
static java.lang.String STICKERS_IMAGE_VISIBLE_PROPERTY
           
static java.lang.String TWIST_DURATION_PROPERTY
           
static java.lang.String VALUE_IS_ADJUSTING_PROPERTY
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 java.lang.Object clone()
          Clones the attributes.
 void dispose()
          Gets rid of allocated resources.
 float getAlpha()
          Gets the alpha orientation of the cube.
 float getBeta()
          Gets the beta orientation of the cube.
 float getExplosionFactor()
          Gets the global explosion factor of the cube.
 int getFaceCount()
           
 java.awt.Color getFrontBgColor()
           
 java.awt.Image getFrontBgImage()
           
 int getPartCount()
           
 float getPartExplosion(int index)
          Gets the explosion factor of a single part of the cube.
 java.awt.Color getPartFillColor(int index)
           
 java.awt.Color getPartOutlineColor(int index)
           
 java.awt.Color getRearBgColor()
           
 java.awt.Image getRearBgImage()
           
 float getScaleFactor()
           
 int getStickerCount()
           
 int getStickerCount(int face)
           
 float getStickerExplosion(int index)
          Gets the explosion factor of a single sticker of the cube.
 java.awt.Color getStickerFillColor(int index)
           
 int getStickerOffset(int face)
           
 java.awt.Color getStickerOutlineColor(int index)
           
 java.awt.Image getStickersImage()
           
 int getTwistDuration()
           
 boolean getValueIsAdjusting()
          Returns true if the current changes to the value property are part of a series of changes.
 boolean isFrontBgImageVisible()
           
 boolean isPartVisible(int index)
           
 boolean isRearBgImageVisible()
           
 boolean isStickersImageVisible()
           
 boolean isStickerVisible(int index)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void reset()
           
 void setTo(CubeAttributes that)
          Sets the attributes of this cube to the specified attributes.
 void setValueIsAdjusting(boolean b)
          This attribute indicates that any upcoming changes to the value of the model should be considered a single event.
 

Field Detail

ALPHA_PROPERTY

static final java.lang.String ALPHA_PROPERTY
See Also:
Constant Field Values

SCALE_FACTOR_PROPERTY

static final java.lang.String SCALE_FACTOR_PROPERTY
See Also:
Constant Field Values

EXPLOSION_FACTOR_PROPERTY

static final java.lang.String EXPLOSION_FACTOR_PROPERTY
See Also:
Constant Field Values

PART_EXPLOSION_PROPERTY

static final java.lang.String PART_EXPLOSION_PROPERTY
See Also:
Constant Field Values

STICKER_EXPLOSION_PROPERTY

static final java.lang.String STICKER_EXPLOSION_PROPERTY
See Also:
Constant Field Values

BETA_PROPERTY

static final java.lang.String BETA_PROPERTY
See Also:
Constant Field Values

STICKERS_IMAGE_PROPERTY

static final java.lang.String STICKERS_IMAGE_PROPERTY
See Also:
Constant Field Values

PART_VISIBLE_PROPERTY

static final java.lang.String PART_VISIBLE_PROPERTY
See Also:
Constant Field Values

STICKER_VISIBLE_PROPERTY

static final java.lang.String STICKER_VISIBLE_PROPERTY
See Also:
Constant Field Values

PART_FILL_COLOR_PROPERTY

static final java.lang.String PART_FILL_COLOR_PROPERTY
See Also:
Constant Field Values

PART_OUTLINE_COLOR_PROPERTY

static final java.lang.String PART_OUTLINE_COLOR_PROPERTY
See Also:
Constant Field Values

STICKER_FILL_COLOR_PROPERTY

static final java.lang.String STICKER_FILL_COLOR_PROPERTY
See Also:
Constant Field Values

STICKER_OUTLINE_COLOR_PROPERTY

static final java.lang.String STICKER_OUTLINE_COLOR_PROPERTY
See Also:
Constant Field Values

FRONT_BG_IMAGE_PROPERTY

static final java.lang.String FRONT_BG_IMAGE_PROPERTY
See Also:
Constant Field Values

REAR_BG_IMAGE_PROPERTY

static final java.lang.String REAR_BG_IMAGE_PROPERTY
See Also:
Constant Field Values

FRONT_BG_COLOR_PROPERTY

static final java.lang.String FRONT_BG_COLOR_PROPERTY
See Also:
Constant Field Values

REAR_BG_COLOR_PROPERTY

static final java.lang.String REAR_BG_COLOR_PROPERTY
See Also:
Constant Field Values

STICKERS_IMAGE_VISIBLE_PROPERTY

static final java.lang.String STICKERS_IMAGE_VISIBLE_PROPERTY
See Also:
Constant Field Values

REAR_BG_IMAGE_VISIBLE_PROPERTY

static final java.lang.String REAR_BG_IMAGE_VISIBLE_PROPERTY
See Also:
Constant Field Values

FRONT_BG_IMAGE_VISIBLE_PROPERTY

static final java.lang.String FRONT_BG_IMAGE_VISIBLE_PROPERTY
See Also:
Constant Field Values

VALUE_IS_ADJUSTING_PROPERTY

static final java.lang.String VALUE_IS_ADJUSTING_PROPERTY
See Also:
Constant Field Values

TWIST_DURATION_PROPERTY

static final java.lang.String TWIST_DURATION_PROPERTY
See Also:
Constant Field Values
Method Detail

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

getAlpha

float getAlpha()
Gets the alpha orientation of the cube.


getBeta

float getBeta()
Gets the beta orientation of the cube.


getExplosionFactor

float getExplosionFactor()
Gets the global explosion factor of the cube.


getPartExplosion

float getPartExplosion(int index)
Gets the explosion factor of a single part of the cube.


getStickerExplosion

float getStickerExplosion(int index)
Gets the explosion factor of a single sticker of the cube.


getScaleFactor

float getScaleFactor()

getStickersImage

java.awt.Image getStickersImage()

getFrontBgImage

java.awt.Image getFrontBgImage()

getRearBgImage

java.awt.Image getRearBgImage()

isPartVisible

boolean isPartVisible(int index)

isStickerVisible

boolean isStickerVisible(int index)

isStickersImageVisible

boolean isStickersImageVisible()

isFrontBgImageVisible

boolean isFrontBgImageVisible()

isRearBgImageVisible

boolean isRearBgImageVisible()

getPartFillColor

java.awt.Color getPartFillColor(int index)

getStickerFillColor

java.awt.Color getStickerFillColor(int index)

getPartOutlineColor

java.awt.Color getPartOutlineColor(int index)

getStickerOutlineColor

java.awt.Color getStickerOutlineColor(int index)

getFrontBgColor

java.awt.Color getFrontBgColor()

getRearBgColor

java.awt.Color getRearBgColor()

getPartCount

int getPartCount()

getStickerCount

int getStickerCount()

getFaceCount

int getFaceCount()

getStickerCount

int getStickerCount(int face)

getStickerOffset

int getStickerOffset(int face)

getTwistDuration

int getTwistDuration()

setValueIsAdjusting

void setValueIsAdjusting(boolean b)
This attribute indicates that any upcoming changes to the value of the model should be considered a single event. This attribute will be set to true at the start of a series of changes to the value, and will be set to false when the value has finished changing. Normally this allows a listener to only take action when the final value change in committed, instead of having to do updates for all intermediate values.

Sliders and scrollbars use this property when a drag is underway.

Parameters:
b - true if the upcoming changes to the value property are part of a series

getValueIsAdjusting

boolean getValueIsAdjusting()
Returns true if the current changes to the value property are part of a series of changes.

Returns:
the valueIsAdjustingProperty.
See Also:
setValueIsAdjusting(boolean)

reset

void reset()

dispose

void dispose()
Gets rid of allocated resources.


setTo

void setTo(CubeAttributes that)
Sets the attributes of this cube to the specified attributes.

Parameters:
that -

clone

java.lang.Object clone()
Clones the attributes.

Returns:
a clone of the attributes.

(c) Werner Randelshofer.
All rights reserved.