Class mxEventObject


  • public class mxEventObject
    extends java.lang.Object
    Base class for objects that dispatch named events.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean consumed
      Holds the consumed state of the event.
      protected java.lang.String name
      Holds the name of the event.
      protected java.util.Map<java.lang.String,​java.lang.Object> properties
      Holds the properties of the event.
    • Constructor Summary

      Constructors 
      Constructor Description
      mxEventObject​(java.lang.String name)
      Constructs a new event for the given name.
      mxEventObject​(java.lang.String name, java.lang.Object... args)
      Constructs a new event for the given name and properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void consume()
      Consumes the event.
      java.lang.String getName()
      Returns the name of the event.
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()  
      java.lang.Object getProperty​(java.lang.String key)  
      boolean isConsumed()
      Returns true if the event has been consumed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        Holds the name of the event.
      • properties

        protected java.util.Map<java.lang.String,​java.lang.Object> properties
        Holds the properties of the event.
      • consumed

        protected boolean consumed
        Holds the consumed state of the event. Default is false.
    • Constructor Detail

      • mxEventObject

        public mxEventObject​(java.lang.String name)
        Constructs a new event for the given name.
      • mxEventObject

        public mxEventObject​(java.lang.String name,
                             java.lang.Object... args)
        Constructs a new event for the given name and properties. The optional properties are specified using a sequence of keys and values, eg. new mxEventObject("eventName", key1, val1, .., keyN, valN))
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the event.
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      • getProperty

        public java.lang.Object getProperty​(java.lang.String key)
      • isConsumed

        public boolean isConsumed()
        Returns true if the event has been consumed.
      • consume

        public void consume()
        Consumes the event.