Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How to add component from program to model?
How to add component from program to model? [message #132862] Tue, 07 November 2006 13:41 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #132953 is a reply to message #132915] Wed, 08 November 2006 17:39 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Could you please give me an example of what you expect the generated
code to look like for this? That will help to determine what it should
look like in the model.
--
Thanks,
Rich Kulp
Re: How to add component from program to model? [message #614761 is a reply to message #132862] Tue, 07 November 2006 17:19 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 #614766 is a reply to message #132915] Wed, 08 November 2006 17:39 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Could you please give me an example of what you expect the generated
code to look like for this? That will help to determine what it should
look like in the model.
--
Thanks,
Rich Kulp
Previous Topic:getter and setter methods are private?
Next Topic:Tab Folder Drops Tabs
Goto Forum:
  


Current Time: Tue Apr 23 07:24:24 GMT 2024

Powered by FUDForum. Page generated in 0.03468 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top