svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.projection / org.gvsig.projection.cresques / org.gvsig.projection.cresques.ui / src / main / java / org / gvsig / app / gui / panels / CRSSelectPanel.java @ 40559
History | View | Annotate | Download (2.8 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.app.gui.panels; |
25 |
|
26 |
import java.awt.event.ActionListener; |
27 |
|
28 |
import javax.swing.JButton; |
29 |
import javax.swing.JLabel; |
30 |
import javax.swing.JPanel; |
31 |
|
32 |
import org.cresques.cts.IProjection; |
33 |
import org.gvsig.app.gui.panels.crs.ICrsUIFactory; |
34 |
import org.gvsig.app.gui.panels.crs.ISelectCRSButton; |
35 |
|
36 |
|
37 |
public abstract class CRSSelectPanel extends JPanel implements ISelectCRSButton { |
38 |
private boolean transPanelActive = false; |
39 |
|
40 |
protected ActionListener actionListener = null; |
41 |
|
42 |
/**
|
43 |
*
|
44 |
* @param panelClass
|
45 |
* @deprecated use CRSSelectPanelFactory.registerPanelClass
|
46 |
*/
|
47 |
public static void registerPanelClass(Class panelClass) { |
48 |
CRSSelectPanelFactory.registerPanelClass(panelClass); |
49 |
} |
50 |
|
51 |
/**
|
52 |
*
|
53 |
* @param uiFactory
|
54 |
* @deprecated use CRSSelectPanelFactory.registerUIFactory
|
55 |
*/
|
56 |
public static void registerUIFactory(Class uiFactory) { |
57 |
CRSSelectPanelFactory.registerUIFactory(uiFactory); |
58 |
} |
59 |
|
60 |
/**
|
61 |
*
|
62 |
* @param proj
|
63 |
* @return CRSSelectPanel
|
64 |
* @deprecated use CRSSelectPanelFactory.getPanel
|
65 |
*/
|
66 |
public static CRSSelectPanel getPanel(IProjection proj) { |
67 |
return CRSSelectPanelFactory.getPanel(proj);
|
68 |
} |
69 |
|
70 |
/**
|
71 |
*
|
72 |
* @return ICrsUIFactory
|
73 |
* @deprecated use CRSSelectPanelFactory.getUIFactory
|
74 |
*/
|
75 |
public static ICrsUIFactory getUIFactory() { |
76 |
return CRSSelectPanelFactory.getUIFactory();
|
77 |
} |
78 |
|
79 |
|
80 |
public CRSSelectPanel(IProjection proj) {
|
81 |
super();
|
82 |
} |
83 |
|
84 |
abstract public JButton getJBtnChangeProj(); |
85 |
|
86 |
abstract public JLabel getJLabel(); |
87 |
|
88 |
abstract public IProjection getCurProj(); |
89 |
|
90 |
abstract public boolean isOkPressed(); |
91 |
/**
|
92 |
* @param actionListener The actionListener to set.
|
93 |
*/
|
94 |
public void addActionListener(ActionListener actionListener) { |
95 |
this.actionListener = actionListener;
|
96 |
} |
97 |
|
98 |
public boolean isTransPanelActive() { |
99 |
return transPanelActive;
|
100 |
} |
101 |
|
102 |
public void setTransPanelActive(boolean transPanelActive) { |
103 |
this.transPanelActive = transPanelActive;
|
104 |
} |
105 |
|
106 |
} |