set Default Color of figures [message #667792] |
Mon, 02 May 2011 09:00 |
Eclipse User |
|
|
|
Originally posted by: jo.engelhardt.ostfalia.de
Hello,
the default colors of our figures is set on the corresponding
???ViewProvider.create???() method to avoid the restriction not being
allowed changing the colors of diagram elements from the toolbar (when
setting the default colors directly in the .gmfmap model.
Now, we want also set these default colors when the user choose "Default
Color" from the Color Palette tool. I've searched for a few days as well
in the forum as in the generated code to find a way hook into the
process of setting the default colors of a figure.
Unfortunately I didn't find a solution and ask you if anyone can help me.
Thank you very much for any hint and help.
With best regards,
Jo
|
|
|
Re: set Default Color of figures [message #669506 is a reply to message #667792] |
Tue, 10 May 2011 11:29 |
Eclipse User |
|
|
|
Originally posted by: Joachim Engelhardt
Hi,
I found the solution by myself:
Overwrite the method
public Object getPreferredValue(EStructuralFeature feature)
of the GMF generated xxxEditPart class in the xxxDiagram.edit.parts package.
See the implementation of
org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPa rt.getPreferredValue(EStructuralFeature
feature)
how using the parameter feature to differ the requested value and return
your own.
Greetings,
Jo
> Hello,
>
> the default colors of our figures is set on the corresponding
> ???ViewProvider.create???() method to avoid the restriction not being
> allowed changing the colors of diagram elements from the toolbar (when
> setting the default colors directly in the .gmfmap model.
>
> Now, we want also set these default colors when the user choose "Default
> Color" from the Color Palette tool. I've searched for a few days as well
> in the forum as in the generated code to find a way hook into the
> process of setting the default colors of a figure.
>
> Unfortunately I didn't find a solution and ask you if anyone can help me.
>
> Thank you very much for any hint and help.
>
>
> With best regards,
>
> Jo
|
|
|
Powered by
FUDForum. Page generated in 0.02811 seconds