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 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.
-
-
-
Method Detail
-
addListener
public void addListener(TransformationStackListener listener)
Description copied from interface:TransformationStack
Add a listener.- Specified by:
addListener
in interfaceTransformationStack
- Parameters:
listener
- added listener.
-
removeListener
public void removeListener(TransformationStackListener listener)
Description copied from interface:TransformationStack
Remove a listener.- Specified by:
removeListener
in interfaceTransformationStack
- Parameters:
listener
- removed listener.
-
peek
public Transformation peek()
Description copied from interface:TransformationStack
Return the top transformation.- Specified by:
peek
in interfaceTransformationStack
- Returns:
- the top transformation.
-
push
public void push(Transformation transformation)
Description copied from interface:TransformationStack
Push the given transformation on the stack.- Specified by:
push
in interfaceTransformationStack
- Parameters:
transformation
- the given transformation.
-
pushRightMultiply
public void pushRightMultiply(Transformation transformation)
Description copied from interface:TransformationStack
Push the given transformation right time the peek on the stack.- Specified by:
pushRightMultiply
in interfaceTransformationStack
- Parameters:
transformation
- the given transformation.
-
pushLeftMultiply
public void pushLeftMultiply(Transformation transformation)
Description copied from interface:TransformationStack
Push the given transformation left time the peek on the stack.- Specified by:
pushLeftMultiply
in interfaceTransformationStack
- Parameters:
transformation
- the given transformation.
-
pop
public Transformation pop()
Description copied from interface:TransformationStack
Pop one matrix on the stack.- Specified by:
pop
in interfaceTransformationStack
- Returns:
- the popped matrix.
-
clear
public void clear()
Description copied from interface:TransformationStack
Pop all matrix on the stack except identity.- Specified by:
clear
in interfaceTransformationStack
-
fireChanged
protected void fireChanged(TransformationStack.TransformationStackEvent event, Transformation top)
Fire a change event.- Parameters:
event
- the event.top
- the new top transformation.
-
-