source: trunk/gli/src/org/greenstone/gatherer/Log.java@ 4368

Last change on this file since 4368 was 4363, checked in by kjdon, 21 years ago

re-tabbed the code for java

  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1package org.greenstone.gatherer;
2/**
3 *#########################################################################
4 *
5 * A component of the Gatherer application, part of the Greenstone digital
6 * library suite from the New Zealand Digital Library Project at the
7 * University of Waikato, New Zealand.
8 *
9 * <BR><BR>
10 *
11 * Author: John Thompson, Greenstone Digital Library, University of Waikato
12 *
13 * <BR><BR>
14 *
15 * Copyright (C) 1999 New Zealand Digital Library Project
16 *
17 * <BR><BR>
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
23 *
24 * <BR><BR>
25 *
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
30 *
31 * <BR><BR>
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 *########################################################################
37 */
38import java.awt.event.*;
39import javax.swing.*;
40import org.greenstone.gatherer.Gatherer;
41import org.greenstone.gatherer.Message;
42/** The GLog provides a logging class for various messages around Gatherer.
43 * It includes methods to adding to the log, sorting and filtering the log,
44 * reading/writing the log to disk and viewing the log (via a dialog, haha).
45 * @author John Thompson, Greenstone Digital Library, University of Waikato
46 * @version 1.0
47 */
48public class Log
49 implements ActionListener {
50 /** A reference to the dialog box the log will be displayed in so our inner classes have the ability to interact. */
51 private JDialog dialog = null;
52 /** Constructor */
53 public Log() {
54 }
55 /** Any implementation of ActionListener must include this method so
56 * we can be informed when an action has occured.
57 * @param event An <strong>ActionEvent</strong> which contains the details about the
58 * event which fired this call.
59 */
60 public void actionPerformed(ActionEvent event) {
61 if(event.getSource() == dialog) {
62 dialog.dispose();
63 }
64 }
65 /** Add a message to the log. Note that this may be called from within
66 * several different threads so I'd better synchronize.
67 * @param message A <strong>Message</strong> which contains, surprisingly enough, the
68 * message.
69 * @see org.greenstone.gatherer.Gatherer
70 */
71 public synchronized void add(Message message) {
72 //Gatherer.println(message.toString());
73 /* @TODO */
74 }
75 /** Create a modal dialog box components to allow the user to view, and
76 * filter the log.
77 */
78 public void display() {
79 /* @TODO */
80 }
81}
82
Note: See TracBrowser for help on using the repository browser.