|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectscphEditor.EmbeddingFixed
public class EmbeddingFixed
An EmbeddingFixed object encapsulates presentation styles, in AWT terms, of an operator and its operands. The operator is assumed to have a fixed number of operands, e.g., if-then-else, unary operators.
Constructor Summary | |
---|---|
EmbeddingFixed(java.lang.String[] templateOf)
Creates an EmbeddingFixed object. |
Method Summary | |
---|---|
int |
componentCount(int operandCount)
Gives the component count of this embedding. |
int |
componentIndex(int operandIndex)
Maps operand index to component index. |
ExpressionLayoutManager |
getNewLayout()
Gives a new instance of MLMLayout2, the preferred layout manager here. |
int |
operandIndex(int componentIndex)
Maps component index to operand index. |
java.lang.String |
symbol(int componentIndex)
Gives the operator symbol at the component index, or null if there should be an operand at the component index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmbeddingFixed(java.lang.String[] templateOf)
{ "++", null }
{ null, "++" }
{ "if", null, "then",
null, "else", null }
templateOf
- the template that specifies operator symbols
and operand positions.Method Detail |
---|
public ExpressionLayoutManager getNewLayout()
getNewLayout
in interface IEmbedding
MLMLayout2
public java.lang.String symbol(int componentIndex)
IEmbedding
symbol
in interface IEmbedding
componentIndex
- the component index.
public int componentIndex(int operandIndex)
IEmbedding
componentIndex
in interface IEmbedding
operandIndex
- the operand index.
public int operandIndex(int componentIndex)
IEmbedding
operandIndex
in interface IEmbedding
componentIndex
- the component index.
public int componentCount(int operandCount)
IEmbedding
componentCount
in interface IEmbedding
operandCount
- the actual, present number of operands.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |