Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.ui.printing
Interface IPrintHelper

All Known Implementing Classes:
PrintHelper

public interface IPrintHelper

The IPrintHelper is an interface for the platform specfic print fragments. The print fragments may have these methods declared in the interface as native methods, then implement this interface as wrappers around the native methods.


Field Summary
static java.lang.String PRINT_HELPER_CLASS_NAME
          The location where I expect the print helper to be implemented.
 
Method Summary
 boolean getDlgCollate ()
          Returns if collate was selected
 boolean getDlgDiagramPrintRangeAll ()
          Returns if diagram print range all was selected
 boolean getDlgDiagramPrintRangeCurrent ()
          Returns if diagram print range current was selected
 boolean getDlgDiagramPrintRangeSelection ()
          Returns if diagram print range selection was selected
 int getDlgNumberOfCopies ()
          Returns the number of copies the user wants to print.
 int getDlgPagesFrom ()
          Returns the pages from int value, check if (getDlgPrintRangesPages()) first.
 int getDlgPagesTo ()
          Returns the pages from int value, check if (getDlgPrintRangesPages()) first.
 boolean getDlgPrintRangeAll ()
          Returns if print range all was selected
 boolean getDlgPrintRangePages ()
          Returns if print range pages was selected
 int getDlgScaleFitToM ()
          If not > 0 then user has clicked percent scaling
 int getDlgScaleFitToN ()
          If not > 0 then user has clicked percent scaling
 int getDlgScalePercent ()
          If not > 0 then user has clicked fit to m x n scaling
 boolean isDlgDiagramSelected (int index)
          Returns true if the diagram at the index was selected
  PrinterData openPrintDlg (java.util.List diagramList)
          Opens the print dialog with the diagram list which could be null
 void setDlgOrientation (boolean bLandscape)
          Allows to set the orientation (portrait/landscape) in the print dialog.
 void setDlgPaperSize (int index, double width, double length)
          Allows to set the paper size in the print dialog.
 void setScaleFactor (int scaleFactor)
          Preserve the scale factor that the user enters in the preview or print dialogs.
 void setScaleToWidthHeight (int width, int height)
          Preserve the width and height scale factors
 

Field Detail

PRINT_HELPER_CLASS_NAME

static final java.lang.String PRINT_HELPER_CLASS_NAME
The location where I expect the print helper to be implemented. This should be in a fragment, e.g. org.eclipse.gmf.runtime.common.ui.printing.operatingsystem

See Also:
Constant Field Values
Method Detail

openPrintDlg

PrinterData openPrintDlg(java.util.List diagramList)
Opens the print dialog with the diagram list which could be null

Parameters:
diagramList - the List of Diagram objects. diagramList can be null.
Returns:
PrinterData

getDlgScaleFitToM

int getDlgScaleFitToM()
If not > 0 then user has clicked percent scaling

Returns:
scale to m int

getDlgScaleFitToN

int getDlgScaleFitToN()
If not > 0 then user has clicked percent scaling

Returns:
scale to n int

getDlgScalePercent

int getDlgScalePercent()
If not > 0 then user has clicked fit to m x n scaling

Returns:
scale percent int

isDlgDiagramSelected

boolean isDlgDiagramSelected(int index)
Returns true if the diagram at the index was selected

Parameters:
index - the index of the diagrams you passed in
Returns:
true if selected, false if not selected

getDlgDiagramPrintRangeAll

boolean getDlgDiagramPrintRangeAll()
Returns if diagram print range all was selected

Returns:
true if selected, false if not selected

getDlgDiagramPrintRangeCurrent

boolean getDlgDiagramPrintRangeCurrent()
Returns if diagram print range current was selected

Returns:
true if selected, false if not selected

getDlgDiagramPrintRangeSelection

boolean getDlgDiagramPrintRangeSelection()
Returns if diagram print range selection was selected

Returns:
true if selected, false if not selected

getDlgPrintRangeAll

boolean getDlgPrintRangeAll()
Returns if print range all was selected

Returns:
true if selected, false if not selected

getDlgPrintRangePages

boolean getDlgPrintRangePages()
Returns if print range pages was selected

Returns:
true if selected, false if not selected

getDlgCollate

boolean getDlgCollate()
Returns if collate was selected

Returns:
true if selected, false if not selected

getDlgPagesFrom

int getDlgPagesFrom()
Returns the pages from int value, check if (getDlgPrintRangesPages()) first.

Returns:
int of the pages from box

getDlgPagesTo

int getDlgPagesTo()
Returns the pages from int value, check if (getDlgPrintRangesPages()) first.

Returns:
int of the pages to box

getDlgNumberOfCopies

int getDlgNumberOfCopies()
Returns the number of copies the user wants to print. This is nCopies from PRINTDLG

Returns:
int with the number of copies

setDlgOrientation

void setDlgOrientation(boolean bLandscape)
Allows to set the orientation (portrait/landscape) in the print dialog.

Parameters:
isLandscape - true if orientation should be landscape, false otherwise.

setDlgPaperSize

void setDlgPaperSize(int index,
                     double width,
                     double length)
Allows to set the paper size in the print dialog.

Parameters:
index - index of type of paper size, @see org.eclipse.gmf.runtime.diagram.ui.internal.pagesetup.PageSetupPageType for the type of paper sizes available and their indices.
width - specifies the custom width of the paper. Leave as 0 if paper size index is user-defined.
height - specifies the custom width of the paper. Leave as 0 if paper size index is user-defined.

setScaleFactor

void setScaleFactor(int scaleFactor)
Preserve the scale factor that the user enters in the preview or print dialogs.

Parameters:
scaleFactor - a zoom factor integer value greater than 0.

setScaleToWidthHeight

void setScaleToWidthHeight(int width,
                           int height)
Preserve the width and height scale factors

Parameters:
width - scale to number of pages wide
height - scale to number of pages high

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire