source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_sources/lib/GeoExt/plugins/PrintPageField.txt
@
76
Revision 76, 2.3 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | |
2 | .. currentmodule:: GeoExt.plugins | |
3 | ||
4 | :class:`GeoExt.plugins.PrintPageField` | |
5 | ================================================================================ | |
6 | ||
7 | ||
8 | .. cssclass:: meta | |
9 | ||
10 | ||
11 | Extends | |
12 | * `Ext.util.Observable <http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable>`_ | |
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ptype | |
19 | ``gx_printpagefield`` | |
20 | ||
21 | ||
22 | ||
23 | .. class:: PrintPageField | |
24 | ||
25 | A plugin for ``Ext.form.Field`` components which provides synchronization | |
26 | with a :class:`GeoExt.data.PrintPage`. The field name has to match the | |
27 | respective property of the printPage (e.g. ``scale``, ``rotation``). | |
28 | ||
29 | ||
30 | ||
31 | Example Use | |
32 | ----------- | |
33 | ||
34 | A form with a combo box for the scale and text fields for rotation and a | |
35 | page title. The page title is a custom parameter of the print module's | |
36 | page configuration: | |
37 | ||
38 | .. code-block:: javascript | |
39 | ||
40 | var printPage = new GeoExt.data.PrintPage({ | |
41 | printProvider: new GeoExt.data.PrintProvider({ | |
42 | capabilities: printCapabilities | |
43 | }) | |
44 | }); | |
45 | new Ext.form.FormPanel({ | |
46 | renderTo: "form", | |
47 | width: 200, | |
48 | height: 300, | |
49 | items: [{ | |
50 | xtype: "combo", | |
51 | displayField: "name", | |
52 | store: printPage.scales, // printPage.scale | |
53 | name: "scale", | |
54 | fieldLabel: "Scale", | |
55 | typeAhead: true, | |
56 | mode: "local", | |
57 | forceSelection: true, | |
58 | triggerAction: "all", | |
59 | selectOnFocus: true, | |
60 | plugins: new GeoExt.plugins.PrintPageField({ | |
61 | printPage: printPage | |
62 | }) | |
63 | }, { | |
64 | xtype: "textfield", | |
65 | name: "rotation", // printPage.rotation | |
66 | fieldLabel: "Rotation", | |
67 | plugins: new GeoExt.plugins.PrintPageField({ | |
68 | printPage: printPage | |
69 | }) | |
70 | }, { | |
71 | xtype: "textfield", | |
72 | name: "mapTitle", // printPage.customParams["mapTitle"] | |
73 | fieldLabel: "Map Title", | |
74 | plugins: new GeoExt.plugins.PrintPageField({ | |
75 | printPage: printPage | |
76 | }) | |
77 | }] | |
78 | }); | |
79 | ||
80 | ||
81 | ||
82 | ||
83 | Config Options | |
84 | -------------- | |
85 | ||
86 | Configuration properties in addition to | |
87 | those listed for `Ext.util.Observable <http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable>`_. | |
88 | ||
89 | ||
90 | .. describe:: printPage | |
91 | ||
92 | ``GeoExt.data.PrintPage`` The print page to synchronize with. | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 |
Note: See TracBrowser
for help on using the repository browser.