gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.swing / org.gvsig.raster.swing.impl / src / test / java / TestCreateNewLayerPanel.java @ 1836
History | View | Annotate | Download (1.35 KB)
1 |
import java.awt.event.ActionEvent; |
---|---|
2 |
import java.awt.event.ActionListener; |
3 |
import java.util.ArrayList; |
4 |
import java.util.List; |
5 |
|
6 |
import javax.swing.JFrame; |
7 |
|
8 |
import org.gvsig.raster.swing.impl.newlayer.CreateNewLayerPanelImpl; |
9 |
import org.gvsig.raster.swing.newlayer.FileNameManagement; |
10 |
|
11 |
public class TestCreateNewLayerPanel implements ActionListener { |
12 |
private int w = 550; |
13 |
private int h = 300; |
14 |
private JFrame frame = new JFrame(); |
15 |
private CreateNewLayerPanelImpl desc = null; |
16 |
|
17 |
public class FileNameManagementImpl implements FileNameManagement { |
18 |
|
19 |
public String getDefaultFilePath() { |
20 |
return System.getProperty("user.home"); |
21 |
} |
22 |
|
23 |
public List<String> getPrefixSupported() { |
24 |
List<String> list = new ArrayList<String>(); |
25 |
list.add("tif");
|
26 |
return list;
|
27 |
} |
28 |
|
29 |
public String getUniqueLayerName() { |
30 |
return "Prueba"; |
31 |
} |
32 |
|
33 |
public void usesUniqueLayerName() { |
34 |
} |
35 |
|
36 |
} |
37 |
|
38 |
public TestCreateNewLayerPanel() {
|
39 |
desc = new CreateNewLayerPanelImpl(new FileNameManagementImpl()); |
40 |
frame.getContentPane().add(desc); |
41 |
frame.setSize(w, h); |
42 |
frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
43 |
frame.setVisible(true);
|
44 |
} |
45 |
|
46 |
public static void main(String[] args) { |
47 |
new TestCreateNewLayerPanel();
|
48 |
} |
49 |
|
50 |
public void actionPerformed(ActionEvent e) { |
51 |
|
52 |
} |
53 |
} |