JSet methods
JSet layout methods
beginLayoutSection (layout: in JLayoutType,
frame: in boolean,
frameLabel: in String)
According to the value defined for the JLayoutType, either a vertical (JLayoutVertical) or a horizontal (JLayoutHorizontal)section is opened, with a frame surrounding this section if frame has been set to true. A title is given to this frame is frameLabel has been defined.
endLayoutSection()
This closes the section previously opened. If no section has been previously opened, nothing happens.
changeColumn (spacing: in integer)
This creates a new column if the section is vertical, and a new line if the section is horizontal.
getPosition (x: out integer
y: out integer)
This is used to obtain the position of the cursor.
changePosition (posCursor: in integer)
This changes the position of the cursor according to the co-ordinates provided. It is not, however, possible to move the cursor to a position inferior to the default position.
JSet addition methods
Graphic elements that include internal values are identified by a character string defined by the user upon their creation. This identifier makes it possible to modify and retrieve graphic element values.
Graphic elements are made up of a title (this is optional), placed above the gadget in question, except in the case of a toggle.
addLabel (label: in String)
This adds a remark. The carriage return character is permitted.
addBitmap (bitmapName: in String)
This adds a bitmap (either a .gif or .bmp file).
addToggle (ident: in String, label: in String,
value: in boolean)
This adds a two-state button.
addField (ident: in String, label: in String,
value: in String,
type: in JcontrolFieldTextType,
width: in integer)
This adds a text field. The following JControlTextType types are possible:
· JControlTextField: a text field which may be edited
· JControlNumberField: a numeric field
· JControlDate: a date field
· JControlPassword: a password field
· JControlFileOpen: a file open field (this is a text field linked to a button and used to open a file or directory selector, for both Windows and UNIX)
· JControlFileSave: a file save field (this is a text field linked to a button and used to open a file or directory selector, for both Windows and UNIX)
· JControlDirectory: a file directory field (this is a text field linked to a button and used to open a file or directory selector, for both Windows and UNIX)
Where the field is linked to a file or directory selector, the field is composed of the text indicating the selected path and a button used to open the selector box. In UNIX, Open, Save and Directory open the same dialog box.
Note: It is also possible to open a file browser or a directory browser directly in J.
addText (ident: in String, label: in String,
value: in String, width: in integer,
height: in integer);
This adds a multi-line text. The carriage return character separates the lines.
addList (ident: in String, label: in String,
multiple: in boolean, width: in integer,
height: in integer)
This adds a list. The list is a multiple selection list, where the multiple parameter has been set to true. If this is not the case, a simple selection list is added.
List values are updated by the addListItem and removeListItem methods.
addCombo (ident: in String, label: in String,
width: in integer)
This adds a combo box. List values are updated by the addListItem and removeListItem methods.
addHelp (labelHelp: in String,
htmlFile: in String)
This adds a button called labelHelp , which is associated with the File html file. This can be a URL.
addTree (ident : in String, label : in String,
width : in integer, height : in integer,
multiple : in boolean)
return JTree
This adds a tree (and returns an instance of the JTree class). The multiple boolean indicates the trees selection mode (multiple/simple).
JSet value retrieval methods
getValue (ident: in String, value: inout String)
return boolean
This retrieves a value in the form of a string corresponding to the check which has the ident identifier. The gadget can be text, a field (text, date, numeric), a toggle, in which case the state is converted into a string (true or false) or a list, in which case the first selection is retrieved.
getValueList (ident: in String,
justSelection: in boolean,
valueList: inout SetOfString)
return boolean
This retrieves the list of those items which make up the list, if the justSelection has been set to false. Otherwise, the list of selected items is retrieved.
getTree (ident : in String)
return JTree
This retrieves the instance of the JTree class named "ident".
JSet value modifying methods
setValue (ident: in String, value: in String)
return boolean
This allocates the character string to the check which has the ident identifier. This check can be text, a field (text, date,
etc.), a number (whose value must be numeric) or a toggle (whose value must be
either true or false).
addListItem (identList: in String,
value: in String,
bitmapName: in String,
selected: in boolean)
return boolean
This adds a field to the list, which has the identList as identifier, value as its value and bitmapName (this can be left empty) as its bitmap. The bitmap is not taken into account for combo boxes. If the selected parameter is set to true, it will be selected in the list. This is true for list and combo type checks.
removeListItem (identList: in String,
value: in String)
return boolean
This removes the value field from the list which has identList as its identifier. This is true for list and combo type checks.
getIdent ()
return String
This returns the dialog box identifier.
readAndAddFile (ilvFileName: in String,
ilvScriptFileName: in String)
This adds an Ilog resource file to the dialog box.
resetList (ident : in String)
This is used to empty the "ident" identifying list. This method also works with combos.
JSet presentation methods
boolean JSet::setFont(in string ident_i ,
in string family,
in integer fontSize,
in boolean bold,
in boolean italic)
This changes the character font of the "ident_i" identifier field. It returns true if the field exists and it is possible to allocate to this field the "family" font name with the "fontsize" size, in bold if "bold" is true and in italics if "italics" is true.
Certain combinations of font size and bold/italic attributes are not possible for certain fonts. This depends on the font in question and the operating system.
boolean setForegroundColor(in string ident_i,
in integer red,
in integer green,
in integer blue)
This changes the color of the text for the "ident_i" identifier field. The intensity values for red, green and blue should be situated between 0 and 255. The method returns true if the operation has been carried out correctly. The method returns false if the field has not been found, or if one of the values is incorrect.
boolean setBackgroundColor(in string ident_i,
in integer red,
in integer green,
in integer blue)
This changes the background color for the "ident_i" identifier field. The intensity values for red, green and blue should be situated between 0 and 255. The method returns true if the operation has been carried out correctly. The method returns false if the field has not been found, or if one of the values is incorrect.
setFocus (ident : in string)
This gives the focus to the graphic element identified by the ident string.
setFocusOkButton ()
This gives the focus to the "OK" button.
setFocusCancelButton ()
This gives the focus to the "Cancel" button (if this exists).