|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.DefaultCubeAttributes
public class DefaultCubeAttributes
A default implementation of the CubeAttributes interface.
| Field Summary | |
|---|---|
protected float |
alpha
|
protected float |
beta
|
protected java.beans.PropertyChangeSupport |
changeSupport
|
protected java.awt.Color |
frontBgColor
|
protected java.awt.Image |
frontBgImage
|
protected boolean |
frontBgImageVisible
|
protected float[] |
partExplosion
|
protected java.awt.Color[] |
partsFillColor
Holds the fill color of the parts. |
protected java.awt.Color[] |
partsOutlineColor
Holds the outline color of the parts. |
protected boolean[] |
partsVisible
Is true, when the part is visible. |
protected java.awt.Color |
rearBgColor
|
protected java.awt.Image |
rearBgImage
|
protected boolean |
rearBgImageVisible
|
protected float |
scaleFactor
|
protected int[] |
stickerCountPerFace
|
protected float[] |
stickerExplosion
|
protected java.awt.Color[] |
stickersFillColor
Holds the fill color of the stickers. |
protected java.awt.Image |
stickersImage
|
protected boolean |
stickersImageVisible
|
protected java.awt.Color[] |
stickersOutlineColor
Holds the outline color of the stickers. |
protected boolean[] |
stickersVisible
Is true, when the sticker is visible. |
protected boolean |
valueIsAdjusting
|
| Constructor Summary | |
|---|---|
DefaultCubeAttributes(int partCount,
int stickerCount,
int[] stickerCountPerFace)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change 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)
Removes a property change listener. |
void |
reset()
|
void |
setAlpha(float newValue)
|
void |
setBeta(float newValue)
|
void |
setExplosionFactor(float newValue)
|
void |
setFrontBgColor(java.awt.Color newValue)
|
void |
setFrontBgImage(java.awt.Image newValue)
|
void |
setFrontBgImageVisible(boolean newValue)
|
void |
setPartExplosion(int index,
float newValue)
|
void |
setPartFillColor(java.awt.Color[] newValue)
|
void |
setPartFillColor(int index,
java.awt.Color newValue)
|
void |
setPartOutlineColor(java.awt.Color[] newValue)
|
void |
setPartOutlineColor(int index,
java.awt.Color newValue)
|
void |
setPartVisible(int index,
boolean newValue)
|
void |
setRearBgColor(java.awt.Color newValue)
|
void |
setRearBgImage(java.awt.Image newValue)
|
void |
setRearBgImageVisible(boolean newValue)
|
void |
setScaleFactor(float newValue)
|
void |
setStickerExplosion(int index,
float newValue)
|
void |
setStickerFillColor(java.awt.Color[] newValue)
|
void |
setStickerFillColor(int index,
java.awt.Color newValue)
|
void |
setStickerOutlineColor(java.awt.Color[] newValue)
|
void |
setStickerOutlineColor(int index,
java.awt.Color newValue)
|
void |
setStickersImage(java.awt.Image newValue)
|
void |
setStickersImageVisible(boolean newValue)
|
void |
setStickerVisible(int index,
boolean newValue)
|
void |
setTo(CubeAttributes that)
Sets the attributes of this cube to the specified attributes. |
void |
setTwistDuration(int newValue)
|
void |
setValueIsAdjusting(boolean newValue)
This attribute indicates that any upcoming changes to the value of the model should be considered a single event. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.beans.PropertyChangeSupport changeSupport
protected boolean[] partsVisible
protected java.awt.Color[] partsFillColor
protected java.awt.Color[] partsOutlineColor
protected boolean[] stickersVisible
protected java.awt.Color[] stickersFillColor
protected java.awt.Color[] stickersOutlineColor
protected float scaleFactor
protected float alpha
protected float beta
protected java.awt.Image stickersImage
protected int[] stickerCountPerFace
protected java.awt.Color frontBgColor
protected java.awt.Image frontBgImage
protected java.awt.Color rearBgColor
protected java.awt.Image rearBgImage
protected boolean rearBgImageVisible
protected boolean frontBgImageVisible
protected boolean stickersImageVisible
protected boolean valueIsAdjusting
protected float[] partExplosion
protected float[] stickerExplosion
| Constructor Detail |
|---|
public DefaultCubeAttributes(int partCount,
int stickerCount,
int[] stickerCountPerFace)
| Method Detail |
|---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface CubeAttributespublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface CubeAttributespublic float getAlpha()
CubeAttributes
getAlpha in interface CubeAttributespublic float getBeta()
CubeAttributes
getBeta in interface CubeAttributespublic float getExplosionFactor()
CubeAttributes
getExplosionFactor in interface CubeAttributespublic float getPartExplosion(int index)
CubeAttributes
getPartExplosion in interface CubeAttributes
public void setPartExplosion(int index,
float newValue)
public float getScaleFactor()
getScaleFactor in interface CubeAttributespublic void setStickersImage(java.awt.Image newValue)
public java.awt.Image getStickersImage()
getStickersImage in interface CubeAttributespublic void setAlpha(float newValue)
public void setBeta(float newValue)
public void setScaleFactor(float newValue)
public void setExplosionFactor(float newValue)
public void setPartVisible(int index,
boolean newValue)
public boolean isPartVisible(int index)
isPartVisible in interface CubeAttributes
public void setStickerVisible(int index,
boolean newValue)
public boolean isStickerVisible(int index)
isStickerVisible in interface CubeAttributespublic java.awt.Color getPartFillColor(int index)
getPartFillColor in interface CubeAttributespublic java.awt.Color getStickerFillColor(int index)
getStickerFillColor in interface CubeAttributes
public void setPartFillColor(int index,
java.awt.Color newValue)
public void setStickerFillColor(int index,
java.awt.Color newValue)
public java.awt.Color getPartOutlineColor(int index)
getPartOutlineColor in interface CubeAttributespublic java.awt.Color getStickerOutlineColor(int index)
getStickerOutlineColor in interface CubeAttributes
public void setPartOutlineColor(int index,
java.awt.Color newValue)
public void setStickerOutlineColor(int index,
java.awt.Color newValue)
public void setPartOutlineColor(java.awt.Color[] newValue)
public void setPartFillColor(java.awt.Color[] newValue)
public void setStickerFillColor(java.awt.Color[] newValue)
public void setStickerOutlineColor(java.awt.Color[] newValue)
public int getPartCount()
getPartCount in interface CubeAttributespublic int getStickerCount()
getStickerCount in interface CubeAttributespublic int getFaceCount()
getFaceCount in interface CubeAttributespublic int getStickerCount(int face)
getStickerCount in interface CubeAttributespublic int getStickerOffset(int face)
getStickerOffset in interface CubeAttributespublic void reset()
reset in interface CubeAttributespublic void setFrontBgColor(java.awt.Color newValue)
public void setFrontBgImage(java.awt.Image newValue)
public java.awt.Color getFrontBgColor()
getFrontBgColor in interface CubeAttributespublic java.awt.Image getFrontBgImage()
getFrontBgImage in interface CubeAttributespublic void setRearBgColor(java.awt.Color newValue)
public void setRearBgImage(java.awt.Image newValue)
public java.awt.Color getRearBgColor()
getRearBgColor in interface CubeAttributespublic java.awt.Image getRearBgImage()
getRearBgImage in interface CubeAttributespublic boolean isFrontBgImageVisible()
isFrontBgImageVisible in interface CubeAttributespublic boolean isRearBgImageVisible()
isRearBgImageVisible in interface CubeAttributespublic boolean isStickersImageVisible()
isStickersImageVisible in interface CubeAttributespublic void setFrontBgImageVisible(boolean newValue)
public void setRearBgImageVisible(boolean newValue)
public void setStickersImageVisible(boolean newValue)
public void setValueIsAdjusting(boolean newValue)
CubeAttributesSliders and scrollbars use this property when a drag is underway.
setValueIsAdjusting in interface CubeAttributesnewValue - true if the upcoming changes to the value property are part of a seriespublic boolean getValueIsAdjusting()
CubeAttributes
getValueIsAdjusting in interface CubeAttributesCubeAttributes.setValueIsAdjusting(boolean)public float getStickerExplosion(int index)
CubeAttributes
getStickerExplosion in interface CubeAttributes
public void setStickerExplosion(int index,
float newValue)
public void dispose()
CubeAttributes
dispose in interface CubeAttributespublic int getTwistDuration()
getTwistDuration in interface CubeAttributespublic void setTwistDuration(int newValue)
public void setTo(CubeAttributes that)
CubeAttributes
setTo in interface CubeAttributespublic java.lang.Object clone()
CubeAttributes
clone in interface CubeAttributesclone in class java.lang.Object
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||