comparison src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage.jsp @ 1:83c58ea33792

first release (continued)
author dwinter
date Mon, 03 Jan 2011 09:11:25 +0100
parents
children
comparison
equal deleted inserted replaced
0:6829553d2378 1:83c58ea33792
1 <%@ page language="java" %><%!
2 // -- JSP init -------------
3
4 // create DocumentBean instance for all JSP requests
5 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
6
7 // initialize DocumentBean instance in JSP init
8 public void jspInit() {
9 try {
10 // set servlet init-parameter
11 docBean.setConfig(getServletConfig());
12 } catch (javax.servlet.ServletException e) {
13 System.out.println(e);
14 }
15 }
16 // -- end of JSP init -------------
17 %>
18
19 <%
20 // -- JSP request -------------
21
22 // parsing the query
23 // -----------------
24 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
25 docBean.setRequest(dlRequest);
26 // check if authentication is needed and redirect if necessary
27 docBean.doAuthentication(response);
28 // add number of pages
29 dlRequest.setValue("pt", docBean.getNumPages());
30 // store objects for jsp:include
31 pageContext.setAttribute("docBean", docBean, pageContext.REQUEST_SCOPE);
32 %>
33
34 <html>
35
36 <head>
37 <title>Digital Document Library NG</title>
38
39 <style type="text/css">
40
41 body { background-color: #E0E0E0; color: black; font-size: 8pt }
42 code { font-family: monospace; color: blue; }
43 pre { color: #006060; }
44
45 a.icon { margin: 0px; padding: 0px; }
46
47 img.png { border: none; }
48 img.mark { border: none; }
49
50 div.button { margin: -4px; padding: 0px; }
51 div.dot { position: absolute; left: -20; top: 100; visibility: hidden } div#scaler-table { padding-right: 40px; }
52
53 div#buttons { position: absolute; right: 10px; top: 10px; }
54
55 </style>
56
57 <script type="text/javascript" src="../baselib.js"></script>
58
59 <script type="text/javascript" src="../dllib.js"></script>
60
61 <script language="JavaScript">
62 function highlightPNG(id, on) {
63 var elem = document.getElementById(id);
64 //var div = elem.parentNode.parentNode;
65 elem.style.backgroundImage = on
66 ? "url('corona.png')"
67 : null;
68 }
69
70 base_init();
71 var dlTarget = window.name;
72 var baseUrl = '<%= dlRequest.getAsString("base.url") %>';
73 var toolbarEnabledURL = window.location.href;
74 newParameter('fn', '', 1);
75 newParameter('pn', '1', 1);
76 newParameter('ws', '1.0', 1);
77 newParameter('mo', '', 1);
78 newParameter('mk', '', 3);
79 newParameter('wx', '0.0', 2);
80 newParameter('wy', '0.0', 2);
81 newParameter('ww', '1.0', 2);
82 newParameter('wh', '1.0', 2);
83 newParameter('pt', '<%= dlRequest.getAsString("pt") %>', 1);
84 newParameter('brgt', '0.0', 1);
85 newParameter('cont', '0.0', 1);
86 newParameter('rot', '0.0', 1);
87 newParameter('rgba', '', 1);
88 newParameter('rgbm', '', 1);
89 newParameter('ddpix', '', 1);
90 newParameter('ddpiy', '', 1);
91 document.id='digilib';
92 dl_param_init();
93
94 function init() {
95 dl_init();
96 var scaler = getElement('scaler');
97 var pic = getElement('pic');
98 var ps = bestPicSize(scaler, 50);
99 var src = "../servlet/Scaler?fn=&dw=" + ps.width + "&dh=" + ps.height;
100 pic.src = src;
101 }
102 </script>
103 </head>
104
105 <body onload="init();">
106
107 <div id="scaler-table">
108 <div id="scaler" style="visibility:visible">
109 <img id="pic"></img>
110 </div>
111 </div>
112
113 <!-- marks as dynamically created divs with numbers or text? -->
114 <div id="dot0" class="dot"><img class="mark" src="../img/mark1.gif" ></div>
115 <div id="dot1" class="dot"><img class="mark" src="../img/mark2.gif" ></div>
116 <div id="dot2" class="dot"><img class="mark" src="../img/mark3.gif" ></div>
117 <div id="dot3" class="dot"><img class="mark" src="../img/mark4.gif" ></div>
118 <div id="dot4" class="dot"><img class="mark" src="../img/mark5.gif" ></div>
119 <div id="dot5" class="dot"><img class="mark" src="../img/mark6.gif" ></div>
120 <div id="dot6" class="dot"><img class="mark" src="../img/mark7.gif" ></div>
121 <div id="dot7" class="dot"><img class="mark" src="../img/mark8.gif" ></div>
122
123 <!-- zoom area with a transparent div ? -->
124 <div id="eck1" class="dot"><img class="mark" src="../img/olinks.gif" ></div>
125 <div id="eck2" class="dot"><img class="mark" src="../img/orechts.gif" ></div>
126 <div id="eck3" class="dot"><img class="mark" src="../img/ulinks.gif" ></div>
127 <div id="eck4" class="dot"><img class="mark" src="../img/urechts.gif" ></div>
128
129
130 <div id="buttons"
131 <div class="button">
132 <a
133 class="icon"
134 href="javascript:showOptions(0);setMark()"
135 >
136
137 <img
138 class="png"
139 id="mark"
140 onmouseover="highlightPNG('mark', 1)"
141 onmouseout="highlightPNG('mark', 0)"
142 title="set a mark"
143 src="mark.png"
144 >
145 </a>
146 </div>
147
148 <div class="button">
149 <a
150 class="icon"
151 href="javascript:removeMark()"
152 >
153
154 <img
155 class="png"
156 id="delmark"
157 onmouseover="highlightPNG('delmark', 1)"
158 onmouseout="highlightPNG('delmark', 0)"
159 title="delete the last mark"
160 src="delmark.png"
161 >
162 </a>
163 </div>
164
165 <div class="button">
166 <a
167 class="icon"
168 href="javascript:getRefWin()"
169 >
170
171 <img
172 class="png"
173 id="reference"
174 onmouseover="highlightPNG('reference', 1)"
175 onmouseout="highlightPNG('reference', 0)"
176 title="get a reference URL"
177 src="reference.png"
178 >
179 </a>
180 </div>
181
182 <div class="button">
183 <a
184 class="icon"
185 href="javascript:zoomBy(1.4)"
186 >
187
188 <img
189 class="png"
190 id="zoom-in"
191 onmouseover="highlightPNG('zoom-in', 1)"
192 onmouseout="highlightPNG('zoom-in', 0)"
193 title="zoom in"
194 src="zoom-in.png"
195 >
196 </a>
197 </div>
198
199 <div class="button">
200 <a
201 class="icon"
202 href="javascript:zoomBy(0.7)"
203 >
204
205 <img
206 class="png"
207 id="zoom-out"
208 onmouseover="highlightPNG('zoom-out', 1)"
209 onmouseout="highlightPNG('zoom-out', 0)"
210 title="zoom out"
211 src="zoom-out.png"
212 >
213 </a>
214 </div>
215
216 <div class="button">
217 <a
218 class="icon"
219 href="javascript:showOptions(0);zoomArea()"
220 >
221
222 <img
223 class="png"
224 id="zoom-area"
225 onmouseover="highlightPNG('zoom-area', 1)"
226 onmouseout="highlightPNG('zoom-area', 0)"
227 title="zoom area"
228 src="zoom-area.png"
229 >
230 </a>
231 </div>
232
233 <div class="button">
234 <a
235 class="icon"
236 href="javascript:zoomFullpage()"
237 >
238
239 <img
240 class="png"
241 id="zoom-full"
242 onmouseover="highlightPNG('zoom-full', 1)"
243 onmouseout="highlightPNG('zoom-full', 0)"
244 title="view the whole image"
245 src="zoom-full.png"
246 >
247 </a>
248 </div>
249
250 <div class="button">
251 <a
252 class="icon"
253 href="javascript:mirror('h')"
254 >
255
256 <img
257 class="png"
258 id="mirror-h"
259 onmouseover="highlightPNG('mirror-h', 1)"
260 onmouseout="highlightPNG('mirror-h', 0)"
261 title="mirror horizontally"
262 src="mirror-horizontal.png"
263 >
264 </a>
265 </div>
266
267 <div class="button">
268 <a
269 class="icon"
270 href="javascript:mirror('v')"
271 >
272
273 <img
274 class="png"
275 id="mirror-v"
276 onmouseover="highlightPNG('mirror-v', 1)"
277 onmouseout="highlightPNG('mirror-v', 0)"
278 title="mirror vertically"
279 src="mirror-vertical.png"
280 >
281 </a>
282 </div>
283
284 <div class="button">
285 <a
286 class="icon"
287 href="javascript:setParamWin('rot', 'Rotate (0..360) clockwise')"
288 >
289
290 <img
291 class="png"
292 id="rotate"
293 onmouseover="highlightPNG('rotate', 1)"
294 onmouseout="highlightPNG('rotate', 0)"
295 title="rotate image"
296 src="rotate.png"
297 >
298 </a>
299 </div>
300
301 <div class="button">
302 <a
303 class="icon"
304 href="javascript:setParamWin('brgt', 'Brightness (-255..255)')"
305 >
306
307 <img
308 class="png"
309 id="brightness"
310 onmouseover="highlightPNG('brightness', 1)"
311 onmouseout="highlightPNG('brightness', 0)"
312 title="set brightness"
313 src="brightness.png"
314 >
315 </a>
316 </div>
317
318 <div class="button">
319 <a
320 class="icon"
321 href="javascript:setParamWin('cont', 'Contrast (0..8)')"
322 >
323
324 <img
325 class="png"
326 id="contrast"
327 onmouseover="highlightPNG('contrast', 1)"
328 onmouseout="highlightPNG('contrast', 0)"
329 title="set contrast"
330 src="contrast.png"
331 >
332 </a>
333 </div>
334
335 <div class="button">
336 <a
337 class="icon"
338 href="javascript:setParamWin('rgb', '...')"
339 >
340
341 <img
342 class="png"
343 id="rgb"
344 onmouseover="highlightPNG('rgb', 1)"
345 onmouseout="highlightPNG('rgb', 0)"
346 title="set rgb values"
347 src="rgb.png"
348 >
349 </a>
350 </div>
351
352 <div class="button">
353 <a
354 class="icon"
355 href="javascript:setParamWin('size', '...')"
356 >
357
358 <img
359 class="png"
360 id="size"
361 onmouseover="highlightPNG('size', 1)"
362 onmouseout="highlightPNG('size', 0)"
363 title="resize page"
364 src="size.png"
365 >
366 </a>
367 </div>
368
369 <div class="button">
370 <a
371 class="icon"
372 href="javascript:setQualityWin('Quality (0..2)')"
373 >
374
375 <img
376 class="png"
377 id="quality"
378 onmouseover="highlightPNG('quality', 1)"
379 onmouseout="highlightPNG('quality', 0)"
380 title="set image quality"
381 src="quality.png"
382 >
383 </a>
384 </div>
385
386 <div class="button">
387 <a
388 class="icon"
389 href="javascript:gotoPage('-1')"
390 >
391
392 <img
393 class="png"
394 id="back"
395 onmouseover="highlightPNG('back', 1)"
396 onmouseout="highlightPNG('back', 0)"
397 title="goto previous image"
398 src="back.png"
399 >
400 </a>
401 </div>
402
403 <div class="button">
404 <a
405 class="icon"
406 href="javascript:gotoPage('+1')"
407 >
408
409 <img
410 class="png"
411 id="fwd"
412 onmouseover="highlightPNG('fwd', 1)"
413 onmouseout="highlightPNG('fwd', 0)"
414 title="goto next image"
415 src="fwd.png"
416 >
417 </a>
418 </div>
419
420 <div class="button">
421 <a
422 class="icon"
423 href="javascript:gotoPageWin()"
424 >
425
426 <img
427 class="png"
428 id="page"
429 onmouseover="highlightPNG('page', 1)"
430 onmouseout="highlightPNG('page', 0)"
431 title="specify image"
432 src="page.png"
433 >
434 </a>
435 </div>
436
437 <div class="button">
438 <a
439 class="icon"
440 href="javascript:help()"
441 >
442
443 <img
444 class="png"
445 id="help"
446 onmouseover="highlightPNG('help', 1)"
447 onmouseout="highlightPNG('help', 0)"
448 title="help"
449 src="help.png"
450 >
451 </a>
452 </div>
453
454 </div>
455
456
457 </body>
458
459 </html>