How to add component from program to model? [message #132862] |
Tue, 07 November 2006 13:41 |
Eclipse User |
|
|
|
Originally posted by: yudin.developonbox.ru
How to add bean to model?
When user drops any component from pallete, my program must create special
component and add it to model. For creating that component I use function:
private IJavaInstance createIImageGroupObject() {
IJavaInstance im =BeanUtilities.createJavaObject(
"com.dob.components.CImageGroup",
JavaEditDomainHelper.getResourceSet(fEditDomain),
"new com.dob.components.CImageGroup()"
);
return im;
}
How can I add this IJavaInstance to model?
Help me please.
|
|
|
Re: How to add component from program to model? [message #132889 is a reply to message #132862] |
Tue, 07 November 2006 17:19 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
It is complicated. How do you intend to reference this object? Is it a
parameter on the constructor of the component being dropped, and do you
expect only one for the whole application, or one per component?
Please give me an example of how the generated code for you CImageGroup
is used? The answer to this will determine how to do it.
--
Thanks,
Rich Kulp
|
|
|
Re: How to add component from program to model? [message #132915 is a reply to message #132889] |
Wed, 08 November 2006 08:55 |
Eclipse User |
|
|
|
Originally posted by: yudin.developonbox.ru
Hi, Rich!
In my application are many objects of type CImage. CImage objects not
drops from pallete, it creates as property of other objects in property
editor and do not shown on the GraphicalEditPart. But in the TreeEditPart
that components adds to the root. It is not well, because lot of CImage
objects makes TreeEditPart not readable.
СImageGroup will be single object for application. Before creating
new CImage object programm will check of existence СImageGroup,
create it if СImageGroup yet not created, and after that, create
CImage and add to the СImageGroup.
So, I have two questions:
1) How create and append to the root СImageGroup object from
property editor of other object?
2) How append new CImage object to the CImageGroup (CImageGroup is awt
container) after it created in property editor?
Thanks,
Alexey Yudin
|
|
|
|
Re: How to add component from program to model? [message #614761 is a reply to message #132862] |
Tue, 07 November 2006 17:19 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
It is complicated. How do you intend to reference this object? Is it a
parameter on the constructor of the component being dropped, and do you
expect only one for the whole application, or one per component?
Please give me an example of how the generated code for you CImageGroup
is used? The answer to this will determine how to do it.
--
Thanks,
Rich Kulp
|
|
|
Re: How to add component from program to model? [message #614763 is a reply to message #132889] |
Wed, 08 November 2006 08:55 |
Eclipse User |
|
|
|
Originally posted by: yudin.developonbox.ru
Hi, Rich!
In my application are many objects of type CImage. CImage objects not
drops from pallete, it creates as property of other objects in property
editor and do not shown on the GraphicalEditPart. But in the TreeEditPart
that components adds to the root. It is not well, because lot of CImage
objects makes TreeEditPart not readable.
СImageGroup will be single object for application. Before creating
new CImage object programm will check of existence СImageGroup,
create it if СImageGroup yet not created, and after that, create
CImage and add to the СImageGroup.
So, I have two questions:
1) How create and append to the root СImageGroup object from
property editor of other object?
2) How append new CImage object to the CImageGroup (CImageGroup is awt
container) after it created in property editor?
Thanks,
Alexey Yudin
|
|
|
|
Powered by
FUDForum. Page generated in 0.03126 seconds