All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.demo.BeanArea

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----oracle.ewt.lwAWT.LWComponent
                           |
                           +----oracle.ewt.lwAWT.LWContainer
                                   |
                                   +----oracle.forms.ui.VBean
                                           |
                                           +----oracle.demo.BeanArea

public class BeanArea
extends VBean
 NAME
      BeanArea.java
 DESCRIPTION
 This class adds support for non-indexed JavaBean properties, heavyweight
 beans and Applets to VBean.
 NOTES
 On startup, all of the Bean's properties are registered, using
 ID.registerProperty.  These properties can then be set from PL/SQL, using
 set_custom_item_property, or in a future release got from PL/SQL, using
 get_custom_item_property.  These properties will also be accessible from the
 Java API, using get/setProperty(...)
 

Because set_custom_item_property only accepts int, boolean or string parameters, it is difficult to support other parameter types. We try to handle a few common types, such as java.awt.Color but there is no general solution to this. Support for these properties has to be added in a subclass.

If the bean is heavyweight, an instance of HeavyBeanManager is created. This class manages the interaction of the heavyweight bean with forms' lightweight framework.

The bean can be specified in two ways: By subclassing and implementing getProperty(BEAN_NAME) or by setting the bean in PL/SQL:

set_custom_item_property(item_name, 'beanName', class_name);

If the bean is an applet, a stub is provided and the init(), start(), stop() and destroy() methods are called. TODO - This functionality should be moved into VBean in Forms 7.0 - PL/SQL <-> Java type conversion improvements and do work at registration time. Not when the property is set. - Indexed properties - Add type registration to registerProperty and move match Params into ID. VERSION $Id: DataBlockHandler.java,v 1.1 1998/11/24 02:03:14 ssaxena Exp $ MODIFIED (MM/DD/YY) cjharris 12/15/98 - Creation


Variable Index

 o BEAN_NAME
 o DEBUG_MODE

Constructor Index

 o BeanArea()

Method Index

 o addNotify()
When this Container is added to the Component tree, we try to add a HeavyBeanManager to the bean.
 o destroy()
 o getBean()
Accessor method to get the Bean.
 o getHandler()
Accessor method to get the IHandler
 o getProperty(ID)
Extend getProperty to support BEAN_NAME and Bean properties.
 o init(IHandler)
Save the IHandler instance for future use and instantiate the bean, if getProperty(BEAN_NAME) has been overridden.
 o initializeBean()
Provided for subclasses, so that they can perform initialization after the bean has been instantiated.
 o setProperty(ID, Object)
Extend setProperty to support BEAN_NAME and Bean properties.

Variables

 o BEAN_NAME
 public static final ID BEAN_NAME
 o DEBUG_MODE
 public static final ID DEBUG_MODE

Constructors

 o BeanArea
 public BeanArea()

Methods

 o getBean
 public final Component getBean()
Accessor method to get the Bean.

 o getHandler
 public final IHandler getHandler()
Accessor method to get the IHandler

 o addNotify
 public void addNotify()
When this Container is added to the Component tree, we try to add a HeavyBeanManager to the bean.

Overrides:
addNotify in class LWComponent
 o init
 public void init(IHandler handler)
Save the IHandler instance for future use and instantiate the bean, if getProperty(BEAN_NAME) has been overridden.

Overrides:
init in class VBean
 o destroy
 public void destroy()
Overrides:
destroy in class VBean
 o getProperty
 public Object getProperty(ID id)
Extend getProperty to support BEAN_NAME and Bean properties.

Overrides:
getProperty in class VBean
 o setProperty
 public boolean setProperty(ID id,
                            Object value)
Extend setProperty to support BEAN_NAME and Bean properties.

Overrides:
setProperty in class VBean
 o initializeBean
 protected void initializeBean()
Provided for subclasses, so that they can perform initialization after the bean has been instantiated.


All Packages  Class Hierarchy  This Package  Previous  Next  Index