org.scilab.forge.scirenderer.tranformations
Class TransformationStackImpl

java.lang.Object
  extended by 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
TransformationStackImpl()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationStackImpl

public TransformationStackImpl()
Method Detail

addListener

public void addListener(TransformationStackListener listener)
Description copied from interface: TransformationStack
Add a listener.

Specified by:
addListener in interface TransformationStack
Parameters:
listener - added listener.

removeListener

public void removeListener(TransformationStackListener listener)
Description copied from interface: TransformationStack
Remove a listener.

Specified by:
removeListener in interface TransformationStack
Parameters:
listener - removed listener.

peek

public Transformation peek()
Description copied from interface: TransformationStack
Return the top transformation.

Specified by:
peek in interface TransformationStack
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 interface TransformationStack
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 interface TransformationStack
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 interface TransformationStack
Parameters:
transformation - the given transformation.

pop

public Transformation pop()
Description copied from interface: TransformationStack
Pop one matrix on the stack.

Specified by:
pop in interface TransformationStack
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 interface TransformationStack

fireChanged

protected void fireChanged(TransformationStack.TransformationStackEvent event,
                           Transformation top)
Fire a change event.

Parameters:
event - the event.
top - the new top transformation.