Revision 3014 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Panels/DataPointsTabPanel.java
DataPointsTabPanel.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.gui.Panels; |
2 | 2 |
|
3 |
import java.awt.Dimension; |
|
4 |
|
|
5 |
import javax.swing.JPanel; |
|
3 | 6 |
import javax.swing.JTabbedPane; |
4 | 7 |
|
5 |
import com.iver.andami.PluginServices;
|
|
8 |
import com.iver.cit.gvsig.gui.Dialogs.GeoreferencingDialog;
|
|
6 | 9 |
|
7 |
public class DataPointsTabPanel extends JTabbedPane{
|
|
10 |
public class DataPointsTabPanel extends JPanel{
|
|
8 | 11 |
|
12 |
private GeoreferencingDialog parent = null; |
|
9 | 13 |
private SelectPointsPanel selectPointsPanel = null; |
10 | 14 |
private TablePointsPanel tablePointsPanel = null; |
15 |
private JTabbedPane tbPoints = null; |
|
11 | 16 |
|
12 | 17 |
/** |
13 | 18 |
* This is the default constructor |
14 | 19 |
*/ |
15 |
public DataPointsTabPanel(SelectPointsPanel selectPointsPanel, TablePointsPanel tablePointsPanel) {
|
|
20 |
public DataPointsTabPanel(GeoreferencingDialog p) {
|
|
16 | 21 |
super(); |
17 |
this.selectPointsPanel = selectPointsPanel; |
|
18 |
this.tablePointsPanel = tablePointsPanel; |
|
22 |
this.parent = p; |
|
19 | 23 |
initialize(); |
20 | 24 |
} |
21 | 25 |
|
... | ... | |
25 | 29 |
* @return void |
26 | 30 |
*/ |
27 | 31 |
private void initialize() { |
28 |
this.setPreferredSize(new java.awt.Dimension(400,240));
|
|
29 |
this.setSize(new java.awt.Dimension(400,240));
|
|
32 |
this.setPreferredSize(new java.awt.Dimension(400,270));
|
|
33 |
this.setSize(new java.awt.Dimension(400,270));
|
|
30 | 34 |
this.setLocation(new java.awt.Point(0,0)); |
31 |
this.addTab(PluginServices.getText(this, "georef"), this.selectPointsPanel); |
|
32 |
this.addTab(PluginServices.getText(this, "table"), this.tablePointsPanel); |
|
33 |
|
|
35 |
this.add(getTbPoints(), null); |
|
34 | 36 |
} |
35 | 37 |
|
36 | 38 |
/** |
37 | 39 |
* @return Returns the selectPointsPanel. |
38 | 40 |
*/ |
39 |
public SelectPointsPanel getSelectPointsPanel() { |
|
40 |
return selectPointsPanel; |
|
41 |
public TablePointsPanel getTablePointsPanel() { |
|
42 |
if(tablePointsPanel == null){ |
|
43 |
tablePointsPanel = new TablePointsPanel(parent); |
|
44 |
} |
|
45 |
return tablePointsPanel; |
|
41 | 46 |
} |
42 | 47 |
|
43 | 48 |
/** |
44 |
* @param selectPointsPanel The selectPointsPanel to set.
|
|
49 |
* @return Returns the selectPointsPanel.
|
|
45 | 50 |
*/ |
46 |
public void setSelectPointsPanel(SelectPointsPanel selectPointsPanel) { |
|
47 |
this.selectPointsPanel = selectPointsPanel; |
|
51 |
public SelectPointsPanel getSelectPointsPanel() { |
|
52 |
if(selectPointsPanel == null){ |
|
53 |
selectPointsPanel = new SelectPointsPanel(parent); |
|
54 |
} |
|
55 |
return selectPointsPanel; |
|
48 | 56 |
} |
49 |
|
|
57 |
|
|
50 | 58 |
/** |
51 |
* @return Returns the tablePointsPanel. |
|
59 |
* This method initializes jTabbedPane |
|
60 |
* |
|
61 |
* @return javax.swing.JTabbedPane |
|
52 | 62 |
*/ |
53 |
public TablePointsPanel getTablePointsPanel() { |
|
54 |
return tablePointsPanel; |
|
63 |
private JTabbedPane getTbPoints() { |
|
64 |
if (tbPoints == null) { |
|
65 |
tbPoints = new JTabbedPane(); |
|
66 |
tbPoints.setSize(400, 260); |
|
67 |
tbPoints.setPreferredSize(new java.awt.Dimension(400,260)); |
|
68 |
tbPoints.addTab("georef", this.getSelectPointsPanel()); |
|
69 |
tbPoints.addTab("table", this.getTablePointsPanel()); |
|
70 |
} |
|
71 |
return tbPoints; |
|
55 | 72 |
} |
73 |
|
|
56 | 74 |
|
57 |
/** |
|
58 |
* @param tablePointsPanel The tablePointsPanel to set. |
|
59 |
*/ |
|
60 |
public void setTablePointsPanel(TablePointsPanel tablePointsPanel) { |
|
61 |
this.tablePointsPanel = tablePointsPanel; |
|
62 |
} |
|
63 | 75 |
} |
Also available in: Unified diff