Skip to main content



      Home
Home » Eclipse Projects » GEF » Specifying properties for figures in a seperate window
Specifying properties for figures in a seperate window [message #120552] Thu, 04 March 2004 08:57 Go to next message
Eclipse UserFriend
Originally posted by: jig.patel.excite.com

My editor currently displays graphical figures.



I want to be able to specify properties for these figures when they are
clicked

e.g. allowing data to be entered into a pop-up box, or in a "properties"
view, when a figure is clicked.



These properties should be synchronised with the model (via the respective
editparts for the figures).



I was wondering how I could do this. Any help/tips greatly appreciated.



-Jig.
Re: Specifying properties for figures in a seperate window [message #120565 is a reply to message #120552] Thu, 04 March 2004 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam.gmx.net

Hi!

your model or editpart class should implement IAdaptable and
return a property source:

MyPropertySource propertySource = null;


public Object getAdapter(Class adapter)
{
if (adapter == IPropertySource.class)
{
if (propertySource == null)
propertySource = new MyPropertySource(getModel());

return propertySource;
}
return null;
}

Look in the Logic Example, it uses PropertySources
for displaying e.g. the size and location of your element.

Regards, Ingo





"eclipse" <jig.patel@excite.com> wrote in message
news:c27cd5$j4r$1@eclipse.org...
> My editor currently displays graphical figures.
>
>
>
> I want to be able to specify properties for these figures when they are
> clicked
>
> e.g. allowing data to be entered into a pop-up box, or in a "properties"
> view, when a figure is clicked.
>
>
>
> These properties should be synchronised with the model (via the respective
> editparts for the figures).
>
>
>
> I was wondering how I could do this. Any help/tips greatly appreciated.
>
>
>
> -Jig.
>
>
>
Re: Specifying properties for figures in a seperate window [message #120578 is a reply to message #120565] Thu, 04 March 2004 11:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You can also customize the entire propertysheet by providing your own page
which has whatever you want.

"Ingo Koch" <nospam@gmx.net> wrote in message
news:c27j04$t3o$1@eclipse.org...
> Hi!
>
> your model or editpart class should implement IAdaptable and
> return a property source:
>
> MyPropertySource propertySource = null;
>
>
> public Object getAdapter(Class adapter)
> {
> if (adapter == IPropertySource.class)
> {
> if (propertySource == null)
> propertySource = new MyPropertySource(getModel());
>
> return propertySource;
> }
> return null;
> }
>
> Look in the Logic Example, it uses PropertySources
> for displaying e.g. the size and location of your element.
>
> Regards, Ingo
>
>
>
>
>
> "eclipse" <jig.patel@excite.com> wrote in message
> news:c27cd5$j4r$1@eclipse.org...
> > My editor currently displays graphical figures.
> >
> >
> >
> > I want to be able to specify properties for these figures when they are
> > clicked
> >
> > e.g. allowing data to be entered into a pop-up box, or in a "properties"
> > view, when a figure is clicked.
> >
> >
> >
> > These properties should be synchronised with the model (via the
respective
> > editparts for the figures).
> >
> >
> >
> > I was wondering how I could do this. Any help/tips greatly appreciated.
> >
> >
> >
> > -Jig.
> >
> >
> >
>
>
Re: Specifying properties for figures in a seperate window [message #120691 is a reply to message #120578] Thu, 04 March 2004 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jig.patel.excite.com

id like to customise the property sheet. -could you point me in the right
direction?

-where abouts is the code in the logic example that does this?
-where could i get more info about how to do this?

thanks in advance

-Jig.



"Randy Hudson" <none@us.ibm.com> wrote in message
news:c27l3e$rk$1@eclipse.org...
> You can also customize the entire propertysheet by providing your own page
> which has whatever you want.
>
> "Ingo Koch" <nospam@gmx.net> wrote in message
> news:c27j04$t3o$1@eclipse.org...
> > Hi!
> >
> > your model or editpart class should implement IAdaptable and
> > return a property source:
> >
> > MyPropertySource propertySource = null;
> >
> >
> > public Object getAdapter(Class adapter)
> > {
> > if (adapter == IPropertySource.class)
> > {
> > if (propertySource == null)
> > propertySource = new MyPropertySource(getModel());
> >
> > return propertySource;
> > }
> > return null;
> > }
> >
> > Look in the Logic Example, it uses PropertySources
> > for displaying e.g. the size and location of your element.
> >
> > Regards, Ingo
> >
> >
> >
> >
> >
> > "eclipse" <jig.patel@excite.com> wrote in message
> > news:c27cd5$j4r$1@eclipse.org...
> > > My editor currently displays graphical figures.
> > >
> > >
> > >
> > > I want to be able to specify properties for these figures when they
are
> > > clicked
> > >
> > > e.g. allowing data to be entered into a pop-up box, or in a
"properties"
> > > view, when a figure is clicked.
> > >
> > >
> > >
> > > These properties should be synchronised with the model (via the
> respective
> > > editparts for the figures).
> > >
> > >
> > >
> > > I was wondering how I could do this. Any help/tips greatly
appreciated.
> > >
> > >
> > >
> > > -Jig.
> > >
> > >
> > >
> >
> >
>
>
Re: Specifying properties for figures in a seperate window [message #120841 is a reply to message #120691] Thu, 04 March 2004 17:58 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is more of a platform issue, but the propertysheet asks your editor for
a page using getAdapter(). You can return whatever you want. Look for
implemetors of getAdapter()
"Jig" <jig.patel@excite.com> wrote in message
news:c281ah$gsf$1@eclipse.org...
> id like to customise the property sheet. -could you point me in the right
> direction?
>
> -where abouts is the code in the logic example that does this?
> -where could i get more info about how to do this?
>
> thanks in advance
>
> -Jig.
>
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:c27l3e$rk$1@eclipse.org...
> > You can also customize the entire propertysheet by providing your own
page
> > which has whatever you want.
> >
> > "Ingo Koch" <nospam@gmx.net> wrote in message
> > news:c27j04$t3o$1@eclipse.org...
> > > Hi!
> > >
> > > your model or editpart class should implement IAdaptable and
> > > return a property source:
> > >
> > > MyPropertySource propertySource = null;
> > >
> > >
> > > public Object getAdapter(Class adapter)
> > > {
> > > if (adapter == IPropertySource.class)
> > > {
> > > if (propertySource == null)
> > > propertySource = new MyPropertySource(getModel());
> > >
> > > return propertySource;
> > > }
> > > return null;
> > > }
> > >
> > > Look in the Logic Example, it uses PropertySources
> > > for displaying e.g. the size and location of your element.
> > >
> > > Regards, Ingo
> > >
> > >
> > >
> > >
> > >
> > > "eclipse" <jig.patel@excite.com> wrote in message
> > > news:c27cd5$j4r$1@eclipse.org...
> > > > My editor currently displays graphical figures.
> > > >
> > > >
> > > >
> > > > I want to be able to specify properties for these figures when they
> are
> > > > clicked
> > > >
> > > > e.g. allowing data to be entered into a pop-up box, or in a
> "properties"
> > > > view, when a figure is clicked.
> > > >
> > > >
> > > >
> > > > These properties should be synchronised with the model (via the
> > respective
> > > > editparts for the figures).
> > > >
> > > >
> > > >
> > > > I was wondering how I could do this. Any help/tips greatly
> appreciated.
> > > >
> > > >
> > > >
> > > > -Jig.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Previous Topic:Changing AbstractGraphicalEditPart figures
Next Topic:Using BendpointConnectionRouter
Goto Forum:
  


Current Time: Tue Jul 22 15:46:47 EDT 2025

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

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

Back to the top