tEnv.addObjRelation("MODEL",the_Model);
// Adding relation for XItemListener
ifc.awt._XItemListener.TestItemListener listener =
new ifc.awt._XItemListener.TestItemListener() ;
final XListBox box = (XListBox) UnoRuntime.queryInterface(XListBox.class, oObj) ;
box.addItemListener(listener) ;
tEnv.addObjRelation("TestItemListener", listener) ;
// Adding relation for XWindow
XWindow forObjRel = (XWindow)
UnoRuntime.queryInterface(XWindow.class, anotherCtrl);
XWindow objWin = (XWindow)
UnoRuntime.queryInterface(XWindow.class, oObj);
tEnv.addObjRelation("XWindow.AnotherWindow",forObjRel);
tEnv.addObjRelation("XWindow.ControlShape",aShape);
tEnv.addObjRelation("Win1",objWin);
tEnv.addObjRelation("Win2",forObjRel);
tEnv.addObjRelation("CONTROL",anotherCtrl);
// adding relation for XChangeBroadcaster
box.addItem("Item1", (short) 0);
box.addItem("Item2", (short) 1);
tEnv.addObjRelation("XChangeBroadcaster.Changer",
new ifc.form._XChangeBroadcaster.Changer() {
public void change(){
box.addItem("Item1", (short) 0);
box.addItem("Item2", (short) 1);
box.selectItemPos((short) 0, true);
box.selectItemPos((short) 1, true);
}
}
);
return tEnv;