Statistics
| Revision:

gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.swing / org.gvsig.vectorediting.swing.api / src / main / java / org / gvsig / vectorediting / swing / api / EditingContext.java @ 89

History | View | Annotate | Download (1.55 KB)

1
/*
2
 * Copyright 2014 DiSiD Technologies S.L.L. All rights reserved.
3
 * 
4
 * Project  : DiSiD org.gvsig.vectorediting.swing.api 
5
 * SVN Id   : $Id$
6
 */
7
package org.gvsig.vectorediting.swing.api;
8

    
9
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
10
import org.gvsig.fmap.mapcontrol.MapControl;
11
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior;
12

    
13
public interface EditingContext {
14
  
15
  static final int CANCEL = 0;
16
  static final int DISCARD_CHANGES = 1;
17
  static final int EXPORT_LAYER = 2;
18
  static final int SAVE_CHANGES = 3;
19

    
20
  /**
21
   * Activates service as of name and {@link MapControl}
22
   * 
23
   * @param name of service
24
   * @param mapControl of
25
   */
26
  public void activateService(String name);
27

    
28
  /**
29
   * Begins edition of a layer with the {@link MapControl} received as parameter.
30
   * 
31
   * @param layer to begin edition
32
   * @param mapControl necessary to add listeners, console... See
33
   *          {@link EditingBehavior}.
34
   */
35
  public void beginEdition(FLyrVect layer, Behavior[] additionalBehaviors);
36
  
37
  /**
38
   * 
39
   * @param enableSelection
40
   */
41
  public void enableSelection(boolean enableSelection);
42

    
43
  /**
44
   * Ends edition of a layer with the {@link MapControl} received as parameter.
45
   * 
46
   * @param layer to end edition
47
   * @param mapControl necessary to delete observers, stop drawing, obtain
48
   *          {@link EditingBehavior}...
49
   */
50
  public void endEdition(FLyrVect layer);
51
  
52
  /**
53
   * 
54
   * @return
55
   */
56
  public MapControl getMapControl();
57

    
58
  /**
59
   * 
60
   * @param text
61
   */
62
  public void showConsoleMessage(String text);
63
 }