public class GofSpinButtonIdentifier 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 |
---|
GofSpinButtonIdentifier() |
Modifier and Type | Method and Description |
---|---|
void |
getControlSettings(IniFile confFile,
String subsection)
Loads setting for the controll 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 spin-button controls from the
GofHostFields . |
getVirtualSessionManager, identifyCtrls
public void getControlSettings(IniFile confFile, String subsection)
For the identification of spin buttons, the following settings are used:
spinrangestart The start indicator for a value range. spinrangeend The end indicator for a value range. spinvaluesep The separator between the range values.There are also several possibilities of where the spin button indicator can be placed relative to the entry field that will be replaced by the spin button. The indicator can either be in the preceding lead text or in the trailing lead text.
The setting spinsearch will tell this class where to look for the spin button indicator, and in what order to search if multiple places are to be searched.
Valid values are:
pre Search the preceding lead text. post Search the trailing lead text.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.
spinalwayseditable=1There is also a setting that specifies if there is a filler character to use, and what character this should be. This setting is called spinfieldfiller, and if the filler character were the underscore character, it would look like this:
spinfieldfiller=_This class also uses a setting that affects the look of the spin buttons. This is the spinlayout setting. Valid values for this setting are:
spinlayout=DEFAULT spinlayout=FONT spinlayout=COLOR spinlayout=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=SB or SBE (SB is for non-editable combination boxes, SBE 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=SB or SBE (SB is for non-editable combination boxes, SBE 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=SB or SBE (SB is for non-editable combination boxes, SBE 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 spin buttons are done by searching for a lead text that indicates an entry field that could be replaced by a spin button. A lead text indicating a spin button should have a start indicator, an end indicator and two 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 hyphen. But these are configurable in the configuration file.
After a lead text has been identified to hold a spin button 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
- The offset in columns for popup window.offsetY
- The offset in lines for popup window.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.