Overblog
Suivre ce blog
Editer l'article Administration Créer mon blog
15 septembre 2007 6 15 /09 /septembre /2007 09:51

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','');



Restore a single window

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



Set the window(s) bounds

Set_Custom_Property('BLOCK.ITEM',1,'SET_BOUNDS','param');

Where param is: WINDOW_NAME|ALL,x|-[,y|-[,width|-[,height|-]]]


Use the ALL keyword to move all the windows.
Use a - instead a value to skip its definition:

-- set all windows new X position to 30 pixels
Set_Custom_Property( 'BL.BEAN', 1, 'SET_BOUNDS', 'ALL,30,-'
) ;


-- set all windows X position to 10 and width to 100
Set_Custom_Property( 'BL.BEAN', 1, 'SET_BOUNDS', 'ALL,10,-,100,-'
) ;





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

Partager cet article

Published by Oracle Forms community - dans Bean - general
commenter cet article

commentaires

www.torontowebdesign.company 28/02/2015 07:22

The treaties happen to be continuously amended by various other treaties on the 65 years given that they ended up initial brought in. The consolidated model in the a pair of core treaties will be regularly printed by the Western european Percentage.

best dissertation editing services 23/02/2015 13:21

I am in need of a best dissertation editing services. Your essay editors are very natural essay services providing your blog is all the essay tips providing my students. Thanks a lot given this opportunity.

seo services 17/02/2015 10:29

Une formule floral est une façon de représenter la structure d'une fleur à l'aide des lettres spécifiques, chiffres et symboles, présentant des informations substantielles sur la fleur sous une forme compacte.

Daxesh Laiwala 21/07/2011 11:39



dea sir,


javabens i used in forms working fine on windows client but not working in linux client


reply me thanks


daxesh



Oracle Forms community 22/07/2011 07:05



Sorry, I do not know the linux client. The Java code use the Desktop objet
Enumeration enumeration = desktop.getWindows();
that, maybe, is differently implmented by Windows and Linux.