NetPhantom Objects

New NetPhantom Objects can be created in Eclipse from the NetPhantom toolbar drop-down menu NetPhantom REXX Object or NetPhantom Java Object. These Objects maintain compatibility with previous versions of NetPhantom, and a new Java Object interface has been added.

New NetPhantom Java Object interface

The Java Object has been enhanced in NetPhantom 6 to provide a panel and/or component listener in addition or instead of the previous Object Message style calling interface.

The new interfaces create an instance of the Java class that lives as long as the panel it is connected to is present. A Java class of this type should be attached to a Panel or the Notebook Page Panel, and NOT to Controls or Menu items.

The implementation of the Java code can be done using a Java interface or by extending a class. Two flavors of the interface are available:

  • The interface se.entra.phantom.server.VirtualPanelListener, or
  • by extending the class se.entra.phantom.server.VirtualPanelAdapter.

It is recommended to use the extend mechanism of the adapter rather than implementing the interface, the adapter could be enhanced in future versions of NetPhantom, whereas the interface would require to have e.g. a second interface to be implemented by the class as well.

For more information about the Virtual Interface, see the JavaDoc.