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:
java.util.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:
PrintFigureScaleableOperation
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringdecimalNumberFormatstatic double[]SCALE_FACTORS-
Fields inherited from class org.eclipse.graphiti.ui.internal.util.ui.print.AbstractFigureSelectionDialog
_allFigure, _figure, _graphicalViewer, _image, _insideInternalModify, _preferences, _selectionFigure
-
Fields 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, ELLIPSIS
-
Fields inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration
OK
-
-
Constructor Summary
Constructors Constructor Description PrintFigureDialog(org.eclipse.swt.widgets.Shell shell, org.eclipse.gef.GraphicalViewer graphicalViewer, org.eclipse.swt.printing.Printer printer)Creates a new PrintFigureDialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuttonPressed(int buttonID)This method is currently not used, since "normal" user would not need it.intconfigure()Configures 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)doublegetCurrentScale()doublegetMaximumOfXYImageScaleFactors()IPrintPreferencesgetPreferences()Returns the printer preferences as given through this dialog.org.eclipse.swt.printing.PrintergetPrinter()Returns thePrinterto be used.doublegetPrinterScaleFactor()voidmodifyText(org.eclipse.swt.events.ModifyEvent e)protected voidokPressed()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.voidpaintControl(org.eclipse.swt.events.PaintEvent e)voidupdateControls()voidwidgetSelected(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, widgetDefaultSelected
-
Methods 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, shortenText
-
Methods 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, setWindowManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.graphiti.ui.print.IPrintConfiguration
cleanUp, getFigure, getScaledImage
-
-
-
-
Field Detail
-
decimalNumberFormat
public static final java.lang.String decimalNumberFormat
- See Also:
- Constant Field Values
-
SCALE_FACTORS
public static final double[] SCALE_FACTORS
-
-
Constructor Detail
-
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 Detail
-
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
public IPrintPreferences 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.
-
-