|
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.NotationModel
public class NotationModel
NotationModel.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_STATEMENT_TOKEN
|
static java.lang.String |
PROP_SYMBOL_SUPPORTED
|
static java.lang.String |
PROP_SYNTAX
|
static java.lang.String |
PROP_TWIST_TOKEN
|
| 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 | |
|---|---|
NotationModel()
Creates new CubeNotation |
|
| Method Summary | |
|---|---|
void |
basicSetMoveSupported(Move key,
boolean newValue)
|
void |
basicSetMoveToken(Move key,
java.lang.String newValue)
|
void |
basicSetSupported(Symbol key,
boolean newValue)
|
void |
basicSetSyntax(Symbol s,
Syntax newValue)
|
void |
basicSetToken(Symbol key,
java.lang.String newValue)
|
java.lang.Object |
clone()
Returns a shallow copy of this model. |
void |
configureMoveFromToken(MoveNode twist,
java.lang.String twistToken)
Configures a MoveNode from the specified twist token. |
java.util.Set<Move> |
getAllMoveSymbols()
|
java.lang.String |
getAllTokens(Symbol key)
Returns all token for the specified symbol. |
java.lang.String |
getAllTwistTokens(Move key)
|
java.lang.String |
getEquivalentMacro(Cube cube,
java.util.Map localMacros)
Returns a macro which performs the same transformation as the cube parameter. |
int |
getLayerCount()
/** Returns the number of layers supported by this notation. |
javax.swing.tree.DefaultMutableTreeNode |
getMacroModels()
|
java.util.List<MacroNode> |
getMacros()
Returns the macros defined by this notation. |
java.lang.String |
getMoveToken(Move key)
|
ScriptParser |
getParser(java.util.List<MacroNode> localMacros)
|
Symbol |
getSymbolFor(java.lang.String token,
Symbol compositeSymbol)
Returns a symbol for the specified token. |
Syntax |
getSyntax(Symbol s)
Returns the syntax for the specified symbol. |
java.lang.String |
getToken(Move s)
Returns a token for the specified move. |
java.lang.String |
getToken(Symbol key)
Returns a token for the specified symbol. |
static int[] |
getUsefulLayers(int layerCount)
Returns an array of 'useful' layerMask values for cubes with the specified layer count. |
boolean |
isDefaultNotation()
|
boolean |
isRemovable()
Returns true if the node may be removed from its parent. |
boolean |
isSupported(Symbol s)
Returns true, if this notation supports the specified symbol. |
boolean |
isToken(java.lang.String token)
Returns true, if the specified String is a token of this notation. |
boolean |
isTokenFor(java.lang.String token,
Symbol symbol)
Returns true, if the specified String is a token for the specified symbol. |
boolean |
isTwistSupported()
|
boolean |
isTwistSupported(Move key)
|
static int |
reverseLayerMask(int layerMask,
int layerCount)
Returns a reversed (mirrored) layerMask for cubes with the specified layer count. |
void |
setLayerCount(int newValue)
Returns the number of layers supported by this notation. |
void |
setMoveSupported(Move key,
boolean newValue)
|
void |
setMoveToken(Move key,
java.lang.String newValue)
|
void |
setSupported(Symbol key,
boolean newValue)
|
void |
setSyntax(Symbol s,
Syntax newValue)
Sets the syntax for the specified symbol. |
void |
setToken(Symbol key,
java.lang.String newValue)
|
void |
writeToken(java.io.PrintWriter w,
int axis,
int layerMask,
int angle)
Writes a token for the specified transformation to the print writer. |
void |
writeToken(java.io.PrintWriter w,
Symbol symbol)
Writes a token for the specified symbol to the print writer. |
| Methods inherited from class ch.randelshofer.cubetwister.doc.InfoModel |
|---|
basicSetAuthor, basicSetDate, basicSetDescription, basicSetName, dispose, 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, isDefaultCube, 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 |
| Field Detail |
|---|
public static final java.lang.String PROP_STATEMENT_TOKEN
public static final java.lang.String PROP_TWIST_TOKEN
public static final java.lang.String PROP_SYNTAX
public static final java.lang.String PROP_SYMBOL_SUPPORTED
| Constructor Detail |
|---|
public NotationModel()
| Method Detail |
|---|
public static int[] getUsefulLayers(int layerCount)
public static int reverseLayerMask(int layerMask,
int layerCount)
layerMask - layerCount -
public int getLayerCount()
getLayerCount in interface Notationpublic void setLayerCount(int newValue)
public java.util.List<MacroNode> getMacros()
Notation
getMacros in interface Notationpublic javax.swing.tree.DefaultMutableTreeNode getMacroModels()
public boolean isTwistSupported()
public boolean isTwistSupported(Move key)
public void basicSetMoveSupported(Move key,
boolean newValue)
public void setMoveSupported(Move key,
boolean newValue)
public void basicSetSupported(Symbol key,
boolean newValue)
public void setSupported(Symbol key,
boolean newValue)
public java.util.Set<Move> getAllMoveSymbols()
public java.lang.String getMoveToken(Move key)
public java.lang.String getAllTwistTokens(Move key)
public void setMoveToken(Move key,
java.lang.String newValue)
public void basicSetMoveToken(Move key,
java.lang.String newValue)
public void basicSetToken(Symbol key,
java.lang.String newValue)
public void setToken(Symbol key,
java.lang.String newValue)
public ScriptParser getParser(java.util.List<MacroNode> localMacros)
public boolean isRemovable()
isRemovable in class EntityModel
public java.lang.String getEquivalentMacro(Cube cube,
java.util.Map localMacros)
getEquivalentMacro in interface Notationcube - A transformed cube.localMacros - A Map with local macros.
public void writeToken(java.io.PrintWriter w,
Symbol symbol)
throws java.io.IOException
writeToken in interface Notationjava.io.IOException - If the symbol is not supported by the notation,
and if no alternative symbols could be found.
public void writeToken(java.io.PrintWriter w,
int axis,
int layerMask,
int angle)
throws java.io.IOException
writeToken in interface Notationjava.io.IOExceptionpublic boolean isSupported(Symbol s)
isSupported in interface Notationpublic Syntax getSyntax(Symbol s)
getSyntax in interface Notation
public void basicSetSyntax(Symbol s,
Syntax newValue)
public void setSyntax(Symbol s,
Syntax newValue)
public boolean isToken(java.lang.String token)
isToken in interface Notation
public boolean isTokenFor(java.lang.String token,
Symbol symbol)
isTokenFor in interface Notationpublic java.lang.String getToken(Symbol key)
getToken in interface Notationpublic java.lang.String getAllTokens(Symbol key)
public Symbol getSymbolFor(java.lang.String token,
Symbol compositeSymbol)
getSymbolFor in interface Notation
public void configureMoveFromToken(MoveNode twist,
java.lang.String twistToken)
configureMoveFromToken in interface Notationpublic java.lang.Object clone()
InfoModel
clone in class InfoModelpublic java.lang.String getToken(Move s)
Notation
getToken in interface Notationpublic boolean isDefaultNotation()
isDefaultNotation in class EntityModel
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||