The development flow using the UI Screen Control Facility is as follows.
Create each UI Screen from subclass of the following classes.
JFCEntryPanel
JFLEntryPanel
JFLEntryScrollablePanel
JFCEntryInterfacePanel
JFLEntryInterfacePanel
JFLEntryInterfaceScrollablePanel
JFCMultiPagePanel
JFLMultiPagePanel
JFLMultiPageScrollablePanel
These screens can be developed efficiently using a Java development environment supporting a GUI builder.
Create a UI Screen Control Panel from subclass of the following classes.
JFCCardPanel
JFLCardPanel
JFCTabbedPanel
Register UI Screens (created in step 1) to the UI Screen Control Panel (created in step 2).
Register each UI Screen by redefining createPanels method. Registration is done by calling the UI Screen Registration method addPanel. The UI Screen names specified for each UI Screen using the addPanel method must be unique among the UI Screen names.
For example, to register a subclass of JFCEntryPanel created in step 1 called Panel1, the following code may be used.
protected void createPanels() { this.addPanel(......); this.addPanel(......); this.addPanel("BusinessScreen1", "Panel1", JFCPanelLoader.DELAYED_CREATION, JFCPanelLoader.TEMPORARY_INSTANCE); //addPanel arguments are described below. //1st argument specifies UI Screen name (unique name used to specify transition target during UI Screen transition). //2nd argument specifies the created panel class name. //3rd argument specifies the UI Screen object creation timing. // For the above example, the UI Screen is created when the UI screen is displayed. // Refer to Creation Timing List below for other creation timings. //4th argument specified the UI Screen release timing. // For the above example, the UI Screen is released when this UI Screen is released after a screen transition. // Refer to Release Timing List below for other release timings. this.addPanel(......); .... } |
Timing | Class Variable to specify | Description |
---|---|---|
at Initialization | JFCObjectLoader.INIT_CREATION | Creates the UI screen object immediately when UI Screen is registered. |
when Displayed | JFCObjectLoader.DELAYED_CREATION | Creates the UI Screen when is is displayed. |
Asynchronously at Initialization | JFCObjectLoader.BACKGROUND_CREATION | Creates the UI screen object when addPanel method is called, using a separate thread from the application or applet. |
Timing | Class Variable to specify | Description |
---|---|---|
when Hidden | JFCObjectLoader.TEMPORARY_INSTANCE | The UI Screen is held in memory only while it is displayed, and the UI Screen is released from memory when it is hidden after a screen transition. |
Buffered | JFCObjectLoader.BUFFERED_INSTANCE | The UI Screen is held in a memory buffer when it is hidden after a screen transition. When the number of UI Screen held in the memory buffer exceeds the limit of buffered screens set in UI Screen Control Panel, the oldest UI Screen is released from memory. |
at Application/Applet termination | JFCObjectLoader.PERMANENT_INSTANCE | The UI Screen is held in memory until the UI Screen Control Panel managing the UI screen is released from memory. |
Add the JFCCardPanel subclass created in step 2 to an application or applet.
Here, an extension to the UI Screen registration process in step 2, is proposed. The createPanels method in the UI Screen Control Panel subclass may be implemented to register UI Screens specified in an external data file. This way, the UI Screen registration can be done by modifying only the external data file, so the only coding required will be in implementing the UI Screen classes in step 1.
JFCScrollablePanel uses an off screen image to draw the ViewPanel.
The minimum memory (in bytes) required for the off screen image can be calculated as below:
minimum memory required = 3 X width of ViewPanel X height of ViewPanel |
When using many UI Screens with ViewPanels much larger than the displayable area, it is necessary to specify the UI Screen release timings in order to adjust the memory usage.