public class TransformationStackImpl extends java.lang.Object implements TransformationStack
TransformationStack.TransformationStackEvent| Constructor and Description |
|---|
TransformationStackImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TransformationStackListener listener)
Add a listener.
|
void |
clear()
Pop all matrix on the stack except identity.
|
protected void |
fireChanged(TransformationStack.TransformationStackEvent event,
Transformation top)
Fire a change event.
|
Transformation |
peek()
Return the top transformation.
|
Transformation |
pop()
Pop one matrix on the stack.
|
void |
push(Transformation transformation)
Push the given transformation on the stack.
|
void |
pushLeftMultiply(Transformation transformation)
Push the given transformation left time the peek on the stack.
|
void |
pushRightMultiply(Transformation transformation)
Push the given transformation right time the peek on the stack.
|
void |
removeListener(TransformationStackListener listener)
Remove a listener.
|
public void addListener(TransformationStackListener listener)
TransformationStackaddListener in interface TransformationStacklistener - added listener.public void removeListener(TransformationStackListener listener)
TransformationStackremoveListener in interface TransformationStacklistener - removed listener.public Transformation peek()
TransformationStackpeek in interface TransformationStackpublic void push(Transformation transformation)
TransformationStackpush in interface TransformationStacktransformation - the given transformation.public void pushRightMultiply(Transformation transformation)
TransformationStackpushRightMultiply in interface TransformationStacktransformation - the given transformation.public void pushLeftMultiply(Transformation transformation)
TransformationStackpushLeftMultiply in interface TransformationStacktransformation - the given transformation.public Transformation pop()
TransformationStackpop in interface TransformationStackpublic void clear()
TransformationStackclear in interface TransformationStackprotected void fireChanged(TransformationStack.TransformationStackEvent event, Transformation top)
event - the event.top - the new top transformation.