116 lines
51 KiB
HTML
116 lines
51 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||
|
|
||
|
<html><head><title>mxPrintPreview</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
|
||
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
||
|
|
||
|
<!-- Generated by Natural Docs, version 1.5 -->
|
||
|
<!-- http://www.naturaldocs.org -->
|
||
|
|
||
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxPrintPreview"></a>mxPrintPreview</h1><div class=CBody><p>Implements printing of a diagram across multiple pages. The following opens a print preview for an existing graph:</p><blockquote><pre class="prettyprint">var preview = new mxPrintPreview(graph);
|
||
|
preview.open();</pre></blockquote><p>Use <a href="../util/mxUtils-js.html#mxUtils.getScaleForPageCount" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">mxUtils.getScaleForPageCount</a> as follows in order to print the graph across a given number of pages:</p><blockquote><pre class="prettyprint">var pageCount = mxUtils.prompt('Enter page count', '1');
|
||
|
|
||
|
if (pageCount != null)
|
||
|
{
|
||
|
var scale = mxUtils.getScaleForPageCount(pageCount, graph);
|
||
|
var preview = new mxPrintPreview(graph, scale);
|
||
|
preview.open();
|
||
|
}</pre></blockquote><h4 class=CHeading>Headers</h4><p>Apart from setting the title argument in the mxPrintPreview constructor you can override <a href="#mxPrintPreview.renderPage" class=LFunction id=link25 onMouseOver="ShowTip(event, 'tt20', 'link25')" onMouseOut="HideTip('tt20')">renderPage</a> as follows to add a header to any page:</p><blockquote><pre class="prettyprint">var oldRenderPage = mxPrintPreview.prototype.renderPage;
|
||
|
mxPrintPreview.prototype.renderPage = function(w, h, dx, dy, scale, pageNumber)
|
||
|
{
|
||
|
var div = oldRenderPage.apply(this, arguments);
|
||
|
|
||
|
var header = document.createElement('div');
|
||
|
header.style.position = 'absolute';
|
||
|
header.style.top = '0px';
|
||
|
header.style.width = '100%';
|
||
|
header.style.textAlign = 'right';
|
||
|
mxUtils.write(header, 'Your header here - Page ' + pageNumber + ' / ' + this.pageCount);
|
||
|
div.firstChild.appendChild(header);
|
||
|
|
||
|
return div;
|
||
|
};</pre></blockquote><h4 class=CHeading>Page Format</h4><p>For landscape printing, use <mxConstants.PAGE_FORMAT_A4_LANDSCAPE> as the pageFormat in <a href="../util/mxUtils-js.html#mxUtils.getScaleForPageCount" class=LFunction id=link26 onMouseOver="ShowTip(event, 'tt23', 'link26')" onMouseOut="HideTip('tt23')">mxUtils.getScaleForPageCount</a> and <a href="#mxPrintPreview.mxPrintPreview" class=LFunction id=link27 onMouseOver="ShowTip(event, 'tt1', 'link27')" onMouseOut="HideTip('tt1')">mxPrintPreview</a>. Keep in mind that one can not set the defaults for the print dialog of the operating system from JavaScript so the user must manually choose a page format that matches this setting.</p><p>You can try passing the following CSS directive to <a href="#mxPrintPreview.open" class=LFunction id=link28 onMouseOver="ShowTip(event, 'tt17', 'link28')" onMouseOut="HideTip('tt17')">open</a> to set the page format in the print dialog to landscape. However, this CSS directive seems to be ignored in most major browsers, including IE.</p><blockquote><pre class="prettyprint">@page {
|
||
|
size: landscape;
|
||
|
}</pre></blockquote><p>Note that the print preview behaves differently in IE when used from the filesystem or via HTTP so printing should always be tested via HTTP.</p><p>If you are using a DOCTYPE in the source page you can override <getDoctype> and provide the same DOCTYPE for the print preview if required. Here is an example for IE8 standards mode.</p><blockquote><pre class="prettyprint">var preview = new mxPrintPreview(graph);
|
||
|
preview.getDoctype = function()
|
||
|
{
|
||
|
return '<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=8" ><![endif]-->';
|
||
|
};
|
||
|
preview.open();</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxPrintPreview" >mxPrintPreview</a></td><td class=SDescription>Implements printing of a diagram across multiple pages. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxPrintPreview.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.mxPrintPreview" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxPrintPreview</a></td><td class=SDescription>Constructs a new print preview for the given parameters.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxPrintPreview.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.graph" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">graph</a></td><td class=SDescription>Reference to the <a href="mxGraph-js.html#mxGraph" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">mxGraph</a> that should be previewed.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.pageFormat" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">pageFormat</a></td><td class=SDescription>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">mxRectangle</a> that defines the page format.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.scale" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">scale</a></td><td class=SDescription>Holds the scale of the print preview.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.border" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">border</a></td><td class=SDescription>The border inset around each side of every page in the preview. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.y0" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">y0</a></td><td class=SDescription>Holds the vertical offset of the output.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.autoOrigin" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">autoOrigin</a></td><td class=SDescription>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.printOverlays" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">printOverlays</a></td><td class=SDescription>Specifies if overlays should be printed. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.borderColor" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">borderColor</a></td><td class=SDescription>Holds the color value for the page border.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.title" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">title</a></td><td class=SDescription>Holds the title of the preview window.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.pageSelector" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">pageSelector</a></td><td class=SDescription>Boolean that specifies if the page selector should be displayed. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.wnd" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMou
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.mxPrintPreview"></a>mxPrintPreview</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxPrintPreview(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageFormat,</td></tr><tr><td></td><td class=PParameter nowrap>border,</td></tr><tr><td></td><td class=PParameter nowrap>x0,</td></tr><tr><td></td><td class=PParameter nowrap>y0,</td></tr><tr><td></td><td class=PParameter nowrap>borderColor,</td></tr><tr><td></td><td class=PParameter nowrap>title,</td></tr><tr><td></td><td class=PParameter nowrap>pageSelector</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new print preview for the given parameters.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>graph</td><td class=CDLDescription><a href="mxGraph-js.html#mxGraph" class=LClass id=link29 onMouseOver="ShowTip(event, 'tt3', 'link29')" onMouseOut="HideTip('tt3')">mxGraph</a> to be previewed.</td></tr><tr><td class=CDLEntry>scale</td><td class=CDLDescription>Optional scale of the output. Default is 1 / <a href="mxGraph-js.html#mxGraph.pageScale" class=LVariable id=link30 onMouseOver="ShowTip(event, 'tt24', 'link30')" onMouseOut="HideTip('tt24')">mxGraph.pageScale</a>.</td></tr><tr><td class=CDLEntry>border</td><td class=CDLDescription>Border in pixels along each side of every page. Note that the actual print function in the browser will add another border for printing.</td></tr><tr><td class=CDLEntry>pageFormat</td><td class=CDLDescription><a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link31 onMouseOver="ShowTip(event, 'tt5', 'link31')" onMouseOut="HideTip('tt5')">mxRectangle</a> that specifies the page format (in pixels). This should match the page format of the printer. Default uses the <a href="mxGraph-js.html#mxGraph.pageFormat" class=LVariable id=link32 onMouseOver="ShowTip(event, 'tt25', 'link32')" onMouseOut="HideTip('tt25')">mxGraph.pageFormat</a> of the given graph.</td></tr><tr><td class=CDLEntry>x0</td><td class=CDLDescription>Optional left offset of the output. Default is 0.</td></tr><tr><td class=CDLEntry>y0</td><td class=CDLDescription>Optional top offset of the output. Default is 0.</td></tr><tr><td class=CDLEntry>borderColor</td><td class=CDLDescription>Optional color of the page border. Default is no border. Note that a border is sometimes useful to highlight the printed page border in the print preview of the browser.</td></tr><tr><td class=CDLEntry>title</td><td class=CDLDescription>Optional string that is used for the window title. Default is ‘Printer-friendly version’.</td></tr><tr><td class=CDLEntry>pageSelector</td><td class=CDLDescription>Optional boolean that specifies if the page selector should appear in the window with the print preview. Default is true.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Variables"></a>Variables</h3></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.graph"></a>graph</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.graph</td></tr></table></blockquote><p>Reference to the <a href="mxGraph-js.html#mxGraph" class=LClass id=link33 onMouseOver="ShowTip(event, 'tt3', 'link33')" onMouseOut="HideTip('tt3')">mxGraph</a> that should be previewed.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageFormat"></a>pageFormat</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageFormat</td></tr></table></blockquote><p>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link34 onMouseOver="ShowTip(event, 'tt5', 'link34')" onMouseOut="HideTip('tt5')">mxRectangle</a> that defines the page format.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.scale"></a>scale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.scale</td></tr></table></blockquote><p>Holds the scale of the print preview.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.border"></a>border</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.border</td></tr></table></blockquote><p>The border inset around each side of every page in the preview. This is set to 0 if autoOrigin is false.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.y0"></a>y0</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.y0</td></tr></table></blockquote><p>Holds the vertical offset of the output.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.autoOrigin"></a>autoOrigin</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.autoOrigin</td></tr></table></blockquote><p>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents. If this is set to false then the values for <x0> and <a href="#mxPrintPreview.y0" class=LVariable id=link35 onMouseOver="ShowTip(event, 'tt8', 'link35')" onMouseOut="HideTip('tt8')">y0</a> will be overridden in <a href="#mxPrintPreview.open" class=LFunction id=link36 onMouseOver="ShowTip(event, 'tt17', 'link36')" onMouseOut="HideTip('tt17')">open</a>. Default is true.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.printOverlays"></a>printOverlays</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printOverlays</td></tr></table></blockquote><p>Specifies if overlays should be printed. Default is false.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.borderColor"></a>borderColor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.borderColor</td></tr></table></blockquote><p>Holds the color value for the page border.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.title"></a>title</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.title</td></tr></table></blockquote><p>Holds the title of the preview window.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageSelector"></a>pageSelector</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageSelector</td></tr></table></blockquote><p>Boolean that specifies if the page selector should be displayed. Default is true.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.wnd"></a>wnd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.wnd</td></tr></table></blockquote><p>Reference to the preview window.</p></div></div></div>
|
||
|
|
||
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageCount"></a>pageCount</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageCount</td></tr></table></blockquote><p>Holds the actual number of pages in the preview.</p></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getWindow"></a>getWindow</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getWindow = function()</td></tr></table></blockquote><p>Returns <a href="#mxPrintPreview.wnd" class=LVariable id=link37 onMouseOver="ShowTip(event, 'tt14', 'link37')" onMouseOut="HideTip('tt14')">wnd</a>.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getDocType"></a>getDocType</h3><div class=CBody><p>Returns the string that should go before the HTML tag in the print preview page. This implementation returns an empty string.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.open"></a>open</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.open = function(</td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows the print preview window. The window is created here if it does not exist.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>css</td><td class=CDLDescription>Optional CSS string to be used in the new page’s head section.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.writeHead"></a>writeHead</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.writeHead = function(</td><td class=PParameter nowrap>doc,</td></tr><tr><td></td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the HEAD section into the given document, without the opening and closing HEAD tags.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.createPageSelector"></a>createPageSelector</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.createPageSelector = function(</td><td class=PParameter nowrap>vpages,</td></tr><tr><td></td><td class=PParameter nowrap>hpages</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the page selector table.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.renderPage"></a>renderPage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.renderPage = function(</td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h,</td></tr><tr><td></td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageNumber</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a DIV that prints a single page of the given graph using the given scale and returns the DIV that represents the page.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>w</td><td class=CDLDescription>Width of the page in pixels.</td></tr><tr><td class=CDLEntry>h</td><td class=CDLDescription>Height of the page in pixels.</td></tr><tr><td class=CDLEntry>dx</td><td class=CDLDescription>Horizontal translation for the diagram.</td></tr><tr><td class=CDLEntry>dy</td><td class=CDLDescription>Vertical translation for the diagram.</td></tr><tr><td class=CDLEntry>scale</td><td class=CDLDescription>Scale for the diagram.</td></tr><tr><td class=CDLEntry>pageNumber</td><td class=CDLDescription>Number of the page to be rendered.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.print"></a>print</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.print = function()</td></tr></table></blockquote><p>Opens the print preview and shows the print dialog.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.close"></a>close</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.close = function()</td></tr></table></blockquote><p>Closes the print preview window.</p></div></div></div>
|
||
|
|
||
|
</div><!--Content-->
|
||
|
|
||
|
|
||
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
||
|
|
||
|
|
||
|
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../editor/mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxEditor-js.html">mxEditor</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxObjectCodec-js.html">mxObjectCodec</a></div></div><div
|
||
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
|
||
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
||
|
HideAllBut([11], 13);// --></script></div><!--Menu-->
|
||
|
|
||
|
|
||
|
|
||
|
<!--START_ND_TOOLTIPS-->
|
||
|
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxPrintPreview(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageFormat,</td></tr><tr><td></td><td class=PParameter nowrap>border,</td></tr><tr><td></td><td class=PParameter nowrap>x0,</td></tr><tr><td></td><td class=PParameter nowrap>y0,</td></tr><tr><td></td><td class=PParameter nowrap>borderColor,</td></tr><tr><td></td><td class=PParameter nowrap>title,</td></tr><tr><td></td><td class=PParameter nowrap>pageSelector</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new print preview for the given parameters.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.graph</td></tr></table></blockquote>Reference to the mxGraph that should be previewed.</div></div><div class=CToolTip id="tt3"><div class=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageFormat</td></tr></table></blockquote>Holds the mxRectangle that defines the page format.</div></div><div class=CToolTip id="tt5"><div class=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.scale</td></tr></table></blockquote>Holds the scale of the print preview.</div></div><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.border</td></tr></table></blockquote>The border inset around each side of every page in the preview. </div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.y0</td></tr></table></blockquote>Holds the vertical offset of the output.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.autoOrigin</td></tr></table></blockquote>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents. </div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printOverlays</td></tr></table></blockquote>Specifies if overlays should be printed. </div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.borderColor</td></tr></table></blockquote>Holds the color value for the page border.</div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.title</td></tr></table></blockquote>Holds the title of the preview window.</div></div><div class=CToolTip id="tt13"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageSelector</td></tr></table></blockquote>Boolean that specifies if the page selector should be displayed. </div></div><div class=CToolTip id="tt14"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintP
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
||
|
|
||
|
|
||
|
<script language=JavaScript><!--
|
||
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|