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. |
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
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
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.