public static class FontTable.FontChooserDialog
extends java.lang.Object
SYSTEM-DIALOG FONT
statement.
It collects all options through dedicated methods and store them as an internal
configuration. When execute()
is called, a dialog box is displayed that allows the
user to select and associate a system font with the specified font number.
The SYSTEM-DIALOG FONT
statement provides a dialog box appropriate to the graphical
environment in which it runs.Modifier and Type | Field and Description |
---|---|
private boolean |
ansiOnly
Flag for allowing the font dialog to provide only fonts that contain ANSI character sets.
|
private boolean |
fixedOnly
Only mono-spaced fonts will be presented to user.
|
private int |
fontRef
The font reference to be associated by the dialog with the system font the user selects
in the dialog.
|
private handle |
inWindow
Specifies the parent window for the dialog box to be displayed.
|
private int |
maxSize
The maximum size of the font to be allowed to be selected.
|
private int |
minSize
The minimum size of the font to be allowed to be selected.
|
private logical |
toUpdate
A logical variable used as output parameter that will contain the status of the user's
dialog interaction: if the user validates it by selecting the
OK button, the
value of the variable is set to TRUE on return. |
Constructor and Description |
---|
FontChooserDialog(int64 fontRef)
Constructor.
|
FontChooserDialog(long fontRef)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FontTable.FontChooserDialog |
ansiOnly()
Force the dialog to provide only fonts that contain character representations and that
do not include graphic symbols or OEM.
|
void |
execute()
Validates the options and tells the client to create the dialog according to options
configured and then interpret the results.
|
FontTable.FontChooserDialog |
fixedOnly()
Force the dialog to filter out all but mono-spaced fonts.
|
FontTable.FontChooserDialog |
setMaxSize(long maxVal)
Sets the maximum size of the font to be allowed to be selected from size combobox.
|
FontTable.FontChooserDialog |
setMaxSize(NumberType maxVal)
Sets the maximum size of the font to be allowed to be selected from size combobox.
|
FontTable.FontChooserDialog |
setMinSize(long minVal)
Sets the minimum size of the font to be allowed to be selected from size combobox.
|
FontTable.FontChooserDialog |
setMinSize(NumberType minVal)
Sets the minimum size of the font to be allowed to be selected from size combobox.
|
FontTable.FontChooserDialog |
setWindow(handle window)
Configures the dialog to be created as child of a certain windows.
|
FontTable.FontChooserDialog |
update(logical update)
Configures the variable to be used as output parameter when the selection dialog is
closed.
|
private int fontRef
private logical toUpdate
OK
button, the
value of the variable is set to TRUE
on return. If the user rejects the dialog by
pressing the Cancel
button, the variable's value on return will be FALSE
.private handle inWindow
private boolean ansiOnly
private boolean fixedOnly
private int minSize
private int maxSize
public FontChooserDialog(int64 fontRef)
fontRef
- The index of font to be selected by user. Must be an integer in 0..255 interval.fontRef
public FontChooserDialog(long fontRef)
fontRef
- The index of font to be selected by user. Must be an integer in 0..255 interval.fontRef
public FontTable.FontChooserDialog ansiOnly()
FontChooserDialog
. Used for chaining.ansiOnly
public FontTable.FontChooserDialog fixedOnly()
FontChooserDialog
. Used for chaining.fixedOnly
public FontTable.FontChooserDialog setMaxSize(NumberType maxVal)
maxVal
- the maximum size of the font to be allowed to be selected.FontChooserDialog
. Used for chaining.public FontTable.FontChooserDialog setMaxSize(long maxVal)
maxVal
- the maximum size of the font to be allowed to be selected.FontChooserDialog
. Used for chaining.public FontTable.FontChooserDialog setMinSize(NumberType minVal)
minVal
- the minimum size of the font to be allowed to be selected.FontChooserDialog
. Used for chaining.public FontTable.FontChooserDialog setMinSize(long minVal)
minVal
- the minimum size of the font to be allowed to be selected.FontChooserDialog
. Used for chaining.public FontTable.FontChooserDialog update(logical update)
update
- A variable that will hold the return status of the dialog. That is true
if the dialog was accepted and false
otherwise.FontChooserDialog
. Used for chaining.toUpdate
public FontTable.FontChooserDialog setWindow(handle window)
window
- A handle to a window that will be the parent of the dialog. The handle must
refer a window or an error condition will be issued.FontChooserDialog
. Used for chaining.inWindow
public void execute()
SYSTEM-DIALOG FONT
statement provides
a dialog box appropriate to the graphical environment in which it runs.
Note: this method must be the last in a chaining.