Class TransformationStackImpl
- java.lang.Object
-
- org.scilab.forge.scirenderer.tranformations.TransformationStackImpl
-
- All Implemented Interfaces:
TransformationStack
public class TransformationStackImpl extends java.lang.Object implements TransformationStack
- Author:
- Pierre Lando
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.scilab.forge.scirenderer.tranformations.TransformationStack
TransformationStack.TransformationStackEvent
-
-
Constructor Summary
Constructors Constructor Description TransformationStackImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(TransformationStackListener listener)Add a listener.voidclear()Pop all matrix on the stack except identity.protected voidfireChanged(TransformationStack.TransformationStackEvent event, Transformation top)Fire a change event.Transformationpeek()Return the top transformation.Transformationpop()Pop one matrix on the stack.voidpush(Transformation transformation)Push the given transformation on the stack.voidpushLeftMultiply(Transformation transformation)Push the given transformation left time the peek on the stack.voidpushRightMultiply(Transformation transformation)Push the given transformation right time the peek on the stack.voidremoveListener(TransformationStackListener listener)Remove a listener.
-
-
-
Method Detail
-
addListener
public void addListener(TransformationStackListener listener)
Description copied from interface:TransformationStackAdd a listener.- Specified by:
addListenerin interfaceTransformationStack- Parameters:
listener- added listener.
-
removeListener
public void removeListener(TransformationStackListener listener)
Description copied from interface:TransformationStackRemove a listener.- Specified by:
removeListenerin interfaceTransformationStack- Parameters:
listener- removed listener.
-
peek
public Transformation peek()
Description copied from interface:TransformationStackReturn the top transformation.- Specified by:
peekin interfaceTransformationStack- Returns:
- the top transformation.
-
push
public void push(Transformation transformation)
Description copied from interface:TransformationStackPush the given transformation on the stack.- Specified by:
pushin interfaceTransformationStack- Parameters:
transformation- the given transformation.
-
pushRightMultiply
public void pushRightMultiply(Transformation transformation)
Description copied from interface:TransformationStackPush the given transformation right time the peek on the stack.- Specified by:
pushRightMultiplyin interfaceTransformationStack- Parameters:
transformation- the given transformation.
-
pushLeftMultiply
public void pushLeftMultiply(Transformation transformation)
Description copied from interface:TransformationStackPush the given transformation left time the peek on the stack.- Specified by:
pushLeftMultiplyin interfaceTransformationStack- Parameters:
transformation- the given transformation.
-
pop
public Transformation pop()
Description copied from interface:TransformationStackPop one matrix on the stack.- Specified by:
popin interfaceTransformationStack- Returns:
- the popped matrix.
-
clear
public void clear()
Description copied from interface:TransformationStackPop all matrix on the stack except identity.- Specified by:
clearin interfaceTransformationStack
-
fireChanged
protected void fireChanged(TransformationStack.TransformationStackEvent event, Transformation top)
Fire a change event.- Parameters:
event- the event.top- the new top transformation.
-
-