I need to know this urgently, please help me. Abbax follows the source code of the class that I only used to test (it is not the web browser yet).
package oracle.forms.demo;
import java.awt.Color;
import oracle.forms.handler.IHandler;
import oracle.forms.ui.CustomEvent;
import oracle.forms.properties.ID;
import oracle.forms.ui.VBean;
public class GetCanvasProp extends VBean
{
static IHandler mHandler;
// properties you can set
protected static final ID SETHIDDEN = ID.registerProperty("SETHIDDEN");
// properties you can be get
protected static final ID GETBGCOLOR = ID.registerProperty("GETBGCOLOR");
// events you can raise
protected static final ID EVT_01 = ID.registerProperty("EVT_01");
// default constructor
public GetCanvasProp()
{
super();
}
public void init(IHandler handler)
{
super.init(handler);
mHandler = handler;
// put your initialisation instructions here
}
/**
* Set the properties to the bean
**/
public boolean setProperty(ID property, Object value)
{
if(property == SETHIDDEN)
{
String sParam = (String)value;
if(sParam.equals("true")){
setVisible(false);
}
else {
setVisible(true);
}
return true;
}
else // default behaviour
{
return super.setProperty(property, value);
}
}
/**
* Get the properties of the bean
**/
public Object getProperty(ID property)
{
if (property == GETBGCOLOR)
{
String sColor = "";
Color color = this.getParent().getBackground();
sColor = "r"+color.getRed()+"g"+color.getGreen()+"b"+color.getBlue();
return color;
}
else // default behaviour
{
return super.getProperty(property);
}
}
/**
* Send a message to the Forms module
**/
public void dispatch_event( ID id )
{
CustomEvent ce = new CustomEvent(mHandler, id);
dispatchCustomEvent(ce);
}
}
oracle.forms.demo.GetCanvasProp
does not give any Error, only the execution of the forms is locked as if the path was incorrect. Can someone help me????
Thanks from now on !!!!