Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Printing the title in header or footer of the page
Printing the title in header or footer of the page [message #222988] Sat, 16 September 2006 09:57 Go to next message
Eclipse User
Originally posted by: shruthi.cn.in.bosch.com

Hello All,

The problem is "Printing the title in header or footer of the page".

I have a GEF Editor displaying diagrams on a graphical viewer.
I have achieved the Print functionality by using
PrintGraphicalViewerOperation as follows:

PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
PrinterData data = dialog.open();
if (data != null) {
PrintGraphicalViewerOperation op =
new PrintGraphicalViewerOperation(new Printer(data), baseViewer);
op.setPrintMode(PrintFigureOperation.FIT_PAGE);
op.run("test5");
}

I want the pages printed to have a title (this title is the name of the
gef diagram printed). Please help me in doing this.
Any sample examples, links would be great help to me.

Thanks a lot,
Best Regards
Shruthi
Re: Printing the title in header or footer of the page [message #223033 is a reply to message #222988] Mon, 18 September 2006 14:11 Go to previous message
Eclipse User
Originally posted by: none.ibm.com

You'll have to override printPages(). The printing of each page is not
factored out into an overridable method. Please open a feature request.

"shruthi" <shruthi.cn@in.bosch.com> wrote in message
news:ea02049019b217839be39fe079ecc145$1@www.eclipse.org...
> Hello All,
>
> The problem is "Printing the title in header or footer of the page".
>
> I have a GEF Editor displaying diagrams on a graphical viewer. I have
> achieved the Print functionality by using PrintGraphicalViewerOperation as
> follows:
>
> PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
> PrinterData data = dialog.open();
> if (data != null) {
> PrintGraphicalViewerOperation op = new
> PrintGraphicalViewerOperation(new Printer(data), baseViewer);
> op.setPrintMode(PrintFigureOperation.FIT_PAGE);
> op.run("test5");
> }
>
> I want the pages printed to have a title (this title is the name of the
> gef diagram printed). Please help me in doing this.
> Any sample examples, links would be great help to me.
>
> Thanks a lot,
> Best Regards
> Shruthi
>
>
>
>
>
Previous Topic:Creating a time scale
Next Topic:Issue with Graphics.setAlpha
Goto Forum:
  


Current Time: Mon Sep 22 08:31:28 GMT 2014

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

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