Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / commands / CommandRecord.java @ 4120

History | View | Annotate | Download (2.88 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.fmap.edition.commands;
42

    
43
import java.io.IOException;
44

    
45
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
46

    
47

    
48
/**
49
 * Registro para apilar los comandos que se van ejecutando.
50
 *
51
 * @author Vicente Caballero Navarro
52
 */
53
public interface CommandRecord {
54
        /**
55
         * A?ade un nuevo comando a la pila de deshacer(undos) y borra la de rehacer(redos).
56
         *
57
         * @param command Comando a a?adir.
58
         * @throws DriverIOException
59
         * @throws IOException
60
         */
61
        void pushCommand(Command command);
62

    
63
        /**
64
         * Deshace, ejecutando el ?ltimo comando de la pila de undos y
65
         * cambiandolo de esta pila a la de redos.
66
         * @throws IOException
67
         * @throws DriverIOException
68
         *
69
         * @throws DriverIOException
70
         * @throws IOException
71
         */
72
        void undoCommand() throws DriverIOException, IOException;
73

    
74
        /**
75
         * Rehacer, ejecuta el ?ltimo comando apilado en redos y
76
         * lo cambia a la pila de undos.
77
         * @throws IOException
78
         * @throws DriverIOException
79
         * @throws IOException
80
         * @throws DriverIOException
81
         */
82
        void redoCommand() throws DriverIOException, IOException;
83

    
84
        /**
85
         * Devuelve true si quedan m?s comandos aplilados para deshacer.
86
         *
87
         * @return True si quedan comandos de deshacer.
88
         */
89
        boolean moreUndoCommands();
90

    
91
        /**
92
         * Devuelve true si quedan comandos para rehacer.
93
         *
94
         * @return True si quedan comandos para rehacer.
95
         */
96
        boolean moreRedoCommands();
97
        public Command[] getUndoCommands();
98
        public Command[] getRedoCommands();
99
        public int getPos();
100
        public void setPos(int pos) throws DriverIOException, IOException;
101
        public void addExecuteCommand(CommandListener ecl);
102
        public void removeExecuteCommand(CommandListener e);
103
        public void fireExecuteCommands(CommandEvent e);
104
        public int getCommandCount();
105

    
106
}