gvsig-raster / org.gvsig.raster.tools / trunk / templates / rasterTaskProjectTemplate / alg_with_preview_template / sources / app / MainPanel.java @ 1843
History | View | Annotate | Download (1 KB)
1 |
package org.gvsig.raster.projecttemplate.app; |
---|---|
2 |
|
3 |
import java.awt.GridBagConstraints; |
4 |
import java.awt.GridBagLayout; |
5 |
|
6 |
import javax.swing.BorderFactory; |
7 |
import javax.swing.JComponent; |
8 |
import javax.swing.JPanel; |
9 |
|
10 |
public class MainPanel extends JPanel { |
11 |
private static final long serialVersionUID = 1L; |
12 |
|
13 |
public MainPanel(JComponent panel, JComponent createLayer) { |
14 |
setLayout(new GridBagLayout()); |
15 |
GridBagConstraints gbc = new GridBagConstraints(); |
16 |
gbc.anchor = GridBagConstraints.WEST;
|
17 |
gbc.fill = GridBagConstraints.BOTH;
|
18 |
gbc.weightx = 1;
|
19 |
gbc.weighty = 1;
|
20 |
gbc.gridy = 0;
|
21 |
|
22 |
///////////////////////////////////////////////////
|
23 |
//TODO:Change this panel for the one created in the Swing library
|
24 |
///////////////////////////////////////////////////
|
25 |
|
26 |
JPanel algPanel = new JPanel(); |
27 |
algPanel.setBorder(BorderFactory.createTitledBorder("My algorithm")); |
28 |
add(algPanel, gbc); |
29 |
|
30 |
gbc.fill = GridBagConstraints.HORIZONTAL;
|
31 |
gbc.weightx = 1;
|
32 |
gbc.weighty = 0;
|
33 |
gbc.gridy = 1;
|
34 |
|
35 |
add(createLayer, gbc); |
36 |
} |
37 |
} |