Purpose

This JavaBean allows to find and handle the form windows (current window and MDI window).
With this handle, you can set some particular properties like the following:

   . setMovable()*
   . setClosable()*
   . setMaximizable()*
   . setMinimizable()*
   . setModal()*
   . setResizable()
   . setVisible()
   . enable()*
   . disable()*
   . setToolTipValue()*
   . setIcon()
   . setExtendedState() (only with SE 4.0)
   . setAlwaysOnTop() (only with SE 5.0)

    * You cannot apply this function on the MDI frame.

FormsFrames

How to find the frames ?

You can recursively find the different layers with the getParent() function.

      Container container = this.getParent();
      while (container!=null)
      {
        // output the object hierarchy
        System.out.println("--> "+container.getName()+" ["+container.getClass()+"]") ;
        container = container.getParent() ;
      }

The FORMSFRAMES.fmb sample module shows, in the Java console, the list of all the layers.


The application Forms window class name is oracle.forms.ui.ExtendedFrame      
The application Forms MDI window class name is oracle.ewt.swing.JBufferedFrame

Notice that in future version, this class names may change.



The Java code

     formsframe.java

     The JAR file must be signed

The properties you can set

set the frame structure info
Set_Custom_Property('BL.BEAN',1NFO','' ) ;

movable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET', 'MOVE,true|false' ) ;

closable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET', 'CLOSE,true|false' ) ;

maximizable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET', 'MAX,true|false' ) ;

minimizable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET', 'MIN,true|false' ) ;

resizable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET', 'SIZE,true|false' ) ;

disable()
Set_Custom_Property( 'BL.BEAN', 1, 'SET','DISABLE' ) ;  

set icon for standar or MDI frame
Set_Custom_Property( 'BL.BEAN', 1, 'SETICON','target,icon_name' ) ;

    -- Set the MDI icon --
  Set_Custom_Property('BL.BEAN',1ETICON','MDI,/indxicon.gif' ) ;
  
  -- Set the internal window icon --
  Set_Custom_Property('BL.BEAN',1ETICON','WIN,/oracle.gif' ) ;



maximize the MDI frame (works only with the Sun Java Plug-in JRE 1.4)
Set_Custom_Property( 'BL.BEAN', 1, 'SETMAXSIZE','true|false' ) ;

Set the window always on top (works only with the Sun Java Plug-in JRE 1.5)
Set_Custom_Property( 'BL.BEAN', 1, 'SETONTOP','true|false' ) ;

(if you want to use this property, use the formsframes5.jar file instead of the formsframes.jar)


In this demo, 2 icon files are stored in the root of the jar file (indxicon.gif and oracle.gif)


The sample dialog

     . Download the formsframes.zip file
     . Unzip the file
     . copy the formsframes.jar file in the <ORACLE_HOME>/forms/java directory
       (or the formsframes5.jar if you use the 1.5 JRE)
         the jar file must be signed
     . Edit your /forms/server/formsweb.cfg file
     . Open the FORMSFRAMES.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

     Open the Java console to see the whole frame structure of the Forms module