Samedi 15 septembre 2007

Purpose

Here is a Java Bean to read the Window Forms menu option.

You have access to every window opened in the Forms application to minimize or restore them.


windowmenu1

windowmenu2

windowmenu3




The Java code

     WindowMenu.java



The implementation class of the Bean Item

     oracle.forms.fd.WindowMenu


The methods you can call


Scan the application to find every opened window

Set_Custom_Property('BLOCK.ITEM',1,'FIND_WINDOWS','');

e.g. :
Set_Custom_Property( 'BL.BEAN', 1, 'FIND
_WINDOWS', '' ) ;   



Minimize all windows

Set_Custom_Property('BLOCK.ITEM',1,'MINIMIZE_ALL','');

 

Minimize a single window

Set_Custom_Property('BLOCK.ITEM',1,'MINIMIZE_WINDOW','window_title');


Restore all windows

Set_Custom_Property('BLOCK.ITEM',1,'RESTORE_ALL','');



Reastore a single window

Set_Custom_Property('BLOCK.ITEM',1,'RESTORE_WINDOW','window_title');





The properties you can get from the JavaBean


Get the list of opened windows

Varchar2 :=
Get_Custom_Property( 'BL.BEAN', 1, 'GET_WINDOWS'
) ;

Returns a comma separated list like the following : Window 1,Window 2[,...]




The sample dialog


     . Download the windowmenu.zip file
     . Unzip the file
     . copy the windowmenu.jar file in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file to add  windowmenu.jar .
     . Open and compile both the windowmenu.fmb and windowmenu2.fmb modules (Oracle Forms 9.0.2)
     . Compile all and run the windowmenu module

par Oracle Forms community publié dans : Bean - general
ajouter un commentaire commentaires (0)    recommander
Blog : Consoles sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur avec TF1 Network - Signaler un abus