Package ptolemy.actor.test
Class TestTypeListener
- java.lang.Object
-
- ptolemy.actor.test.TestTypeListener
-
- All Implemented Interfaces:
TypeListener
public class TestTypeListener extends java.lang.Object implements TypeListener
This dummy type listener implements the TypeListener interface. It keeps the last type change event information in a String message and returns that message in the getMessage() method. The call to getMessage() clears the message.- Since:
- Ptolemy II 0.2
- Version:
- $Id$
- Author:
- Yuhong Xiong
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description TestTypeListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
Return the last type change message.void
typeChanged(TypeEvent event)
Notify that the type of a port is changed.
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Return the last type change message. The message includes the full name of the port, the old type, and the new type, separated by "/". A call to this message also clears the old message. If there is no type change event after the last call, this method returns the String "no type change".- Returns:
- A String including the type change information.
-
typeChanged
public void typeChanged(TypeEvent event)
Notify that the type of a port is changed.- Specified by:
typeChanged
in interfaceTypeListener
- Parameters:
event
- The type change event.
-
-