com.javonet.api

Class NEventListener

  • java.lang.Object
    • com.javonet.api.NEventListener
  • All Implemented Interfaces:
    INEventListener

    public class NEventListener
    extends java.lang.Object
    implements INEventListener
    A class used for subscribing any .NET events.

    This class can be provided as argument to event subscribing method on instance of NObject class.

    When .NET event is raised all associated instances of NEventListener will be informed by calling
    eventOccured method with list of arguments passed by the event invocation.

    Receiving Events Arguments

    All arguments passed by event invocation are either converted to JAVA primitive types (String, Integer, Float)
    or passed as NObject instances for reference-type arguments.

    Subscribing Events

    Events can be subscribed by calling NObject.addEventListener(String, INEventListener) method.
    Event listener can be an instance of this class or any other class inheriting from NEventListener,
    class implementing INEventListener interface or anonymous class of NEventListener itself; for example

     
     button4.addEventListener("Click", new NEventListener() {
     	public void eventOccurred(Object[] arguments) {
     		button4_Click((NObject)arguments[0],(NObject)arguments[1]);
    	}
     });
     
     

    or by instance of class implementing INEventListener interface

     
     class MyEventListener implements INEventListener
     {
     	public void eventOccurred(Object[] arguments)
     	{
     		//my custom event handling code
     	}
     }
     
     button4.addEventListener("Click", new MyEventListener());
     
     
    Version:
    1.0


    • Constructor Summary

      Constructors 
      Constructor and Description
      NEventListener() 



    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void eventOccurred(java.lang.Object[] arguments)

      Method triggered for each subscribed .NET event occurrence.


      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait



    • Constructor Detail



      • NEventListener

        public NEventListener()



    • Method Detail



      • eventOccurred

        public void eventOccurred(java.lang.Object[] arguments)
        Description copied from interface: INEventListener
        Method triggered for each subscribed .NET event occurrence.
        Specified by:
        eventOccurred in interface INEventListener
        Parameters:
        arguments – Parameters passed during event invocation. These can be any JAVA primitive types (integer, string, float..) or instances of NObject class for reference-type arguments