Statistics
| Revision:

root / trunk / libraries / libDataSource / src / org / gvsig / data / commands / ICommandsRecord.java @ 19399

History | View | Annotate | Download (1.45 KB)

1
package org.gvsig.data.commands;
2

    
3
import java.util.List;
4

    
5
import org.gvsig.data.IObservable;
6

    
7

    
8

    
9
/**
10
 * Record to stack the commands.
11
 *
12
 * @author Vicente Caballero Navarro
13
 */
14
public interface ICommandsRecord extends IObservable{
15
        /**
16
         *  Removes all of the elements from this Record.
17
         *
18
         */
19
        public void clear();
20
        /**
21
         *  Appends the specified command to the undos stack and delete all redos commands.
22
         */
23
        public void add( ICommand command);
24
        /**
25
         * Deshace, ejecutando el ?ltimo comando de la pila de undos y
26
         * cambiandolo de esta pila a la de redos.
27
         */
28
        public void undo();
29
        /**
30
         * Rehacer, ejecuta el ?ltimo comando apilado en redos y
31
         * lo cambia a la pila de undos.
32
         */
33
        public void redo();
34
        public ICommand getNextUndoCommand();
35
        public ICommand getNextRedoCommand();
36
        /**
37
         * Returns the number of elements in this Record.
38
         */
39
        public int size();
40
        /**
41
         * Returns the position of pointer in this Record.
42
         */
43
        public int getPointer();
44
        /**
45
         * Insert and update the position of pointer in this Record.
46
         */
47
        public void setPointer(int pos);
48
        public List getUndoCommands();
49
        public List getRedoCommands();
50
        public boolean moreUndoCommands();
51
        public boolean moreRedoCommands();
52
        public List getCommandsDeleted();
53
        public List getCommandsUpdated();
54
        public List getCommandsInserted();
55
        public void insert(Object obj);
56
        public void delete(Object obj);
57
        public void update(Object obj, Object oldObj);
58
}