public class GofListBoxIdentifier extends GofControlIdentifierAdapter implements PhantomControlType
templPanel
CTRLTYPE_BUTTON, CTRLTYPE_CHECK, CTRLTYPE_COMBO, CTRLTYPE_FRAME, CTRLTYPE_GRAPH, CTRLTYPE_GROUP, CTRLTYPE_INOUT, CTRLTYPE_LIST, CTRLTYPE_MLE, CTRLTYPE_NOTE, CTRLTYPE_OUT, CTRLTYPE_RADIO, CTRLTYPE_RECT, CTRLTYPE_SPIN, CTRLTYPE_SUB, CTRLTYPE_TEXT, CTRLTYPE_TREE, CTRLTYPE_UNKNOWN, CTRLTYPE_USER, CTRLTYPES_COUNT, names
GOF_GUIUNITX, GOF_GUIUNITY, GOF_MARGINX, GOF_MARGINY, GOF_OFFSETX, GOF_OFFSETY, GOF_STEPX, GOF_STEPY
Constructor and Description |
---|
GofListBoxIdentifier() |
Modifier and Type | Method and Description |
---|---|
void |
getControlSettings(IniFile confFile,
String subsection)
Loads setting for the control from the server ini-file.
|
void |
identifyCtrls(GuiOnTheFlyRuntime gofRuntime,
GofHostAreaIdentifier areaIdentifier,
PhantomHostScreen phantomHostScreen,
HostScreen hostScreen,
PhantomPanelData templPanel,
PhantomPanelData newPanel,
int offsetX,
int offsetY)
Identifies all the list box controls from the
GofHostFields . |
getVirtualSessionManager, identifyCtrls
public void getControlSettings(IniFile confFile, String subsection)
There are three settings for the list box that can be specified in the configuration file. They are the three below, with typical values.
listboxmincols=2 listboxminlines=2 listboxmaxheaderheight=2
There are four settings for the list box that can be specified in the configuration file. They are the four listed below, with typical values.
listboxmincols=2 listboxminlines=2 listboxmaxheaderheight=2 listboxmaxsellength=2The listboxmincols specifies the minimum number of columns required in a list box candidate for a list box control. The default value is two.
The listboxminlines specifies the minimum number of lines required in a list box candidate for a list box control. The default value is two.
The listboxmaxheaderheight specifies the maximum number of lines to search for the column headers. The default value is one.
There is also a setting that specifies if there is a filler character to use, and what character this should be. This setting is called listfieldfiller, and if the filler character were the underscore character, it would look like this:
listfieldfiller=_This class has a setting that affects the look of the entry fields. This is the listboxlayout setting. Valid values for this setting are:
listboxlayout=DEFAULT listboxlayout=FONT listboxlayout=COLOR listboxlayout=LINESDEFAULT means that no settings are taken from the template panel; default values will be used instead.
FONT means that the fonts are taken from template panel, from a list box with the id=LISTB. If this control cannot be found, or if it is not an output text control, default values will be used. Both the header font and the list font are taken from the template list box.
COLOR means that the colors are taken from template panel, from a list box with the id=LISTB. If this control cannot be found, or if it is not an output text control, default values will be used. The colors that will be taken from the template list box are background- and the foreground colors for both the header and the list.
LINES means that all the line settings from template panel, from a list box with the id=LISTB. If this control cannot be found, or if it is not an output text control, default values will be used. The settings that are taken from the template list box are line between columns, line between headers, line between header and column and the line between lines.
Any other value will be ignored.
All these layout settings can be combined in a suitable way. For example, if FONT, COLOR and LINES were wanted, the setting would look like this:
listboxlayout=FONT COLOR LINES
getControlSettings
in interface GofControlIdentifier
getControlSettings
in class GofControlIdentifierAdapter
confFile
- The server ini file.subsection
- The name of the GOF subsection that we are currently loading settings from.public void identifyCtrls(GuiOnTheFlyRuntime gofRuntime, GofHostAreaIdentifier areaIdentifier, PhantomHostScreen phantomHostScreen, HostScreen hostScreen, PhantomPanelData templPanel, PhantomPanelData newPanel, int offsetX, int offsetY)
GofHostFields
.
The identification of list boxes is done in several steps.
First the identification process goes through all unused GofHostFields, and creates column elements from them. GofHostFields in consecutive lines that starts in the same column, and has the same width, will be placed in a single column element.
In the second step, the identification process will go through all column elements, and create list elements from them. Column elements starting on the same line and with the same height are considered to belong to a single list element. When comparing the column elements start line to each other, consideration is taken that a column header might have been included at the top of some of the column elements. So if one starts, for example, one line above the other, but they end at the same line, they will still be considered to belong to the same list element. The first line in the column that started one line earlier will be used in the header.
Next, the identification process will check if a list element has the minimum number of lines and columns required for a list. The minimum number of lines and columns are specified in the configuration file. It will also check if the list element has texts or entry fields to left, if so it will not be considered a candidate for a list box. This means that the list box should be the first control from the left. This will always be true for a list in an AS/400 application created as a subfile.
The list box candidates left will be checked if the first column (NOTYET! The last) is editable and has a maximum width not greater than the value specified for the listboxmaxsellength setting. Then this column is accepted as a selection column, and the list accepted as a list box.
As a last step the identification process will try and find the column headers, before creating the list box.
identifyCtrls
in interface GofControlIdentifier
areaIdentifier
- The areaIdentifier in which the entry fields should be identified..phantomHostScreen
- The Phantom host screen corresponding to the host screen.hostScreen
- The host screen that we are trying to build a GOF panel for.newPanel
- The newly created Gui-on-the-fly runtime panel.offsetX
- The offset in columns for popup window.offsetY
- The offset in lines for popup window.gofRuntime
- The GuiOnTheFlyRuntime instance.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.