Top
Interstage Studio J Business Kit GUI Library User's Guide
FUJITSU Software

4.1.1 Development Flow

The development flow using the UI Screen Control Facility is as follows.

  1. 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.

  2. Create a UI Screen Control Panel from subclass of the following classes.

    • JFCCardPanel

    • JFLCardPanel

    • JFCTabbedPanel

  3. 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(......);
        ....
    }
    Table 4.2 Creation Timing List

    Timing

    Class Variable to specify

    Description

    at Initialization

    JFCObjectLoader.INIT_CREATION

    Creates the UI screen object immediately when UI Screen is registered.
    Normally, addPanel is called from within createPanels method, and createPanels method is called during initialization of the application or applet, so in this case the UI screen object will be created during application or applet startup.

    when Displayed

    JFCObjectLoader.DELAYED_CREATION

    Creates the UI Screen when is is displayed.
    This is the creation timing recommended for applications or applets with a large number of UI Screens.

    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.
    This creation timing is specified to increase screen transition speed for large UI Screens that are frequently used, when application or applet startup performance is also important.

    Table 4.3 Release Timing List

    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.
    This timing is used for applications or applets designed to save on memory resource usage.

    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.
    The maximum number of UI Screens held in buffered memory can be set by calling setReleaseBufferSize method in UI Screen Control Panel. The default value is 10.

    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.
    Normally, this is synonymous to termination time of the application or applet.

  4. 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.