svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.about / org.gvsig.about.impl / src / main / java / org / gvsig / about / swing / JContentPanel.java @ 42024
History | View | Annotate | Download (2.05 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.about.swing; |
23 |
|
24 |
import java.awt.BorderLayout; |
25 |
|
26 |
import javax.swing.JPanel; |
27 |
|
28 |
import org.gvsig.about.AboutManager; |
29 |
import org.gvsig.about.AboutParticipant; |
30 |
import org.gvsig.about.AboutProject; |
31 |
import org.gvsig.htmlBrowser.HtmlBrowserPanel; |
32 |
import org.gvsig.htmlBrowser.SimpleHtmlBrowserPanel; |
33 |
|
34 |
/**
|
35 |
* @author gvSIG Team
|
36 |
* @version $Id$
|
37 |
*
|
38 |
*/
|
39 |
public class JContentPanel extends JPanel /* implements HyperlinkListener */{ |
40 |
|
41 |
/**
|
42 |
*
|
43 |
*/
|
44 |
private static final long serialVersionUID = 5605530722128487156L; |
45 |
protected AboutManager manager;
|
46 |
HtmlBrowserPanel htmlPane; |
47 |
|
48 |
public JContentPanel(AboutManager manager, AboutProject project) {
|
49 |
this.manager = manager;
|
50 |
this.htmlPane = null; |
51 |
|
52 |
setLayout(new BorderLayout()); |
53 |
this.htmlPane = new SimpleHtmlBrowserPanel(); |
54 |
add(this.htmlPane, BorderLayout.CENTER); |
55 |
|
56 |
this.setContent(manager.getProject());
|
57 |
setVisible(true);
|
58 |
} |
59 |
|
60 |
public void setContent(AboutParticipant participant) { |
61 |
htmlPane.setText(participant.getInformationPage()); |
62 |
} |
63 |
|
64 |
public void setContent(AboutProject project) { |
65 |
htmlPane.setText(project.getInformationPage()); |
66 |
} |
67 |
|
68 |
} |