source: trunk/gsdl/src/phind/client/PhindTitle.java@ 1636

Last change on this file since 1636 was 1627, checked in by paynter, 24 years ago

The applet is now operational. Phrases work, documents work, getting new
phrases and documents work, backdrops work.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 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**********************************************************************/
34
35import java.applet.Applet;
36import java.awt.Canvas;
37import java.awt.Color;
38import java.awt.Dimension;
39import java.awt.Graphics;
40import java.awt.Image;
41
42public class PhindTitle extends Canvas {
43
44 Phind phind;
45 static Image backgroundImage;
46 boolean displayInfo;
47
48 PhindTitle(Phind p) {
49 phind = p;
50 }
51
52 public void update(Graphics g) {
53 paint(g);
54 }
55
56 public void paint(Graphics g) {
57 Dimension canvasSize = size();
58
59 // set the screen background
60 if (phind.showImage)
61 try {
62 g.drawImage(phind.backgroundImage,
63 0, 0, canvasSize.width, canvasSize.height, Color.white, null);
64 } catch (Exception e) {
65 System.err.println("PhindTitle paint: " + e);
66 }
67 else {
68 g.setColor(Color.white);
69 g.fillRect(0,0, canvasSize.width, canvasSize.height);
70 g.setColor(Color.black);
71 }
72 }
73}
74
75
76
77
78
79
80
Note: See TracBrowser for help on using the repository browser.