Kbase 17853: Apptivity: How-to display non-Apptivity objects on forms
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Apptivity: How-to display non-Apptivity objects on forms
When a customer wants his own object to be displayed on a form, you
will need to add some code into the form.java file. When adding the
code please make sure that it is added outside the markers from the
Apptivity developer.
I'll include an example to visualize an AWT choice component but it
can also be used to display other objects like Beans.
In the form.java file I added the following lines:
import java.awt.Choice;
public void init()
{
...
//$BEGIN_CREATE_OBJECTS
...
//$END_CREATE_OBJECTS
//$BEGIN_INIT_OBJECTS
...
//$END_INIT_OBJECTS
AWTComponentView awtComp = new AWTComponentView(50,10,100,30);
addSubview(awtComp);
tbo.addItem((String) "Ikke1");
tbo.addItem((String) "Ikke2");
awtComp.setAWTComponent(tbo);
}
//$BEGIN_DECLARE_OBJECTS
...
//$END_DECLARE_OBJECTS
abContainerView m_formContent;
Choice tbo = new Choice();
}
This should reserve some space in the Apptivity form and display the
defined object in it.
TBO
04/16/98
Progress Software Technical Support Note # 17853