The FormattingBeans contain functionality to change Font information on Form Items. The current Font properties of the Item choosen in the ComboBox will also be reflected in the Beans. Available Functions: Bold, Italic, Strikethrough (only on TextItems), Underline (only on TextItems), Size, Change Font
Additional you can Save and Open the formatting of a Form & do an automatic Open of this file at Form startup.
The FormattingBeans can be integrated into your Form by copying from the Formatter Object Library. Next to this you will need to specify the Implementation Class on every Item that you want to format. At runtime the FormattingBeans will loop through all Items in the Form where the Implementation Class is set and will populate the ComboBox with these components. The Combobox will be populated here with a combination of a Contextname and Component name. This combination is used because for some items the Contextname is null.Here an image of the FormattingBeans in action:
1. In order for an application to be able to use the FormattingBeans, the relevant configuration in the formsweb.cfg file has to ensure that the supplied tomsdemos.jar is included in the relevant archive setting.
An entry in the formsweb.cfg file for an application that used the FormattingBeans would look like this:
[formatterDemo] pageTitle=OracleAS Forms Services - Client Info Demo IE=jinitiator baseHTMLJInitiator=demobasejini.html archive_jini=f90all_jinit.jar,tomsdemos.jar form=FORMATTER.fmx width=675 height=480 separateFrame=false splashScreen=no lookAndFeel=oracle colorScheme=blue background=/formsdemo/images/blue.gif2. The FORMATTER.fmx needs to be in a directory available in FORMS_PATH
tom.oracle.demos.FormatterVButton - on Button tom.oracle.demos.FormatterVTextField - on TextItem tom.oracle.demos.FormatterVTextArea - on Multiline TextItems tom.oracle.demos.FormatterVCheckBox - on Checkbox tom.oracle.demos.FormatterVCombo - on ComboBox tom.oracle.demos.FormatterVTList - on TList tom.oracle.demos.FormatterVRadioButton - on RadioButton tom.oracle.demos.FormatterVPopList - on PopList
This feature will open the Formatting file at startup of the Form. The following line has to be enabled in the WNFI trigger:
SET_CUSTOM_PROPERTY('FORMATTINGBEANS.FORMATTINGCONTROLBEAN',1,'FILENAME','c:\temp\FormatterDemo.ser');This will store/open the formatting for this form in the c:\temp\FormatterDemo.ser on client side. For every form you will need to choose another filename. In order for this feature to work the file should first be saved on clientside with the Automatic open checkbox enabled. Also if you are deploying .ser files to clients, be sure these clients have the fonts that are saved in this file.
With multirecord blocks every component will have an entry in the Combobox. This is due to the nature components are drawn on the screen and is normal behaviour
Next to this the following Settable Properties are available for debugging on any PJC Item: (output in java console)DEBUG_APPLET - Some applet information
Get the zipped file
Download the formatter.zip file