Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
12 mai 2007 6 12 /05 /mai /2007 21:13

Purpose

Here is a Java bean that allows decorating the Forms application containers.

Personalize

It becomes very easy to change all the fonts of a Forms application at runtime.

You can set the Font Family, weight and size, foreground and background color on the
following elements:

  • . Menu bar
  • . Menu options
  • . Window title (font only)
  • . Items
  • . Status bar




The Java code

    Personalize.java



The implementation class of the Bean Item

     oracle.forms.fd.Personalize


The methods you can set



Set the element properties
  

Set_Custom_Property( 'BL.BEAN', 1, 'SET_PROPERTIES', 'properties' );

properties is : Element_type, Font name, Font weight, Font size[, Foreground color, Background color]

Element_type can be:

  • . TextField
  • . TextArea
  • . Button
  • . CheckBox
  • . RadioB
  • . Tree
  • . ComboBox
  • . PopList
  • . TList
  • . Tree
  • . MenuBar
  • . MenuOption
  • . Status
  • . Window

 

e.g. :

Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'TextField,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'Button,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'CheckBox,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'RadioB,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'Tree,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'ComboBox,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'Tree,Tahoma,B,14,r0g128b255' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'MenuBar,Tahoma,B,14,r255g128b0,r200g255b150' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'MenuOption,Tahoma,B,14,r0g185b90,r255g255b150' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'Status,Tahoma,B,12,r255g255b255,r0g185b90' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_PROPERTIES', 'Window,Tahoma,B,14' )
   
 

Start the decoration

Set_Custom_Property( 'BL.BEAN', 1, 'BEANINFO', '' );

 


The sample dialog

     . Download the personalize.zip file
     . Unzip the file
     . copy the personalize.jar files in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file
     . Open the personalize.fmb module (Oracle Forms 10.1 .2)
     . Compile all and run the module


Partager cet article
Repost0

commentaires

J
Hi<br />  <br /> First of all: sorry for my bad English<br />  <br /> My final goal is to change the statusbar in Oracle Forms. Therefore I found the very interesting article on your site ‘A bean to decorate the form elemets’<br /> I did all what you say on the page, but when I will run the personalize form I have this error<br /> java.lang.VerifyError: (class: oracle/forms/fd/Personalize$cObj, method: signature: (Loracle/forms/fd/Personalize;Ljava/awt/Font;Ljava/awt/Color;Ljava/awt/Color;)V) Expecting to find object/array on stack <br /> I Work with Jinitiator 1.3.1.22. What can I do to solve this problem<br />  
Répondre