gvsig-raster / org.gvsig.raster.wmts / trunk / org.gvsig.raster.wmts / org.gvsig.raster.wmts.swing / org.gvsig.raster.wmts.swing.impl / src / main / java / org / gvsig / raster / wmts / swing / impl / wizard / StylesPanel.java @ 2609
History | View | Annotate | Download (2.43 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 |
|
23 |
package org.gvsig.raster.wmts.swing.impl.wizard; |
24 |
|
25 |
import java.awt.BorderLayout; |
26 |
|
27 |
import javax.swing.JScrollPane; |
28 |
|
29 |
import org.gvsig.gui.beans.DefaultBean; |
30 |
|
31 |
/**
|
32 |
* This is the Styles tab of the WMTS wizard.
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
34 |
*/
|
35 |
public class StylesPanel extends DefaultBean{ |
36 |
private static final long serialVersionUID = 1L; |
37 |
private JScrollPane jScrollPane = null; |
38 |
private StyleTree treeStyles = null; |
39 |
|
40 |
public StylesPanel() {
|
41 |
super();
|
42 |
setLayout(new BorderLayout()); |
43 |
add(getJScrollPane(), BorderLayout.CENTER);
|
44 |
} |
45 |
|
46 |
/**
|
47 |
* This method initializes jScrollPane3
|
48 |
*
|
49 |
* @return javax.swing.JScrollPane
|
50 |
*/
|
51 |
private JScrollPane getJScrollPane() { |
52 |
if (jScrollPane == null) { |
53 |
jScrollPane = new JScrollPane(); |
54 |
jScrollPane.setViewportView(getStyleTree()); |
55 |
} |
56 |
return jScrollPane;
|
57 |
} |
58 |
|
59 |
/**
|
60 |
* This method initializes treeStyles
|
61 |
*
|
62 |
* @return javax.swing.JTree
|
63 |
*/
|
64 |
public StyleTree getStyleTree() {
|
65 |
if (treeStyles == null) { |
66 |
treeStyles = new StyleTree();
|
67 |
treeStyles.addMouseListener(new java.awt.event.MouseAdapter() {
|
68 |
public void mouseClicked(java.awt.event.MouseEvent e) { |
69 |
//StyleTreeModel model = (StyleTreeModel) treeStyles.getModel();
|
70 |
//callValueChanged(model.getStylesSelection(/*parent.selectedLayersToArray()*/));
|
71 |
callValueChanged(null);
|
72 |
} |
73 |
}); |
74 |
} |
75 |
return treeStyles;
|
76 |
} |
77 |
} |