Revision 741 org.gvsig.attributeeditor/trunk/org.gvsig.attributeeditor/org.gvsig.attributeeditor.mapcontrol/src/main/java/org/gvsig/fmap/mapcontrol/tools/Listeners/AttributeEditorPointListener.java
AttributeEditorPointListener.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import java.awt.Dimension; |
27 | 27 |
import java.awt.event.ActionEvent; |
28 |
import java.awt.event.ComponentAdapter; |
|
28 | 29 |
import java.awt.event.ComponentEvent; |
29 | 30 |
import java.awt.event.ComponentListener; |
30 | 31 |
import java.awt.event.InputEvent; |
... | ... | |
75 | 76 |
* |
76 | 77 |
*/ |
77 | 78 |
@SuppressWarnings("UseSpecificCatch") |
78 |
public class AttributeEditorPointListener extends AbstractPointListener implements ComponentListener {
|
|
79 |
public class AttributeEditorPointListener extends AbstractPointListener { |
|
79 | 80 |
|
80 | 81 |
private static Logger logger = LoggerFactory.getLogger(AttributeEditorPointListener.class); |
81 | 82 |
|
... | ... | |
183 | 184 |
DataSwingManager swingManager = DALSwingLocator.getSwingManager(); |
184 | 185 |
FeatureStore store = this.currentLayer.getFeatureStore(); |
185 | 186 |
this.form = swingManager.createJFeaturesForm(store, query); |
186 |
this.form.asJComponent().setPreferredSize(new Dimension(300, 200)); |
|
187 |
// this.form.asJComponent().setPreferredSize(new Dimension(300, 200));
|
|
187 | 188 |
this.form.asJComponent().setName(ATTRIBUTE_EDITOR_FORM_NAME); |
188 |
this.form.asJComponent().addComponentListener(this); |
|
189 |
this.form.asJComponent().addComponentListener(new ComponentAdapter() { |
|
190 |
@Override |
|
191 |
public void componentHidden(ComponentEvent e) { |
|
192 |
form = null; |
|
193 |
} |
|
194 |
}); |
|
189 | 195 |
this.form.addActionListener((ActionEvent e) -> { |
190 |
switch(e.getActionCommand()) { |
|
196 |
switch (e.getActionCommand()) {
|
|
191 | 197 |
case "formAfterSave": |
192 | 198 |
case "formAfterDelete": |
193 | 199 |
if( this.refreshCallback!=null ) { |
... | ... | |
226 | 232 |
featureQuery.retrievesAllAttributes(); |
227 | 233 |
return featureQuery; |
228 | 234 |
} |
229 |
|
|
230 |
@Override |
|
231 |
public void componentResized(ComponentEvent e) { |
|
232 |
|
|
233 |
} |
|
234 |
|
|
235 |
@Override |
|
236 |
public void componentMoved(ComponentEvent e) { |
|
237 |
|
|
238 |
} |
|
239 |
|
|
240 |
@Override |
|
241 |
public void componentShown(ComponentEvent e) { |
|
242 |
|
|
243 |
} |
|
244 |
|
|
245 |
@Override |
|
246 |
public void componentHidden(ComponentEvent e) { |
|
247 |
this.form = null; |
|
248 |
} |
|
249 |
|
|
250 | 235 |
} |
Also available in: Unified diff