Statistics
| Revision:

svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / gui / layout / commands / EditableFeatureSource.java @ 3549

History | View | Annotate | Download (3.26 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package com.iver.cit.gvsig.gui.layout.commands;
42

    
43
import com.iver.cit.gvsig.gui.layout.fframes.IFFrame;
44

    
45
import java.awt.Image;
46
import java.awt.geom.Rectangle2D;
47

    
48
import java.io.IOException;
49

    
50

    
51
public interface EditableFeatureSource {
52
  
53
    IFFrame getFFrame(int index);
54
    IFFrame[] getFFrames();
55

    
56
    int getFFrameCount();
57

    
58
    void addFFrame(IFFrame f);
59

    
60
    void undo();
61

    
62
          void redo();
63

    
64
    boolean moreUndoCommands();
65

    
66
    boolean moreRedoCommands();
67

    
68
    void removeFFrame(int index);
69

    
70
    void modifyFFrame(IFFrame fant, IFFrame fnew);
71

    
72
    int[] getFFrameIndexes(Rectangle2D r);
73

    
74
    /**
75
     * Compacta el almacenamiento de las FFrames que est?n en edici?n. Tras
76
     * esta operaci?n, el orden de las FFrames seguramente cambiar? y toda
77
     * llamada a getFFrame devolver? un FFrame distinto de null, ya que
78
     * las eliminadas son borradas definitivamente. Hay que tener especial
79
     * cuidado al invocar este m?todo ya que cualquier tipo de asociaci?n
80
     * entre FFrames y otro tipo de objetos (comandos de edici?n, snapping,
81
     * ...) que use el ?ndice de los FFrames se ver? afectado por ?ste m?todo
82
     */
83
    void compact();
84

    
85
    /**
86
     * Establece la imagen de las FFrames seleccionadas con el fin de que en
87
     * una edici?n interactiva se pueda obtener dicha imagen para simular el
88
     * copiado, rotado, etc
89
     *
90
     * @param i imagen
91
     */
92
    void setImage(Image i);
93

    
94
    /**
95
     * Obtiene una imagen con las geometr?as seleccionadas
96
     *
97
     * @return imagen
98
     */
99
    Image getImage();
100

    
101
    /**
102
     * DOCUMENT ME!
103
     */
104
    void startComplexCommand();
105

    
106
    /**
107
     * DOCUMENT ME!
108
     *
109
     * @throws IOException DOCUMENT ME!
110
     * @throws DriverIOException DOCUMENT ME!
111
     */
112
    void endComplexCommand();
113

    
114
        void undoAddFFrame(int index);
115

    
116
        int doAddFFrame(IFFrame frame);
117
        
118
        void doAddFFrame(IFFrame frame,int index);
119

    
120
        void undoModifyFFrame(IFFrame fant,IFFrame fnew,int indexAnt, int previousIndex);
121

    
122
        int doModifyFFrame(int indexAnt, IFFrame frameNext);
123

    
124
        void undoRemoveFFrame(int index);
125

    
126
        void doRemoveFFrame(int index);
127
        
128
        IFFrame[] getAllFFrames();
129
}