public class GofComboBoxIdentifier 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 |
---|
GofComboBoxIdentifier() |
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 combination box controls from the
GofHostFields . |
getVirtualSessionManager, identifyCtrls
public void getControlSettings(IniFile confFile, String subsection)
For the identification of combination boxes, the following settings are used:
comboliststart The start indicator for a list of alternatives. combolistend The end indicator for a list of alternatives. combolistsep The separator between the alternatives in the list.
There are also several possibilities of where the combolist can be placed relative to the entry field that will be replaced by the combination box. The list can either be in the preceding lead text or in the lead text following.
The setting combolistsearch
will tell this class where to look for
the combolist, and in what order to search if multiple places are to be searched.
Valid values are:
pre Search the preceding leadtext. post Search the trailing leadtext.
To handle situations where the original text in the host field is not part of the
drop down list, the setting comboaddmissingtext
is used.
Valid setting for this setting is 0 or 1. 0 means that the original text should not be added to the list. In this case the combination box will be created as an editable combination box. 1 means that the text should be added to the list. Default is 0.
It is also possible to force the spin button to always be created as an editable spin button. This is specified in the spinalwayseditable setting.
comboalwayseditable=1There is also a setting that specifies if there is a filler character to use, and what character this should be. This setting as called combofieldfiller, and if the filler character is the underscore character, it would look like this:
combofieldfiller=_This class also uses a setting that affects the look of the combination boxes. This is the combolayout setting. Valid values for this setting are:
combolayout=DEFAULT combolayout =FONT combolayout =COLOR combolayout =FONTANDCOLORDEFAULT means that no settings are taken from the template panel; default values will be used instead.
FONT means that the font is taken from template panel, from a combination box with the id=CMB or CMBE (CMB is for non-editable combination boxes, CMBE is for editable combination boxes). If this control cannot be found, or if it is not a combination box control, default values will be used.
COLOR means that the color is taken from template panel, from a combination box with the id=CMB or CMBE (CMB is for non-editable combination boxes, CMBE is for editable combination boxes). If this control cannot be found, or if it is not a combination box control, default values will be used.
FONTANDCOLOR means that the font and color are taken from template panel, from a combination box with the id= CMB or CMBE (CMB is for non-editable combination boxes, CMBE is for editable combination boxes). If this control cannot be found, or if it is not a combination box control, default values will be used.,
Any other value will be treated as DEFAULT.
getControlSettings
in interface GofControlIdentifier
getControlSettings
in class GofControlIdentifierAdapter
confFile
- The server ini file.subsection
- The name of the subsection used for the current Gui-on-the-Fly settings.public void identifyCtrls(GuiOnTheFlyRuntime gofRuntime, GofHostAreaIdentifier areaIdentifier, PhantomHostScreen phantomHostScreen, HostScreen hostScreen, PhantomPanelData templPanel, PhantomPanelData newPanel, int offsetX, int offsetY)
GofHostFields
.
The identification of combination boxes are done by searching for a lead text that indicates an entry field that could be replaced by a combination box. A lead text indicating a combination box should have a start indicator, an end indicator and two or more values separated by a separator. The start indicator is usually a start parenthesis, the end indicator is usually an end parenthesis, and the separator is usually a slash. But these are configurable in the configuration file.
After a lead text has been identified to hold a combination box indicator, it checks if the next or previous field is an entry field, and that it is on the same line. There is a configuration that determines if the lead text should be before the entry field, or after, or if both are accepted, and if so, in which order to search.
identifyCtrls
in interface GofControlIdentifier
gofRuntime
- The GuiOnTheFlyRuntime instance.areaIdentifier
- The areaIdentifier in which the controls 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
- Offset in columns used for popup windows.offsetY
- Offset in lines used for popup windows.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.