Class PrintFigureDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog
org.eclipse.graphiti.ui.internal.util.ui.print.PrintFigureDialog
- All Implemented Interfaces:
EventListener,IPrintConfiguration,org.eclipse.jface.window.IShellProvider,org.eclipse.swt.events.ModifyListener,org.eclipse.swt.events.PaintListener,org.eclipse.swt.events.SelectionListener,org.eclipse.swt.internal.SWTEventListener
public class PrintFigureDialog
extends AbstractFigureSelectionDialog
implements IPrintConfiguration, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.events.PaintListener
This is a dialog to choose positioning and scaling for a print operation.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler -
Field Summary
FieldsFields inherited from class org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog
_allFigure, _figure, _graphicalViewer, _image, _insideInternalModify, _preferences, _selectionFigureFields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurredFields inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration
OK -
Constructor Summary
ConstructorsConstructorDescriptionPrintFigureDialog(org.eclipse.swt.widgets.Shell shell, org.eclipse.gef.GraphicalViewer graphicalViewer, org.eclipse.swt.printing.Printer printer) Creates a new PrintFigureDialog. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuttonPressed(int buttonID) This method is currently not used, since "normal" user would not need it.intConfigures this container.protected voidconfigureShell(org.eclipse.swt.widgets.Shell newShell) protected voidcreateButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.ControlcreateDialogArea(org.eclipse.swt.widgets.Composite parent) doubledoubleReturns the printer preferences as given through this dialog.org.eclipse.swt.printing.PrinterReturns thePrinterto be used.doublevoidmodifyText(org.eclipse.swt.events.ModifyEvent e) protected voidPops up a warning if more thanWARNING_IF_MOREPAGES_THANpages are tp be printed and sets the scaled image for later retrieval for high quality printing.voidpaintControl(org.eclipse.swt.events.PaintEvent e) voidvoidwidgetSelected(org.eclipse.swt.events.SelectionEvent e) Methods inherited from class org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog
cleanUp, createChooseFigureGroup, getFigure, getGraphicalViewer, getImage, getScaledImage, setScaledImage, setScaledImage, widgetDefaultSelectedMethods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration
cleanUp, getFigure, getScaledImage
-
Field Details
-
decimalNumberFormat
- See Also:
-
SCALE_FACTORS
public static final double[] SCALE_FACTORS
-
-
Constructor Details
-
PrintFigureDialog
public PrintFigureDialog(org.eclipse.swt.widgets.Shell shell, org.eclipse.gef.GraphicalViewer graphicalViewer, org.eclipse.swt.printing.Printer printer) Creates a new PrintFigureDialog.- Parameters:
shell- The Shell of this dialog.graphicalViewer- The GraphicalViewer, which to print.printer- The printer, to which to print
-
-
Method Details
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) - Overrides:
createButtonsForButtonBarin classorg.eclipse.jface.dialogs.Dialog
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell newShell) - Overrides:
configureShellin classAbstractFigureSelectionDialog
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) - Overrides:
createDialogAreain classorg.eclipse.jface.dialogs.Dialog
-
updateControls
public void updateControls()- Overrides:
updateControlsin classAbstractFigureSelectionDialog
-
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e) - Specified by:
paintControlin interfaceorg.eclipse.swt.events.PaintListener
-
buttonPressed
public void buttonPressed(int buttonID) This method is currently not used, since "normal" user would not need it.- Overrides:
buttonPressedin classorg.eclipse.jface.dialogs.Dialog
-
modifyText
public void modifyText(org.eclipse.swt.events.ModifyEvent e) - Specified by:
modifyTextin interfaceorg.eclipse.swt.events.ModifyListener
-
widgetSelected
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) - Specified by:
widgetSelectedin interfaceorg.eclipse.swt.events.SelectionListener- Overrides:
widgetSelectedin classAbstractFigureSelectionDialog
-
okPressed
protected void okPressed()Pops up a warning if more thanWARNING_IF_MOREPAGES_THANpages are tp be printed and sets the scaled image for later retrieval for high quality printing.- Overrides:
okPressedin classorg.eclipse.jface.dialogs.Dialog
-
getPrinterScaleFactor
public double getPrinterScaleFactor() -
getPreferences
Returns the printer preferences as given through this dialog.- Specified by:
getPreferencesin interfaceIPrintConfiguration- Returns:
- The printer preferences as given through this dialog.
-
getCurrentScale
public double getCurrentScale() -
getPrinter
public org.eclipse.swt.printing.Printer getPrinter()Description copied from interface:IPrintConfigurationReturns thePrinterto be used.- Specified by:
getPrinterin interfaceIPrintConfiguration- Returns:
- The printer.
-
getMaximumOfXYImageScaleFactors
public double getMaximumOfXYImageScaleFactors()- Returns:
- maximum of scale factor for x- and y-axis as stored in
_preferences.
-
configure
public int configure()Description copied from interface:IPrintConfigurationConfigures this container. May e.g. mean that a popup is presented to the user, but also simply some default values are set.- Specified by:
configurein interfaceIPrintConfiguration- Returns:
- The return code of this operation. Anything else than 0 will be interpreted as a cancellation request.
-