Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » To print the GEF diagram without viewing in the screen!
To print the GEF diagram without viewing in the screen! [message #247696] Wed, 11 March 2009 13:00 Go to next message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
Hello folks,

Currently the diagram we draw in GEF are drawn in the screen since the
'GC' class is attached with 'Display'. I wanted to paint this generated
diagram in an SWT Device other than 'Display', say 'Printer'.

I wanted to send a GEF diagram to a Printer without painting in the
Display.

Is it possible?


Regards,
Madhu


Re: To print the GEF diagram without viewing in the screen! [message #247736 is a reply to message #247696] Tue, 17 March 2009 03:08 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
Have a look at PrintGraphicalViewerOperation. If that's not exactly what
you need, there are a lot of threads already posted about dumping a
viewer to an image, etc.

Madhu Samuel wrote:
> Hello folks,
>
> Currently the diagram we draw in GEF are drawn in the screen since the
> 'GC' class is attached with 'Display'. I wanted to paint this generated
> diagram in an SWT Device other than 'Display', say 'Printer'.
> I wanted to send a GEF diagram to a Printer without painting in the
> Display.
>
> Is it possible?
>
>
> Regards,
> Madhu
>
Re: To print the GEF diagram without viewing in the screen! [message #247740 is a reply to message #247736] Tue, 17 March 2009 08:07 Go to previous messageGo to next message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
Hello Ben,

Both the approaches using PrintGraphicalViewerOperation and viewer to
image conversion need the GEF figures to be available in a graphical
viewer. Isn't it?

I wanted to print it even before opening it in the graphical viewer.

Is it possible?

Regards,
Madhu

Ben Vitale wrote:

> Have a look at PrintGraphicalViewerOperation. If that's not exactly what
> you need, there are a lot of threads already posted about dumping a
> viewer to an image, etc.

> Madhu Samuel wrote:
>> Hello folks,
>>
>> Currently the diagram we draw in GEF are drawn in the screen since the
>> 'GC' class is attached with 'Display'. I wanted to paint this generated
>> diagram in an SWT Device other than 'Display', say 'Printer'.
>> I wanted to send a GEF diagram to a Printer without painting in the
>> Display.
>>
>> Is it possible?
>>
>>
>> Regards,
>> Madhu
>>


Re: To print the GEF diagram without viewing in the screen! [message #247750 is a reply to message #247740] Tue, 17 March 2009 16:00 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
Madhu Samuel wrote:
>
> I wanted to print it even before opening it in the graphical viewer.
> Is it possible?

Why? Don't you want to just hand off your model input to the viewer, and
have it build up all the figures for you? You can instantiate the viewer
without it being visible on the screen, if that's your concern.

If you are building the figures manually, then you should still be able
to use PrintFigureOperation (the superclass) or some aspects of it.
Re: To print the GEF diagram without viewing in the screen! [message #247780 is a reply to message #247750] Wed, 18 March 2009 03:22 Go to previous messageGo to next message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
Ben Vitale wrote:

> Madhu Samuel wrote:
>>
>> I wanted to print it even before opening it in the graphical viewer.
>> Is it possible?

> Why? Don't you want to just hand off your model input to the viewer, and
> have it build up all the figures for you? You can instantiate the viewer
> without it being visible on the screen, if that's your concern.

Yes, This is exactly what I need! How can I instantiate the viewer without
it being visible on the screen?

> If you are building the figures manually, then you should still be able
> to use PrintFigureOperation (the superclass) or some aspects of it.


Re: To print the GEF diagram without viewing in the screen! [message #247802 is a reply to message #247780] Wed, 18 March 2009 22:16 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
Madhu Samuel wrote:
> Ben Vitale wrote:
>
>> Madhu Samuel wrote:
>>>
>>> I wanted to print it even before opening it in the graphical viewer.
>>> Is it possible?
>
>> Why? Don't you want to just hand off your model input to the viewer,
>> and have it build up all the figures for you? You can instantiate the
>> viewer without it being visible on the screen, if that's your concern.
>
> Yes, This is exactly what I need! How can I instantiate the viewer
> without it being visible on the screen?
>> If you are building the figures manually, then you should still be
>> able to use PrintFigureOperation (the superclass) or some aspects of it.
>
>

Check out LogicPrintAction in the logic example.
Re: To print the GEF diagram without viewing in the screen! [message #247812 is a reply to message #247802] Thu, 19 March 2009 05:20 Go to previous message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
Thanks Ben. I will check this out!

Ben Vitale wrote:

> Madhu Samuel wrote:
>> Ben Vitale wrote:
>>
>>> Madhu Samuel wrote:
>>>>
>>>> I wanted to print it even before opening it in the graphical viewer.
>>>> Is it possible?
>>
>>> Why? Don't you want to just hand off your model input to the viewer,
>>> and have it build up all the figures for you? You can instantiate the
>>> viewer without it being visible on the screen, if that's your concern.
>>
>> Yes, This is exactly what I need! How can I instantiate the viewer
>> without it being visible on the screen?
>>> If you are building the figures manually, then you should still be
>>> able to use PrintFigureOperation (the superclass) or some aspects of it.
>>
>>

> Check out LogicPrintAction in the logic example.


Previous Topic:eclipse draw2d api
Next Topic:Setting fixed width Figure?
Goto Forum:
  


Current Time: Tue Jul 16 12:42:13 GMT 2024

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

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

Back to the top