|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
ch.randelshofer.cubetwister.doc.EntityModel
ch.randelshofer.cubetwister.doc.InfoModel
ch.randelshofer.cubetwister.doc.CubeModel
public class CubeModel
Holds a description of a Cube.
| Field Summary | |
|---|---|
static int |
COLORS_INDEX
|
static java.lang.String |
EXPLODE_PROPERTY
|
protected java.awt.Color |
frontBgColor
|
protected DefaultImageWellModel |
frontBgImageModel
|
protected boolean |
frontBgImageVisible
|
static java.lang.String |
INT_ALPHA_PROPERTY
|
static java.lang.String |
INT_BETA_PROPERTY
|
static java.lang.String |
INT_EXPLODE_PROPERTY
|
static java.lang.String |
INT_SCALE_PROPERTY
|
static java.lang.String |
KIND_PROPERTY
|
static int |
PARTS_INDEX
|
protected java.awt.Color |
rearBgColor
|
protected DefaultImageWellModel |
rearBgImageModel
|
protected boolean |
rearBgImageVisible
|
static java.lang.String |
SCALE_PROPERTY
|
protected int[] |
stickerCountPerFace
|
static int |
STICKERS_INDEX
|
protected DefaultImageWellModel |
stickersImageModel
|
protected boolean |
stickersImageVisible
|
| Fields inherited from class ch.randelshofer.cubetwister.doc.InfoModel |
|---|
author, date, description, name, PROP_AUTHOR, PROP_DATE, PROP_DESCRIPTION, PROP_NAME |
| Fields inherited from class ch.randelshofer.cubetwister.doc.EntityModel |
|---|
PROP_CHILD_COUNT |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
CubeModel()
Creates new CubeScript |
|
CubeModel(CubeKind kind)
|
|
| Method Summary | |
|---|---|
void |
addNotify(EntityModel m)
|
void |
basicSetFrontBgImageVisible(boolean newValue)
|
void |
basicSetIntAlpha(int value)
|
void |
basicSetIntBeta(int value)
|
void |
basicSetIntExplode(int value)
|
void |
basicSetIntScale(int value)
|
void |
basicSetKind(CubeKind value)
|
void |
basicSetRearBgImageVisible(boolean newValue)
|
void |
basicSetStickersImageVisible(boolean value)
|
java.lang.Object |
clone()
Creates a deep copy of this cube model. |
Cube |
createCube()
|
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. |
EntityModel |
getColors()
|
java.lang.Class |
getCube3DClass()
|
CubeAttributes |
getCubeAttributes()
|
float |
getExplosionFactor()
Gets the global explosion factor of the cube. |
int |
getFaceCount()
|
java.awt.Color |
getFrontBgColor()
|
java.awt.Image |
getFrontBgImage()
|
ImageWellModel |
getFrontBgImageModel()
|
int |
getIntAlpha()
|
int |
getIntBeta()
|
int |
getIntExplode()
|
int |
getIntScale()
|
CubeKind |
getKind()
|
int |
getLayerCount()
|
int |
getPartCount()
|
float |
getPartExplosion(int index)
Gets the explosion factor of a single part of the cube. |
java.awt.Color |
getPartFillColor(int partIndex)
|
java.awt.Color |
getPartOutlineColor(int partIndex)
|
EntityModel |
getParts()
|
java.awt.Color |
getRearBgColor()
|
java.awt.Image |
getRearBgImage()
|
ImageWellModel |
getRearBgImageModel()
|
float |
getScaleFactor()
|
java.lang.Class |
getSimpleCube3DClass()
|
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 stickerIndex)
|
int |
getStickerOffset(int index)
|
java.awt.Color |
getStickerOutlineColor(int index)
|
EntityModel |
getStickers()
|
java.awt.Image |
getStickersImage()
|
ImageWellModel |
getStickersImageModel()
|
int |
getTwistDuration()
|
boolean |
getValueIsAdjusting()
Returns true if the current changes to the value property are part of a series of changes. |
boolean |
isDefaultCube()
|
boolean |
isFrontBgImageVisible()
|
boolean |
isPartVisible(int partIndex)
|
boolean |
isRearBgImageVisible()
|
boolean |
isRemovable()
Returns true if the node may be removed from its parent. |
boolean |
isStickersImageVisible()
|
boolean |
isStickerVisible(int stickerIndex)
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This method gets called when a bound property is changed. |
void |
removeNotify(EntityModel m)
|
void |
reset()
|
void |
setAlpha(double d)
|
void |
setBeta(double d)
|
void |
setFrontBgColor(java.awt.Color newValue)
|
void |
setFrontBgImage(java.awt.Image newValue)
|
void |
setFrontBgImageVisible(boolean newValue)
|
void |
setIntAlpha(int value)
|
void |
setIntBeta(int value)
|
void |
setIntExplode(int value)
|
void |
setIntScale(int value)
|
void |
setKind(CubeKind value)
|
void |
setPartVisible(int partIndex,
boolean newValue)
|
void |
setRearBgColor(java.awt.Color newValue)
|
void |
setRearBgImage(java.awt.Image newValue)
|
void |
setRearBgImageVisible(boolean newValue)
|
void |
setStickersImageVisible(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. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
| Methods inherited from class ch.randelshofer.cubetwister.doc.InfoModel |
|---|
basicSetAuthor, basicSetDate, basicSetDescription, basicSetName, getAuthor, getAuthorDocument, getDate, getDateDocument, getDescription, getDescriptionDocument, getName, getNameDocument, getUserObject, setAuthor, setDate, setDescription, setName, setUserObject, toString, undoableEditHappened |
| Methods inherited from class ch.randelshofer.cubetwister.doc.EntityModel |
|---|
addPropertyChangeListener, children, fireNodeChanged, fireNodeStructureChanged, firePropertyChange, firePropertyChange, firePropertyChange, fireUndoableEditHappened, getDocument, hasPropertyListeners, insert, isDefaultNotation, remove, removePropertyChangeListener, setRemovable |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
add, breadthFirstEnumeration, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ch.randelshofer.rubik.CubeAttributes |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
public static final int PARTS_INDEX
public static final int STICKERS_INDEX
public static final int COLORS_INDEX
public static final java.lang.String KIND_PROPERTY
public static final java.lang.String SCALE_PROPERTY
public static final java.lang.String INT_SCALE_PROPERTY
public static final java.lang.String EXPLODE_PROPERTY
public static final java.lang.String INT_EXPLODE_PROPERTY
public static final java.lang.String INT_ALPHA_PROPERTY
public static final java.lang.String INT_BETA_PROPERTY
protected int[] stickerCountPerFace
protected java.awt.Color frontBgColor
protected java.awt.Color rearBgColor
protected DefaultImageWellModel stickersImageModel
protected DefaultImageWellModel frontBgImageModel
protected DefaultImageWellModel rearBgImageModel
protected boolean rearBgImageVisible
protected boolean frontBgImageVisible
protected boolean stickersImageVisible
| Constructor Detail |
|---|
public CubeModel()
public CubeModel(CubeKind kind)
| Method Detail |
|---|
public Cube createCube()
public int getLayerCount()
public int getIntScale()
public void setIntScale(int value)
public void basicSetIntScale(int value)
public int getIntExplode()
public void setIntExplode(int value)
public void basicSetIntExplode(int value)
public int getIntAlpha()
public void setIntAlpha(int value)
public void basicSetIntAlpha(int value)
public int getIntBeta()
public void setIntBeta(int value)
public void basicSetIntBeta(int value)
public CubeKind getKind()
public void setKind(CubeKind value)
public void basicSetKind(CubeKind value)
public java.lang.Class getCube3DClass()
public EntityModel getParts()
public EntityModel getColors()
public EntityModel getStickers()
public java.lang.Class getSimpleCube3DClass()
public CubeAttributes getCubeAttributes()
public void addNotify(EntityModel m)
public void removeNotify(EntityModel m)
public void setPartVisible(int partIndex,
boolean newValue)
public java.lang.Object clone()
clone in interface CubeAttributesclone in class InfoModelpublic int getPartCount()
getPartCount in interface CubeAttributespublic int getStickerCount()
getStickerCount in interface CubeAttributespublic java.awt.Color getStickerFillColor(int stickerIndex)
getStickerFillColor in interface CubeAttributespublic boolean isStickerVisible(int stickerIndex)
isStickerVisible in interface CubeAttributespublic java.awt.Color getPartOutlineColor(int partIndex)
getPartOutlineColor in interface CubeAttributespublic boolean isPartVisible(int partIndex)
isPartVisible in interface CubeAttributespublic java.awt.Color getPartFillColor(int partIndex)
getPartFillColor in interface CubeAttributespublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerevt - A PropertyChangeEvent object describing the event source
and the property that has changed.public float getScaleFactor()
getScaleFactor in interface CubeAttributespublic float getExplosionFactor()
CubeAttributes
getExplosionFactor in interface CubeAttributespublic float getAlpha()
CubeAttributes
getAlpha in interface CubeAttributespublic float getBeta()
CubeAttributes
getBeta in interface CubeAttributespublic void setAlpha(double d)
public void setBeta(double d)
public boolean isRemovable()
isRemovable in class EntityModelpublic void reset()
reset in interface CubeAttributespublic int getStickerOffset(int index)
getStickerOffset in interface CubeAttributespublic int getFaceCount()
getFaceCount in interface CubeAttributespublic int getStickerCount(int face)
getStickerCount in interface CubeAttributespublic java.awt.Color getStickerOutlineColor(int index)
getStickerOutlineColor in interface CubeAttributespublic java.awt.Image getStickersImage()
getStickersImage 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 ImageWellModel getStickersImageModel()
public ImageWellModel getRearBgImageModel()
public ImageWellModel getFrontBgImageModel()
public boolean isFrontBgImageVisible()
isFrontBgImageVisible in interface CubeAttributespublic boolean isRearBgImageVisible()
isRearBgImageVisible in interface CubeAttributespublic boolean isStickersImageVisible()
isStickersImageVisible in interface CubeAttributespublic void basicSetFrontBgImageVisible(boolean newValue)
public void setFrontBgImageVisible(boolean newValue)
public void basicSetRearBgImageVisible(boolean newValue)
public void setRearBgImageVisible(boolean newValue)
public void basicSetStickersImageVisible(boolean value)
public void setStickersImageVisible(boolean newValue)
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerpublic void dispose()
CubeAttributes
dispose in interface CubeAttributesdispose in class InfoModelpublic 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 getPartExplosion(int index)
CubeAttributes
getPartExplosion in interface CubeAttributespublic float getStickerExplosion(int index)
CubeAttributes
getStickerExplosion in interface CubeAttributespublic int getTwistDuration()
getTwistDuration in interface CubeAttributespublic void setTwistDuration(int newValue)
public boolean isDefaultCube()
isDefaultCube in class EntityModelpublic void setTo(CubeAttributes that)
CubeAttributes
setTo in interface CubeAttributes
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||