Class EventUtils


  • public class EventUtils
    extends java.lang.Object
    A set of static functions to be used by Ptera events.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Constructor Detail

      • EventUtils

        public EventUtils()
    • Method Detail

      • closeTableau

        public static void closeTableau​(Tableau tableau)
        Close the given tableau when the Java GUI thread is not busy.
        Parameters:
        tableau - The tableau to be closed.
      • findToplevelEffigy

        @Deprecated
        public static Effigy findToplevelEffigy​(NamedObj object)
                                         throws IllegalActionException
        Deprecated.
        Use ptolemy.actor.gui.Effigy.findToplevelEffigy() instead
        Find the effigy associated with the top level of the object, and if not found but the top level has a ContainmentExtender attribute, use that attribute to find the containment extender of the top level and continue the search.
        Parameters:
        object - The object.
        Returns:
        The effigy, or null if not found.
        Throws:
        IllegalActionException - If attributes cannot be retrieved, or the container that an attribute points to is invalid.
      • getTableauParameter

        public static TableauParameter getTableauParameter​(Event event,
                                                           StringParameter referredTableau,
                                                           TableauParameter defaultTableau)
                                                    throws IllegalActionException
        Get the TableauParameter to be used by the event that requires a tableau in its actions.
        Parameters:
        event - The event.
        referredTableau - The parameter that contains the name of the TableauParameter to be used, if not empty.
        defaultTableau - The default TableauParameter to be used.
        Returns:
        The TableauParameter.
        Throws:
        IllegalActionException - If the TableauParameter cannot be found.