站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

JumpList (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Class JumpList

java.lang.Object
  extended by org.netbeans.editor.JumpList

public final class JumpList
extends Object

The list of marked positions in text components.


Nested Class Summary
static class JumpList.Entry
          An entry in the list with JTextComponent and a position in its Document.
 
Method Summary
static void addEntry(JTextComponent c, int pos)
          Adds a new entry to the list.
static void checkAddEntry()
          Adds the caret position of the active JTextComponent to the list.
static void checkAddEntry(JTextComponent c)
          Adds the caret position of the provided JTextComponent to the list.
static void checkAddEntry(JTextComponent c, int pos)
          Deprecated. Use addEntry(JTextComponent, int) instead.
static String dump()
           
static boolean hasNext()
          Checks if there is the next entry in the list.
static boolean hasPrev()
          Checks if there is the previous entry in the list.
static void jumpNext(JTextComponent c)
          Navigates to the component and position from the next entry in the list.
static void jumpNextComponent(JTextComponent c)
          Navigates to the component and position from the next entry in the list.
static void jumpPrev(JTextComponent c)
          Navigates to the component and position from the previous entry in the list.
static void jumpPrevComponent(JTextComponent c)
          Navigates to the component and position from the previous entry in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkAddEntry

public static void checkAddEntry()
Adds the caret position of the active JTextComponent to the list. If the active component can't be determined this method does nothing.

The active JTextComponent is obtained from the system by tracking components that gain focus as a users uses them. In Netbeans IDE the active component is usually the component selected in the IDE's editor area.

See Also:
addEntry(JTextComponent, int)

checkAddEntry

public static void checkAddEntry(JTextComponent c)
Adds the caret position of the provided JTextComponent to the list.

Parameters:
c - The offset of this component's caret will be added to the list.
See Also:
addEntry(JTextComponent, int)

checkAddEntry

public static void checkAddEntry(JTextComponent c,
                                 int pos)
Deprecated. Use addEntry(JTextComponent, int) instead.

The same as addEntry(JTextComponent, int).


addEntry

public static void addEntry(JTextComponent c,
                            int pos)
Adds a new entry to the list. If the component and the position passed in are the same as those from the last entry in the list, nothing will be added.

Parameters:
c - The component to add to the list.
pos - The offset of the component's caret to add to the list.

jumpPrev

public static void jumpPrev(JTextComponent c)
Navigates to the component and position from the previous entry in the list. It will skip all entries with the same component and position as the current caret position in the component passed in.

This method will try to move focus to the component stored in the list and set its caret position.

Parameters:
c - The component to check for the current position.

jumpPrevComponent

public static void jumpPrevComponent(JTextComponent c)
Navigates to the component and position from the previous entry in the list. It will skip all entries with the same component as the one passed in, but it does not perform any checks on the positions.

This method will try to move focus to the component stored in the list and set its caret position.

Parameters:
c - The component to check for the current position.

hasPrev

public static boolean hasPrev()
Checks if there is the previous entry in the list.

Returns:
true if there is a previous entry in the list and it is possible to use jumpPrev(JTextComponent) or jumpPrevComponent(JTextComponent) for navigation. Otherwise false.

jumpNext

public static void jumpNext(JTextComponent c)
Navigates to the component and position from the next entry in the list. It will skip all entries with the same component and position as the current caret position in the component passed in.

This method will try to move focus to the component stored in the list and set its caret position.

Parameters:
c - The component to check for the current position.

jumpNextComponent

public static void jumpNextComponent(JTextComponent c)
Navigates to the component and position from the next entry in the list. It will skip all entries with the same component as the one passed in, but it does not perform any checks on the positions.

This method will try to move focus to the component stored in the list and set its caret position.

Parameters:
c - The component to check for the current position.

hasNext

public static boolean hasNext()
Checks if there is the next entry in the list.

Returns:
true if there is a previous entry in the list and it is possible to use jumpPrev(JTextComponent) or jumpPrevComponent(JTextComponent) for navigation. Otherwise false.

dump

public static String dump()
Returns:
Unspecified string.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.