Class PrintPreviewTray
java.lang.Object
org.eclipse.jface.dialogs.DialogTray
de.cau.cs.kieler.klighd.ui.printing.dialog.PrintPreviewTray
public class PrintPreviewTray
extends org.eclipse.jface.dialogs.DialogTray
A PrintPreview to be displayed as a dialog tray, e.g. used by
The implementation is inspired by
Note: There's no method 'dispose()' or similar, since all required dispose routines are coupled to the disposal of the employed SWT widgets. Their disposal is invoked by
KlighdPrintDialog.The implementation is inspired by
org.eclipse.gmf.runtime.diagram.ui.printing.internal.printpreview.PrintPreviewHelper
of the GMF project, esp.
PrintPreviewHelper.updateCompositeForNumberOfColumns(int, int).Note: There's no method 'dispose()' or similar, since all required dispose routines are coupled to the disposal of the employed SWT widgets. Their disposal is invoked by
TrayDialog#closeTray(), which is
inherited by our KlighdPrintDialog.- Author:
- csp, chsch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intBorder size.protected static final intMinimal tile size.protected static final intDelay (in milliseconds) of scale and pages tall/wide observables and the resize event before the preview gets updated. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.widgets.ControlcreateContents(org.eclipse.swt.widgets.Composite parent) voidDraw the composite centered on the body.
-
Field Details
-
MINIMAL_TILE_SIZE
protected static final int MINIMAL_TILE_SIZEMinimal tile size.- See Also:
-
BORDER_SIZE
protected static final int BORDER_SIZEBorder size.- See Also:
-
OBSERVABLE_DELAY
protected static final int OBSERVABLE_DELAYDelay (in milliseconds) of scale and pages tall/wide observables and the resize event before the preview gets updated. This prevents massive redrawings e.g. while resizing the window.- See Also:
-
-
Method Details
-
createContents
public org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent) - Specified by:
createContentsin classorg.eclipse.jface.dialogs.DialogTray
-
updateComposite
public void updateComposite()Draw the composite centered on the body. Also calls the method to make the images and insert them into the composite.
-