gvsig-raster / org.gvsig.raster.georeferencing / trunk / org.gvsig.raster.georeferencing / org.gvsig.raster.georeferencing.framework / org.gvsig.raster.georeferencing.framework.andami / src / test / java / org / gvsig / raster / georeferencing / framework / andami / TestWithReferencePanel.java @ 1693
History | View | Annotate | Download (3.05 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*/
|
19 |
package org.gvsig.raster.georeferencing.framework.andami; |
20 |
|
21 |
import java.awt.Color; |
22 |
import java.awt.event.ActionEvent; |
23 |
|
24 |
import javax.swing.BorderFactory; |
25 |
import javax.swing.JFrame; |
26 |
import javax.swing.JPanel; |
27 |
import javax.swing.event.TableModelEvent; |
28 |
|
29 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent; |
30 |
|
31 |
public class TestWithReferencePanel { |
32 |
private int w = 1024; |
33 |
private int h = 768; |
34 |
private JFrame frame = new JFrame(); |
35 |
private GeoreferencingAndamiFrameworkManagerImpl
|
36 |
desc = null;
|
37 |
|
38 |
public TestWithReferencePanel() {
|
39 |
desc = new GeoreferencingAndamiFrameworkManagerImpl();
|
40 |
|
41 |
LayoutEnvironmentImpl layoutEnv = new LayoutEnvironmentImpl();
|
42 |
JPanel t = new JPanel(); |
43 |
t.setBorder(BorderFactory.createLineBorder(Color.black)); |
44 |
t.setBackground(Color.green);
|
45 |
layoutEnv.setTable(t); |
46 |
|
47 |
JPanel v = new JPanel(); |
48 |
v.setBorder(BorderFactory.createLineBorder(Color.black)); |
49 |
v.setBackground(Color.red);
|
50 |
layoutEnv.setViewRasterToGeoref(v); |
51 |
|
52 |
JPanel v1 = new JPanel(); |
53 |
v1.setBorder(BorderFactory.createLineBorder(Color.black)); |
54 |
v1.setBackground(Color.yellow);
|
55 |
layoutEnv.setViewBaseCartography(v1); |
56 |
|
57 |
JPanel z = new JPanel(); |
58 |
z.setBorder(BorderFactory.createLineBorder(Color.black)); |
59 |
z.setBackground(Color.blue);
|
60 |
layoutEnv.setViewZoomRasterToGeoref(z); |
61 |
|
62 |
JPanel z1 = new JPanel(); |
63 |
z1.setBorder(BorderFactory.createLineBorder(Color.black)); |
64 |
z1.setBackground(Color.blue);
|
65 |
layoutEnv.setViewZoomBaseCartography(z1); |
66 |
|
67 |
JPanel cb = new JPanel(); |
68 |
cb.setBorder(BorderFactory.createLineBorder(Color.black)); |
69 |
cb.setBackground(Color.magenta);
|
70 |
layoutEnv.setControlBar(cb); |
71 |
|
72 |
frame.getContentPane().add(desc.createLayoutWithReferenceMap(layoutEnv)); |
73 |
frame.setSize(w, h); |
74 |
frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
75 |
frame.setVisible(true);
|
76 |
} |
77 |
|
78 |
public static void main(String[] args) { |
79 |
new TestWithReferencePanel();
|
80 |
} |
81 |
|
82 |
public void actionPerformed(ActionEvent e) { |
83 |
// TODO Auto-generated method stub
|
84 |
|
85 |
} |
86 |
|
87 |
public void tableChanged(TableModelEvent e) { |
88 |
// TODO Auto-generated method stub
|
89 |
|
90 |
} |
91 |
|
92 |
public void actionButtonPressed(ButtonsPanelEvent e) { |
93 |
// TODO Auto-generated method stub
|
94 |
|
95 |
} |
96 |
} |
97 |
|