Using the Editors |
The editor is a graphical environment for building and manipulating screens, reports, and service components that make up your Panther application. All of the features that make GUIs (Graphical User Interfaces) easy to use are available in the editor—regardless of your environment. With Panther, you can create GUI applications that are virtually platform-independent as well as ensure that your application complies with the GUI standards of your choice.
While using the editor, you can:
This chapter addresses the basic aspects of the editor workspace:
Editor Workspace |
When you start the editor, the editor workspace is displayed consisting of a menu, toolbars, a new screen and an associated Properties window. It can display optional secondary windows for screens, reports or service components. It is in this space that you begin creating the interface to your application.
Figure 2-1 The Editor Workspace
The following components are displayed:
In Windows applications, toolbars can be moved and docked to various parts of the MDI frame. (For more information on this feature, refer to "Dockable Toolbars.")
Note: Under Motif, the tooltip does not display when the toolbar button is inactive.
Note: Under Motif, status line text does not display for inactive menu items.
While working in the editor you can access other editor tools, such as the Toolbars and Color palette, to facilitate application development. You can ensure that these same windows open automatically every time you open the editor by saving your preferences; choose FileSave Pref.
You can access the other editor windows by selecting the appropriate command from the View menu.
The editor menu bar provides you with easy access to the operations and commands that help you develop applications. This section provides a brief overview of each menu option and its contents.
The File menu commands displayed on the toolbar allow you to create new application components, open and save existing components, and access test mode where you can test a screen or report.
The commands associated with the File menu include:
Edit menu commands let you manipulate and design your application screens—providing alignment, centering, spacing, and sizing options as well as standard editing operations, like cut and paste.
The commands associated with the Edit menu include:
Create menu commands provide options for creating all widgets: labels, text, selection-type widgets, and grid widgets as well as graphical elements, like lines and boxes.
The drop-down list initially lists dual-deployment widgets (such as dynamic label and single line text widget) which are available on all platforms. At the bottom of the list is a submenu of Extended Widgets which cannot be deployed on every platform.
Extended Widgets currently include:
View menu commands allow you to specify which of the editor's windows are displayed. The menu settings can be toggled on and off to display or hide specified windows. The View menu contains the following options:
View Menu
Options menu commands let you to specify how your workspace in the editor looks and acts. You can save these preferences as well as the editor's screen positions by choosing FileSave Pref. Or, you can save your current state and preferences by choosing Save Preferences on Exit from the Options menu. Refer to the following section for details on setting preferences.
The Tools menu provides the ability to import database objects, compile Java code, and access the Menubar, Styles, and JIF editors.
Windows menu commands provide access to all open windows in your editor workspace. At the bottom of the Windows menu is a list of open windows/screens from which you can select and bring focus.
Report menu commands allow the generation of reports from within the editor. In three-tier environments, these reports can be generated only on the client via a local database connection; server-based reports must be processed using the command line or by JPL commands.
GUI versions of the editor contain toolbars with the most popular menu items.
Figure 2-2 The Toolbar in the Motif Version of the Editor
In Windows executables, you can expose or hide any of six toolbars. Panther runs within an MDI frame. If a toolbar is visible in the editor, it can be separated, moved and docked anywhere within the frame.
By choosing OptionsConfigure Toolbars, you can select the check boxes of the toolbars you want to display in the editor.
Figure 2-3 Create Toolbar
Figure 2-4 Create Toolbar for Framesets
Figure 2-5 Main Toolbar
Figure 2-6 Edit Toolbar
Figure 2-7 Positioning Toolbar
Figure 2-8 Report Layout Toolbar
Figure 2-9 Report Structure Toolbar
Chapter 25, "Menu Bar Editor," contains information about making toolbars.
Types of Widgets |
Widgets are self-contained in that they hold all the information they require. Each widget type has a unique set of properties which, in fact, define the widget—the way it looks and the way it behaves. There are widgets that function as labels and only display text; others are used to accept data, while others only output data. The editor provides, via the Properties window, a way for you to establish the initial behavior and look of your application screens and their content. However, for the most part, you can change these defaults at runtime with Panther-provided library functions or through the property API.
You can create widgets via the Create toolbar or the Create menu. On the Create menu, the widgets that are only available on certain platforms are accessible from CreateExtended Widgets.
Each widget type is briefly described here. References to more detailed information for implementing these widgets are also indicated.
Display-type widgets are those which display information, either textually or graphically. For the most part, the user cannot bring focus to these widget types, and therefore, cannot modify the content directly.
Availability: All platforms
Availability: All platforms
Availability: All platforms
Text widgets are used for accepting and displaying data at runtime. You can define the initial content of these widgets by setting the appropriate property. Refer to Chapter 14, "Data Entry Widgets," for information on creating data entry fields.
Availability: All platforms
Availability: All platforms
Availability: Motif, Windows
Availability: All platforms
These widgets, although very different from one another, in general, provide the user with a means of inputting data without having to type data.
Availability: All platforms
Availability: All platforms
A command widget, when activated, executes an action or event. It requires no user input other than choosing the widget. Although other widget types can carry out a command, most GUI applications make frequent use of push buttons to perform an action.
Availability: All platforms
Selection widgets provide choices to the user. By default, some of these widgets allow for a single selection, while others let the user make several selections. These widgets are protected from data entry and clearing. Selection widgets of like kind can be grouped (for more information on grouping widgets, refer to "Grouping Selection Widgets"). Grouped selection widgets have their own set of properties. Selection widgets can also function alone. Check boxes and toggle buttons are examples. In addition, those widgets that have labels can optionally display pictures (for GUI environments) on them instead of the label text.
For more information on providing user options in your application, refer to Chapter 20, "Selection Widgets."
Availability: All platforms
Availability: All platforms
Availability: Motif, Windows
Availability: All platforms
There are two graphic elements that you can draw to enhance the look and organization of your screens. You can specify size and color for these types of widgets. They are not field widgets and therefore cannot receive or display data; they are decorative. Refer to Chapter 21, "Graphics Widgets," for more information about using lines and boxes on your screens.
Availability: All platforms
There is a single database widget that is specific to database definitions. It is used to define relationships between parent and child table views on your screen. This widget type is used by the transaction manager in order to carry out database transactions. Refer to Chapter 22, "Table Views and Links," for more information on linking table views.
parent+child
.
Availability: All platforms
The ActiveX container allows you to specify which ActiveX control to make a part of your application.
Availability: Windows, Web
The tab control allows widgets to be grouped onto individual display cards inside a tab deck. Refer to Chapter 16, "Tab Controls," for more information.
Availability: Windows, Motif
Availability: Windows, Motif
There are two additional widget types—both of which are permanently hidden at runtime and design time. However, like other Panther widgets, these too have their own set of properties, which you can access by selecting the hidden widget from the Widget List or from a variety of access points (discussed later in this guide).
A table view widget is automatically created on each repository entry when you import database tables into a repository. When you copy a database-derived widget from a repository entry, Panther creates a table view on the destination screen, provided the copied widget belonged to a table view in the repository entry. Refer to Chapter 22, "Table Views and Links," for more information on table views and their properties.
Availability: All platforms
Availability: All platforms
When a report layout window has focus, the Create menu displays the widget types available for reports. When the report structure window has focus, the Create menu lists the report nodes that can be added to the report structure.
The following widget types are only available for report layouts:
Availability: Windows (Panther 4.5+)
Availability: Windows (Panther 4.5+)
Availability: Windows (Panther 4.5+)
Properties Window |
The editor provides, via the Properties window, a way for you to establish the initial behavior and look of your application components and their content.
You must select an object (screen, service component, report, widget) to set its properties. By default, the application component is selected when none of its widgets are selected. Do either of the following to deselect widgets:
Untitled
followed by a number.
???
) are displayed.
???
) are displayed.
If a property has more than one predefined value:
You can search for properties (when the list is expanded) by typing an initial character. The cursor moves to the next occurrence that matches.
The left column displays all applicable properties for a selected object; the right column displays the current property value setting. When more than one widget type is selected, only the properties that apply to all are displayed. In addition, three questions marks (???
) are displayed in the values column if you select multiple widgets that have differing property values.
Property values in the right column that are displayed in reverse video indicate that the setting is inherited from another source. For further information on inheritance, refer to "Controlling Inheritance."
Each object has default properties. Some of the properties apply to all objects; other properties are, in fact, what define and make objects unique. Setting properties through the editor allows you to initialize the content of your application components. After you complete your application interface, you can also control and alter the behavior and look of widgets and screens at runtime by using Panther's API, which includes C library functions, a property API, and Java interfaces.
In general, the property headings listed here for widgets are common to all widget types; the properties within each heading vary depending on the widget type. Some properties appear only if other property specifications have already been indicated. For example, if the Data Formatting property is set to Date/Time, a System Update property is available. These dependent properties are preceded by -> in the Properties window. In addition, a default setting for a property can vary depending on the widget type; however, if the property is listed in the Properties window, you can change it.
Note: If you have more than one widget type selected, only those properties that apply to all appear in the Properties window.
SELECT
statement or in the WHERE
clause of the SQL statement. Refer to Chapter 33, "Using Automated SQL Generation," in Application Development Guide for more information on Database properties.
The screen itself has its own set of properties. You gain access to these properties when a screen is selected (no widgets on the screen can be selected).