root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.swing / org.gvsig.proj.swing.api / src / main / java / org / gvsig / proj / swing / CoordinateTransformationSelectorComponent.java @ 866
History | View | Annotate | Download (4.73 KB)
1 |
/* gvSIG. Desktop Geographic Information System.
|
---|---|
2 |
*
|
3 |
* Copyright ? 2018 gvSIG Association
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
18 |
* MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.proj.swing; |
24 |
|
25 |
import org.gvsig.proj.CoordinateTransformation; |
26 |
|
27 |
import java.awt.event.ActionListener; |
28 |
|
29 |
import org.gvsig.proj.CoordinateReferenceSystem; |
30 |
import org.gvsig.tools.swing.api.Component; |
31 |
|
32 |
/**
|
33 |
* User interface component API to select a {@link CoordinateTransformation} and
|
34 |
* optionally the source and target CoordinateReferenceSystems for the
|
35 |
* transformation (or converesion) of coordinates.
|
36 |
*
|
37 |
* @author gvSIG Team
|
38 |
*/
|
39 |
public interface CoordinateTransformationSelectorComponent extends Component { |
40 |
|
41 |
/**
|
42 |
* Returns the source {@link CoordinateReferenceSystem}.
|
43 |
*
|
44 |
* @return the source {@link CoordinateReferenceSystem}
|
45 |
*/
|
46 |
CoordinateReferenceSystem getSourceCoordinateReferenceSystem(); |
47 |
|
48 |
/**
|
49 |
* Returns the target {@link CoordinateReferenceSystem}.
|
50 |
*
|
51 |
* @return the target {@link CoordinateReferenceSystem}
|
52 |
*/
|
53 |
CoordinateReferenceSystem getTargetCoordinateReferenceSystem(); |
54 |
|
55 |
/**
|
56 |
* Returns the selected {@link CoordinateTransformation}.
|
57 |
*
|
58 |
* @return the selected {@link CoordinateTransformation}
|
59 |
*/
|
60 |
CoordinateTransformation getCoordinateTransformation(); |
61 |
|
62 |
/**
|
63 |
* Sets the current {@link CoordinateTransformation}.
|
64 |
*
|
65 |
* @param transformation
|
66 |
* the current {@link CoordinateTransformation}
|
67 |
*/
|
68 |
void setCoordinateTransformation(CoordinateTransformation transformation);
|
69 |
|
70 |
/**
|
71 |
* Sets the source {@link CoordinateReferenceSystem}.
|
72 |
*
|
73 |
* @param crs
|
74 |
* the source {@link CoordinateReferenceSystem}
|
75 |
*/
|
76 |
void setSourceCoordinateReferenceSystem(CoordinateReferenceSystem source);
|
77 |
|
78 |
/**
|
79 |
* Sets the source {@link CoordinateReferenceSystem} and defines whether
|
80 |
* the source CRS selector should be editable by the user. The selector
|
81 |
* will be enabled by default.
|
82 |
*
|
83 |
* @param crs
|
84 |
* the source {@link CoordinateReferenceSystem}
|
85 |
* @param editable
|
86 |
* whether the source coordinate reference system control
|
87 |
* should be editable by the user
|
88 |
*/
|
89 |
void setSourceCoordinateReferenceSystem(CoordinateReferenceSystem source, boolean editable); |
90 |
|
91 |
/**
|
92 |
* Sets the target {@link CoordinateReferenceSystem}.
|
93 |
*
|
94 |
* @param crs
|
95 |
* the target {@link CoordinateReferenceSystem}
|
96 |
*/
|
97 |
void setTargetCoordinateReferenceSystem(CoordinateReferenceSystem target);
|
98 |
|
99 |
/**
|
100 |
* Sets the target {@link CoordinateReferenceSystem} and defines whether
|
101 |
* the target CRS selector should be editable by the user. The selector
|
102 |
* will be enabled by default.
|
103 |
*
|
104 |
* @param target
|
105 |
* the target {@link CoordinateReferenceSystem}
|
106 |
* @param editable
|
107 |
* whether the target coordinate reference system control
|
108 |
* should be editable by the user
|
109 |
*/
|
110 |
void setTargetCoordinateReferenceSystem(CoordinateReferenceSystem target, boolean editable); |
111 |
|
112 |
/**
|
113 |
* Determines whether the source coordinate reference system control
|
114 |
* is editable by the user
|
115 |
*
|
116 |
* @see #setSourceCoordinateReferenceSystem(CoordinateReferenceSystem, boolean)
|
117 |
*/
|
118 |
boolean isSourceCoordinateReferenceSystemEditable();
|
119 |
|
120 |
/**
|
121 |
* Determines whether the target coordinate reference system control
|
122 |
* should be editable by the user
|
123 |
*
|
124 |
* @see #setTargetCoordinateReferenceSystem(CoordinateReferenceSystem, boolean)
|
125 |
*/
|
126 |
boolean isTargetCoordinateReferenceSystemEditable();
|
127 |
|
128 |
|
129 |
/**
|
130 |
* Adds a listener to be notified when a CoordinateTransformation is selected
|
131 |
*
|
132 |
* @param listener
|
133 |
*/
|
134 |
void addCoordinateTransformationSelectionListener(ActionListener listener); |
135 |
|
136 |
|
137 |
/**
|
138 |
* Enables an alphanumeric filter to refine the list of CoordinateTransformations
|
139 |
* to those matching the provided search string.
|
140 |
*
|
141 |
* @param searchString
|
142 |
*/
|
143 |
void enableAlphanumericFilter(String searchString); |
144 |
} |