KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > editor > JumpList


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.editor;
21
22 import java.beans.PropertyChangeListener JavaDoc;
23 import javax.swing.text.JTextComponent JavaDoc;
24 import org.netbeans.modules.editor.lib2.DocumentsJumpList;
25 import org.openide.util.WeakListeners;
26
27 /**
28 * The last several jumps in either the current file
29 * or across several files is stored here in the list.
30 * It's possible to track this list.
31 *
32 * @author Miloslav Metelka
33 * @version 1.00
34 * @deprecated Without any replacement.
35 */

36 public class JumpList {
37
38     static void addPropertyChangeListener(PropertyChangeListener JavaDoc listener) {
39         PropertyChangeListener JavaDoc pcl = WeakListeners.propertyChange(listener, null);
40         DocumentsJumpList.addPropertyChangeListener(pcl);
41     }
42     
43     static void dotMoved(JTextComponent JavaDoc c, int offset) {
44         DocumentsJumpList.dotMoved(c, offset);
45     }
46     
47     public static void checkAddEntry() {
48         DocumentsJumpList.checkAddEntry();
49     }
50
51     public static void checkAddEntry(JTextComponent JavaDoc c) {
52         DocumentsJumpList.checkAddEntry(c);
53     }
54
55     public static void checkAddEntry(JTextComponent JavaDoc c, int pos) {
56         DocumentsJumpList.checkAddEntry(c, pos);
57     }
58
59     public static void addEntry(JTextComponent JavaDoc c, int pos) {
60         DocumentsJumpList.addEntry(c, pos);
61     }
62
63     /**
64     * @param c current component. It's used to compare the current
65     * component and position with those stored in the entries.
66     */

67     public static void jumpPrev(JTextComponent JavaDoc c) {
68         DocumentsJumpList.jumpPrev(c);
69     }
70
71     public static boolean hasPrev() {
72         return DocumentsJumpList.hasPrev();
73     }
74
75     /**
76     * @param c current component. It's used to compare the current
77     * component and position with those stored in the entries.
78     */

79     public static void jumpNext(JTextComponent JavaDoc c) {
80         DocumentsJumpList.jumpNext(c);
81     }
82
83     public static boolean hasNext() {
84         return DocumentsJumpList.hasNext();
85     }
86
87     /**
88     * @param c current component. It's used to compare the current
89     * component to those stored in the jump list entries.
90     */

91     public static void jumpPrevComponent(JTextComponent JavaDoc c) {
92         DocumentsJumpList.jumpPrevComponent(c);
93     }
94
95     /**
96     * @param c current component. It's used to compare the current
97     * component to those stored in the jump list entries.
98     */

99     public static void jumpNextComponent(JTextComponent JavaDoc c) {
100         DocumentsJumpList.jumpNextComponent(c);
101     }
102
103     public static String JavaDoc dump() {
104         return DocumentsJumpList.dump();
105     }
106 }
107
Popular Tags