public final class JumpList extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JumpList.Entry
An entry in the list with
JTextComponent and a position in
its Document . |
Modifier and Type | Method and Description |
---|---|
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
JumpList.addEntry(JTextComponent, int) instead. |
static String |
dump()
Deprecated.
Should have never been public.
|
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.
|
public static void checkAddEntry()
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.
JumpList.addEntry(JTextComponent, int)
public static void checkAddEntry(JTextComponent c)
JTextComponent
to the
list.c
- The offset of this component's caret will be added to the list.JumpList.addEntry(JTextComponent, int)
@Deprecated public static void checkAddEntry(JTextComponent c, int pos)
JumpList.addEntry(JTextComponent, int)
instead.JumpList.addEntry(JTextComponent, int)
.public static void addEntry(JTextComponent c, int pos)
c
- The component to add to the list.pos
- The offset of the component's caret to add to the list.public static void jumpPrev(JTextComponent c)
This method will try to move focus to the component stored in the list and set its caret position.
c
- The component to check for the current position.public static void jumpPrevComponent(JTextComponent c)
This method will try to move focus to the component stored in the list and set its caret position.
c
- The component to check for the current position.public static boolean hasPrev()
true
if there is a previous entry in the list and it
is possible to use JumpList.jumpPrev(JTextComponent)
or JumpList.jumpPrevComponent(JTextComponent)
for navigation. Otherwise false
.public static void jumpNext(JTextComponent c)
This method will try to move focus to the component stored in the list and set its caret position.
c
- The component to check for the current position.public static void jumpNextComponent(JTextComponent c)
This method will try to move focus to the component stored in the list and set its caret position.
c
- The component to check for the current position.public static boolean hasNext()
true
if there is a previous entry in the list and it
is possible to use JumpList.jumpPrev(JTextComponent)
or JumpList.jumpPrevComponent(JTextComponent)
for navigation. Otherwise false
.@Deprecated public static String dump()