01: /*
02: * This file is part of the GeOxygene project source files.
03: *
04: * GeOxygene aims at providing an open framework which implements OGC/ISO specifications for
05: * the development and deployment of geographic (GIS) applications. It is a open source
06: * contribution of the COGIT laboratory at the Institut Géographique National (the French
07: * National Mapping Agency).
08: *
09: * See: http://oxygene-project.sourceforge.net
10: *
11: * Copyright (C) 2005 Institut Géographique National
12: *
13: * This library is free software; you can redistribute it and/or modify it under the terms
14: * of the GNU Lesser General Public License as published by the Free Software Foundation;
15: * either version 2.1 of the License, or any later version.
16: *
17: * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19: * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
20: *
21: * You should have received a copy of the GNU Lesser General Public License along with
22: * this library (see file LICENSE if present); if not, write to the Free Software
23: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24: *
25: */
26:
27: package fr.ign.cogit.geoxygene.util.loader.gui;
28:
29: import java.awt.BorderLayout;
30: import java.awt.Container;
31: import java.awt.Frame;
32: import java.awt.event.ActionEvent;
33: import java.awt.event.ActionListener;
34:
35: import javax.swing.JButton;
36: import javax.swing.JDialog;
37: import javax.swing.JFrame;
38: import javax.swing.JTextArea;
39:
40: /**
41: * Envoie d'un message a l'utilisateur ...
42: *
43: * @author Thierry Badard & Arnaud Braun
44: * @version 1.0
45: *
46: */
47:
48: public class GUICompileMessage extends JFrame {
49:
50: private static final String FRAME_TITLE = "GeOxygene Message";
51:
52: private static String message = "A faire toi meme ! : "
53: + "\n## Compiler les classes generees"
54: + "\n## Faire pointer le fichier racine repository.xml vers les fichiers de mapping generes"
55: + "\n et apres ceci : creer une colonne \"COGITID\" dans vos tables "
56: + "\n a l'aide du menu \"Manage Data\" (Generation COGITID)";
57:
58: public GUICompileMessage() {
59: }
60:
61: public void showDialog() {
62: final JDialog dialog = createDialog(this );
63: dialog.show();
64: dialog.dispose();
65: }
66:
67: private JDialog createDialog(Frame parent) {
68:
69: String title = FRAME_TITLE;
70: final JDialog dialog = new JDialog(parent, title, true);
71: Container contentPane = dialog.getContentPane();
72:
73: JTextArea text = new JTextArea(message);
74:
75: JButton okButton = new JButton("OK");
76: okButton.addActionListener(new ActionListener() {
77: public void actionPerformed(ActionEvent e) {
78: dialog.dispose();
79: }
80: });
81:
82: contentPane.add(text, BorderLayout.CENTER);
83: contentPane.add(okButton, BorderLayout.SOUTH);
84:
85: dialog.pack();
86: dialog.setLocationRelativeTo(parent);
87:
88: return dialog;
89: }
90:
91: }
|