Revision 26
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.featureform.swing/org.gvsig.featureform.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/DefaultJFeatureForm.java | ||
---|---|---|
170 | 170 |
Feature feature = (Feature) iterator.next(); |
171 | 171 |
selection.select(feature); |
172 | 172 |
} |
173 |
if (features.size()>0) { |
|
174 |
this.showForm(MODE.TOOL); |
|
175 |
} |
|
173 | 176 |
|
174 | 177 |
this.formset.setValues(ph.asListOfDynObjects()); |
175 | 178 |
this.formset.setReadOnly(false); |
... | ... | |
183 | 186 |
public void showForm(MODE mode) throws ServiceException, DataException { |
184 | 187 |
if (this.formset == null) { |
185 | 188 |
this.formset = getFormset(); |
186 |
this.panel.add(this.formset.asJComponent()); |
|
189 |
this.panel.add(this.formset.asJComponent(),BorderLayout.CENTER);
|
|
187 | 190 |
WindowManager winmgr = ToolsSwingLocator.getWindowManager(); |
188 | 191 |
winmgr.showWindow(panel, store.getName(), mode); |
189 | 192 |
} |
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/pom.xml | ||
---|---|---|
3 | 3 |
<parent> |
4 | 4 |
<groupId>org.gvsig</groupId> |
5 | 5 |
<artifactId>org.gvsig.desktop</artifactId> |
6 |
<version>2.0.71-SNAPSHOT</version>
|
|
6 |
<version>2.0.72-SNAPSHOT</version>
|
|
7 | 7 |
</parent> |
8 | 8 |
<groupId>org.gvsig</groupId> |
9 | 9 |
<artifactId>org.gvsig.attributeeditor</artifactId> |
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.attributeeditor.mapcontrol/src/main/java/org/gvsig/fmap/mapcontrol/tools/Listeners/MoveWithControlBehavior.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 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.fmap.mapcontrol.tools.Listeners; |
|
24 |
|
|
25 |
import java.awt.Image; |
|
26 |
import java.awt.event.InputEvent; |
|
27 |
import java.awt.event.MouseEvent; |
|
28 |
|
|
29 |
import org.gvsig.fmap.mapcontrol.tools.BehaviorException; |
|
30 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveBehavior; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author fdiaz |
|
34 |
* |
|
35 |
*/ |
|
36 |
public class MoveWithControlBehavior extends MoveBehavior { |
|
37 |
|
|
38 |
/** |
|
39 |
* @param pli |
|
40 |
*/ |
|
41 |
public MoveWithControlBehavior(PanListener pli) { |
|
42 |
super(pli); |
|
43 |
// listener = pli; |
|
44 |
} |
|
45 |
|
|
46 |
public void mousePressed(MouseEvent e) { |
|
47 |
if ((e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK) { |
|
48 |
super.mousePressed(e); |
|
49 |
} |
|
50 |
} |
|
51 |
|
|
52 |
public void mouseReleased(MouseEvent e) throws BehaviorException { |
|
53 |
if ((e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK) { |
|
54 |
super.mouseReleased(e); |
|
55 |
} |
|
56 |
} |
|
57 |
|
|
58 |
public void mouseDragged(MouseEvent e) { |
|
59 |
if ((e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK) { |
|
60 |
super.mouseDragged(e); |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
} |
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.attributeeditor.mapcontrol/src/main/java/org/gvsig/fmap/mapcontrol/tools/Listeners/AttributeEditorBehavior.java | ||
---|---|---|
28 | 28 |
import org.gvsig.fmap.mapcontrol.tools.CompoundBehavior; |
29 | 29 |
import org.gvsig.fmap.mapcontrol.tools.PanListenerImpl; |
30 | 30 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
31 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveBehavior; |
|
31 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveWithMiddleButtonBehavior;
|
|
32 | 32 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior; |
33 | 33 |
|
34 | 34 |
|
... | ... | |
49 | 49 |
this.attributeEditorPointListener = |
50 | 50 |
new AttributeEditorPointListener(mapControl); |
51 | 51 |
|
52 |
this.addMapBehavior(new MoveWithControlBehavior(pl), true);
|
|
52 |
this.addMapBehavior(new MoveWithMiddleButtonBehavior(pl), true);
|
|
53 | 53 |
this.addMapBehavior(new PointBehavior(attributeEditorPointListener), false); |
54 | 54 |
|
55 | 55 |
} |
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.attributeeditor.mapcontrol/src/main/java/org/gvsig/fmap/mapcontrol/tools/Listeners/AttributeEditorPointListener.java | ||
---|---|---|
30 | 30 |
import java.awt.event.MouseEvent; |
31 | 31 |
|
32 | 32 |
import javax.swing.JOptionPane; |
33 |
import javax.swing.SwingUtilities; |
|
33 | 34 |
|
34 | 35 |
import org.cresques.cts.IProjection; |
35 | 36 |
import org.slf4j.Logger; |
... | ... | |
106 | 107 |
|
107 | 108 |
public void point(PointEvent e) throws BehaviorException { |
108 | 109 |
MouseEvent mouseEvent = e.getEvent(); |
109 |
if ((mouseEvent.getModifiersEx() & (InputEvent.CTRL_DOWN_MASK |
|
110 |
if (((mouseEvent.getModifiersEx() & (InputEvent.CTRL_DOWN_MASK
|
|
110 | 111 |
| InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK |
111 |
| InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.META_DOWN_MASK)) != 0) { |
|
112 |
| InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.META_DOWN_MASK)) != 0) || !SwingUtilities.isLeftMouseButton(mouseEvent)) {
|
|
112 | 113 |
return; |
113 | 114 |
} |
114 | 115 |
|
org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.attributeeditor.app/org.gvsig.attributeeditor.app.mainplugin/src/main/java/org/gvsig/app/mainplugin/extension/AttributeEditorExtension.java | ||
---|---|---|
98 | 98 |
|
99 | 99 |
if (vw != null) { |
100 | 100 |
|
101 |
// IView vw = (IView) actw; |
|
102 | 101 |
FLayer[] act_lyr = vw.getMapContext().getLayers().getActives(); |
103 | 102 |
if (act_lyr == null || act_lyr.length != 1 |
104 | 103 |
|| !(act_lyr[0] instanceof FLyrVect)) { |
... | ... | |
113 | 112 |
*/ |
114 | 113 |
return false; |
115 | 114 |
} |
116 |
// MapControl mapControl = vw.getMapControl(); |
|
117 |
// if(mapControl.getCurrentTool().equalsIgnoreCase(AttributeEditorPointListener.ATTRIBUTE_EDITOR_TOOL_NAME)){ |
|
118 |
// return false; |
|
119 |
// } |
|
120 | 115 |
return true; |
121 | 116 |
} |
122 | 117 |
|
Also available in: Unified diff