source: trunk/gsdl3/src/java/org/greenstone/applet/phind/PhindTitle.java@ 3444

Last change on this file since 3444 was 3444, checked in by kjdon, 22 years ago

tried to get the applet working on Mozilla, Netscape, and IE. It works fine on all apart from the buttons. All buttons work in Netscape. Search works in IE, but not Mozilla. Previous and Next dont work in IE or Mozilla.
Had to compile with 1.3 instead of 1.4. Have also removed all the deprecated method calls.
phindcgi variable now prepends the library variable (assumes will always use it through greenstone)

  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/**********************************************************************
2 *
3 * PhindTitle.java -- backdrops to empty ResultDisplay panels.
4 *
5 * Copyright 1997-2000 Gordon W. Paynter
6 * Copyright 2000 The New Zealand Digital Library Project
7 *
8 * A component of the Greenstone digital library software
9 * from the New Zealand Digital Library Project at the
10 * University of Waikato, New Zealand.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 *********************************************************************/
27
28
29/*********************************************************************
30
31PhindTitle is for drawing backdrops in empty ResultDisplay panels.
32
33**********************************************************************/
34package org.greenstone.applet.phind;
35//package org.nzdl.gsdl.Phind;
36
37import java.applet.Applet;
38import java.awt.Canvas;
39import java.awt.Color;
40import java.awt.Dimension;
41import java.awt.Graphics;
42import java.awt.Image;
43
44public class PhindTitle extends Canvas {
45
46 Phind phind;
47 static Image backgroundImage;
48 boolean displayInfo;
49
50 PhindTitle(Phind p) {
51 phind = p;
52 }
53
54 public void update(Graphics g) {
55 paint(g);
56 }
57
58 public void paint(Graphics g) {
59 Dimension canvasSize = getSize();
60
61 Color fore = phind.panel_fg;
62 Color back = phind.panel_bg;
63
64 // set the screen background
65 if (phind.showImage)
66 try {
67 g.drawImage(phind.backgroundImage,
68 0, 0, canvasSize.width, canvasSize.height, back, null);
69 } catch (Exception e) {
70 System.err.println("PhindTitle paint: " + e);
71 }
72 else {
73 g.setColor(back);
74 g.fillRect(0,0, canvasSize.width, canvasSize.height);
75 }
76 }
77}
78
79
80
81
82
83
84
Note: See TracBrowser for help on using the repository browser.