Printing [message #83608] |
Thu, 12 June 2003 14:19  |
Eclipse User |
|
|
|
Originally posted by: carlos.grahl.senior.com.br
Hello, all!
I made an editor, which extends GraphicalEditorWithPalette. I enable the
"print" option on the menu, using an ActionBarContributor, exactly like the
Logic Sample does:
protected void declareGlobalActionKeys() {
addGlobalActionKey(IWorkbenchActionConstants.PRINT);
}
But using in this way, I have problems when printing graphics which does not
fit on one single page. Looking at this news, I found a post of 1/10/2003,
which explains how to solve this problem by extending the
PrintFigureOperation class.. I made this class (PrintBigFigure), but I don't
know how to tell Eclipse/GEF to use that! This class must be registered
somewhere? Where I tell Eclipse to use the PrintBigFigure class to do the
print job?
Thanks
Carlos Augusto Grahl
|
|
|
Re: Printing [message #83622 is a reply to message #83608] |
Thu, 12 June 2003 14:33  |
Eclipse User |
|
|
|
Originally posted by: delee.EYEbm.com
I am assuming that you are printing from a GEF Editor and thus are using the
class org.eclipse.gef.ui.actions.PrintAction to do the printing. If you look
at the run() method in PrintAction, you will see that the print operation
that GEF uses is actually a PrintGraphicalViewerOperation. To use the
PrintBigFigure code, you could extend PrintAction and override the run()
method to use your class instead of the PrintGraphicalViewerOperation.
(Your class should extend PrintGraphicalViewerOperation instead of
PrintFigureOperation if you are printing from a GEF editor).
"Carlos Augusto C. Grahl" <carlos.grahl@senior.com.br> wrote in message
news:bcag8e$hvq$1@rogue.oti.com...
> Hello, all!
>
> I made an editor, which extends GraphicalEditorWithPalette. I enable the
> "print" option on the menu, using an ActionBarContributor, exactly like
the
> Logic Sample does:
>
> protected void declareGlobalActionKeys() {
> addGlobalActionKey(IWorkbenchActionConstants.PRINT);
> }
>
> But using in this way, I have problems when printing graphics which does
not
> fit on one single page. Looking at this news, I found a post of 1/10/2003,
> which explains how to solve this problem by extending the
> PrintFigureOperation class.. I made this class (PrintBigFigure), but I
don't
> know how to tell Eclipse/GEF to use that! This class must be registered
> somewhere? Where I tell Eclipse to use the PrintBigFigure class to do the
> print job?
>
> Thanks
>
> Carlos Augusto Grahl
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03944 seconds