Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to change node figure at runtime?
How to change node figure at runtime? [message #31013] Sun, 27 August 2006 06:14 Go to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

I want to change the figure of notation view at runtime.
I want to fulfill this function: at runtime workbench, when I choose the svg
figure that I provide through the choose file dialog, the node I select in
editor will change to that svg figure, how can I implement this?
Re: How to change node figure at runtime? [message #31599 is a reply to message #31013] Mon, 28 August 2006 08:36 Go to previous messageGo to next message
Eclipse UserFriend
@see TaiPan example, EmptyBoxEditPart#createNodeShape - use path obtained
from the dialog.

"dzh" <dzhpingbo@sohu.com> wrote in message
news:ecrrat$5h6$1@utils.eclipse.org...
>I want to change the figure of notation view at runtime.
> I want to fulfill this function: at runtime workbench, when I choose the
> svg figure that I provide through the choose file dialog, the node I
> select in editor will change to that svg figure, how can I implement this?
>
Re: How to change node figure at runtime? [message #31668 is a reply to message #31013] Mon, 28 August 2006 09:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Hello!

In graph definition model specify some plate for the node (just Figure
should do) and set StackLayout for it. In runtime after selecting svg
and creating ImageFigure add it to the plate figure.

dzh wrote:
> I want to change the figure of notation view at runtime.
> I want to fulfill this function: at runtime workbench, when I choose the svg
> figure that I provide through the choose file dialog, the node I select in
> editor will change to that svg figure, how can I implement this?
>
>
Re: How to change node figure at runtime? [message #33557 is a reply to message #31668] Wed, 30 August 2006 00:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

Thank you very much:) according to your method, I can change the figure at
runtime now, but everytime I had to reopen the editor and then it will
change...
I had tried to use myNodeEditPart.refresh() method to refresh the views, but
it does not work..
How can I refresh the figure without reopening the editor?
"Dmitry Stadnik" <5d5@mail.ru> ??????:ecuq72$4fp$1@utils.eclipse.org...
> Hello!
>
> In graph definition model specify some plate for the node (just Figure
> should do) and set StackLayout for it. In runtime after selecting svg and
> creating ImageFigure add it to the plate figure.
>
> dzh wrote:
>> I want to change the figure of notation view at runtime.
>> I want to fulfill this function: at runtime workbench, when I choose the
>> svg figure that I provide through the choose file dialog, the node I
>> select in editor will change to that svg figure, how can I implement
>> this?
Re: How to change node figure at runtime? [message #33591 is a reply to message #31599] Wed, 30 August 2006 00:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

I can change the figure at runtime now, but everytime I had to reopen the
editor and then it will change...
I had tried to use myNodeEditPart.refresh() method to refresh the views, but
it does not work..
How can I refresh the figure without reopening the editor?
"Artem Tikhomirov" <artem.tikhomirov@borland.com> д
Re: How to change node figure at runtime? [message #34155 is a reply to message #33557] Wed, 30 August 2006 08:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Hello!

When you add figure with image to the plate figure it should be
revalidated and repainted; do you add image figure? Are you sure that
this image figure is not hidden behind some other figure?

dzh wrote:
> Thank you very much:) according to your method, I can change the figure at
> runtime now, but everytime I had to reopen the editor and then it will
> change...
> I had tried to use myNodeEditPart.refresh() method to refresh the views, but
> it does not work..
> How can I refresh the figure without reopening the editor?
> "Dmitry Stadnik" <5d5@mail.ru> ??????:ecuq72$4fp$1@utils.eclipse.org...
>> Hello!
>>
>> In graph definition model specify some plate for the node (just Figure
>> should do) and set StackLayout for it. In runtime after selecting svg and
>> creating ImageFigure add it to the plate figure.
>>
>> dzh wrote:
>>> I want to change the figure of notation view at runtime.
>>> I want to fulfill this function: at runtime workbench, when I choose the
>>> svg figure that I provide through the choose file dialog, the node I
>>> select in editor will change to that svg figure, how can I implement
>>> this?
>
>
Re: How to change node figure at runtime? [message #34253 is a reply to message #34155] Wed, 30 August 2006 08:56 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Hello!

By the way you may use org.eclipse.gmf.dev.insider plugin from devtools
section in cvs to make a snapshot of diagram editor; there will be a
tree of all figures, edit parts and edit policies so you may check
whether your figure was actually added even if it's not visible.

Dmitry Stadnik wrote:
> Hello!
>
> When you add figure with image to the plate figure it should be
> revalidated and repainted; do you add image figure? Are you sure that
> this image figure is not hidden behind some other figure?
>
> dzh wrote:
>> Thank you very much:) according to your method, I can change the
>> figure at runtime now, but everytime I had to reopen the editor and
>> then it will change...
>> I had tried to use myNodeEditPart.refresh() method to refresh the
>> views, but it does not work..
>> How can I refresh the figure without reopening the editor?
>> "Dmitry Stadnik" <5d5@mail.ru> ??????:ecuq72$4fp$1@utils.eclipse.org...
>>> Hello!
>>>
>>> In graph definition model specify some plate for the node (just
>>> Figure should do) and set StackLayout for it. In runtime after
>>> selecting svg and creating ImageFigure add it to the plate figure.
>>>
>>> dzh wrote:
>>>> I want to change the figure of notation view at runtime.
>>>> I want to fulfill this function: at runtime workbench, when I choose
>>>> the svg figure that I provide through the choose file dialog, the
>>>> node I select in editor will change to that svg figure, how can I
>>>> implement this?
>>
>>
Previous Topic:How can I refresh the figure without reopening the editor
Next Topic:Modify graphical template in elements of editors
Goto Forum:
  


Current Time: Mon Jul 14 22:15:28 EDT 2025

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

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

Back to the top