Programming Guide



ApplicationInterface

Interface definition for the application as a whole

public interface ApplicationInterface extends WidgetInterface

Methods

getScreen
ScreenInterface getScreen();
ScreenInterface getScreen(int level);
ScreenInterface getScreen(String name);
ScreenInterface getScreen(String name, int instance)
;

getWidget
WidgetInterface getWidget(int id);

Environment

Java only

Description

One of the methods of WidgetInterface, and therefore common to all widgets, is getApplication. This returns an object that represents the application as a whole. The methods that get and set properties can be used on this object to program application-scope properties.

The getScreen method returns an object corresponding to a screen. It has four variants. When called with no parameters, it returns an object corresponding to the current screen (the top of the window stack). When called with one integer parameter, the integer specifies the zero-based offset in the window stack, as used by the Panther library function sm_wselect. When called with one string parameter, the string specifies the screen's name. To get an object corresponding to a specific instance of a screen (you can have more than one copy of a screen open at a time), call getScreen with both the name and an integer that corresponds to the instance of the screen you wish to specify.

The getWidget method returns an object corresponding to a widget given an object id for the widget. If the widget is a screen, field, group, etc., the object returned will be cast to the appropriate type. In other words, the object returned will not merely implement WidgetInterface, but will implement FieldInterface, ScreenInterface, etc., as appropriate.