Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.ui / src / main / java / org / gvsig / gui / beans / editabletextcomponent / IEditableText.java @ 40561

History | View | Annotate | Download (2.82 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.gui.beans.editabletextcomponent;
25

    
26
import javax.swing.text.JTextComponent;
27

    
28
import org.gvsig.gui.beans.editabletextcomponent.event.UndoRedoEditListener;
29

    
30
/**
31
 * <p>All graphical components which inherit from {@link JTextComponent JTextComponent}
32
 *  can enhance their functionality with graphical edition options support implementing
33
 *  this interface.</p>
34
 * 
35
 * @version 03/01/2008
36
 * @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es) 
37
 */
38
public interface IEditableText {
39
        /**
40
     * Sets the limit of actions that can hold the UndoManager of this component.
41
     * 
42
     * @param limit sets the limit of actions that can hold
43
     */
44
        public void setUndoRedoLimitActions(int limit);
45

    
46
        /**
47
     * Gets the limit of actions that can hold the UndoManager.
48
     * 
49
     * @return int limit of actions that can hold
50
     */
51
        public int getUndoRedoLimitActions();
52
        
53
        /**
54
     * Adds a listener for notification of an <i>undo</i> or <i>redo</i> operation executed.
55
     *
56
     * @param listener the listener to be added
57
     * @see javax.swing.event.UndoRedoEditEvent
58
     */
59
    public void addUndoRedoEditListener(UndoRedoEditListener listener);
60

    
61
    /**
62
     * Removes a listener for notification of an <i>undo</i> or <i>redo</i> operation executed.
63
     *
64
     * @param listener the listener to be removed
65
     * @see javax.swing.event.UndoRedoEditEvent
66
     */
67
    public void removeUndoRedoEditListener(UndoRedoEditListener listener);
68

    
69
    /**
70
     * Returns an array of all the <code>UndoRedoEditListener</code>
71
     * registered on this text component.
72
     *
73
     * @return all of this component's <code>UndoRedoEditListener</code>s 
74
     *         or an empty
75
     *         array if no listeners of that kind are currently registered
76
     *
77
     * @see #addUndoRedoEditListener
78
     * @see #removeUndoRedoEditListener
79
     */
80
    public UndoRedoEditListener[] getUndoRedoEditListeners();
81
}