Debian Codegraph @

dojox/gauges/tests/test_AnalogGaugeWidgetOrientation.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>Analog Gauge Widget Orientation</title>
5 <style>
6 @import "../_Gauge.css";
7 @import "../../../dojo/resources/dojo.css";
8 @import "../../../dijit/themes/tundra/tundra.css";
9 </style>
10 <script type="text/javascript">
11 djConfig = {
12 parseOnLoad: true,
13 isDebug: true
14 };
15 </script>
16 <script type="text/javascript" src="../../../dojo/dojo.js">
17 </script>
18 <script language="JavaScript" type="text/javascript">
19 dojo.require('dojox.gauges.AnalogGauge');
20 dojo.require('dojox.gauges.AnalogArcIndicator');
21 dojo.require('dojox.gauges.AnalogNeedleIndicator');
22 dojo.require('dojox.gauges.AnalogCircleIndicator');
23 dojo.require('dojox.gauges.TextIndicator');
24 dojo.require('dijit.form.Button');
25 dojo.require('dojo.parser');
26
27 dojo.addOnLoad(init);
28
29
30 function init(){
31
32
33 var gauge1 = new dojox.gauges.AnalogGauge({
34 id: "gauge",
35 startAngle: -60,
36 endAngle: 60,
37 background: 'white',
38 width: 300,
39 height: 180,
40 cx: 150,
41 cy: 150,
42 radius: 130,
43 ranges: [{
44 low: 0,
45 high: 60,
46 color: 'white'
47 }],
48
49 majorTicks: {
50 offset: 100,
51 interval: 10,
52 length: 3,
53 color: 'black',
54 labelPlacement: 'outside'
55 },
56
57 indicators: [new dojox.gauges.AnalogNeedleIndicator({
58 interactionMode: "gauge",
59 value: 0,
60 width: 10,
61 length: 100,
62 strokeColor: [100, 100, 100],
63 color: [200, 200, 200]
64
65 })]
66 }, dojo.byId("gauge"));
67
68 gauge1.startup();
69
70
71 var gauge2 = new dojox.gauges.AnalogGauge({
72 id: "gauge2",
73 orientation: "cclockwise",
74 startAngle: 60,
75 endAngle: -60,
76 background: 'white',
77 width: 300,
78 height: 180,
79 cx: 150,
80 cy: 150,
81 radius: 130,
82 ranges: [{
83 low: 0,
84 high: 60,
85 color: 'white'
86 }],
87
88 majorTicks: {
89 offset: 100,
90 interval: 10,
91 length: 3,
92 color: 'black'
93 },
94
95 indicators: [new dojox.gauges.AnalogNeedleIndicator({
96 interactionMode: "gauge",
97 value: 0,
98 width: 10,
99 length: 100,
100 strokeColor: [100, 100, 100],
101 color: [200, 200, 200]
102
103 })]
104 }, dojo.byId("gauge2"));
105
106 gauge2.startup();
107
108
109 }
110 </script>
111 </head>
112 <body class="tundra">
113 <h1>Analog Gauge Widget Orientation</h1>
114 <ul class="lst">
115 <li>
116 Clockwise
117 </li>
118 </ul>
119 <div id="gauge">
120 </div>
121 <ul class="lst">
122 <li>
123 Counter Clockwise
124 </li>
125 </ul>
126 <div id="gauge2">
127 </div>
128 </body>
129 </html>