All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.text.InsertPosition
- public interface InsertPosition
A place within a document view that represents where
things can be inserted into the document model. It gives a
way to navigate through the document view while abstracting
away the details of how the view is arranged. This can
be useful because some views may filter out portions of
the associated model, and some views may not allow navigation
in certain areas such as read-only areas.
-
backwardAction
- Name of the Action for moving the caret
logically backward one position.
-
beginAction
- Name of the Action for moving the caret
to the begining of the document.
-
beginParagraphAction
- Name of the Action for moving the caret
to the begin of the paragraph
-
downAction
- Name of the Action for moving the caret
logically downward one position.
-
endAction
- Name of the Action for moving the caret
to the end of the document.
-
endParagraphAction
- Name of the Action for moving the caret
to the end of the paragraph
-
forwardAction
- Name of the Action for moving the caret
logically forward one position.
-
selectionBackwardAction
- Name of the Action for extending the selection
by moving the caret logically backward one position.
-
selectionForwardAction
- Name of the Action for extending the selection
by moving the caret logically forward one position.
-
upAction
- Name of the Action for moving the caret
logically upward one position.
-
addChangeListener(ChangeListener)
- Add a listener to track whenever the caret position
has been changed.
-
deinstall(JTextComponent)
- Called when the UI is being removed from the
interface of a JTextComponent.
-
getActions()
- Fetch the command list for navigating the caret
through the view.
-
getDot()
- Fetch the current position of the caret
-
getMark()
- Fetch the current position of the mark.
-
install(JTextComponent)
- Called when the UI is being installed into the
interface of a JTextComponent.
-
isVisible()
- Determine if the caret is currently visible.
-
moveDot(int)
- Move the caret position to some other position,
leaving behind the mark.
-
removeChangeListener(ChangeListener)
- Remove a listener that was tracking caret position changes.
-
setBlinkRate(int)
- Set the blink rate of the caret.
-
setDot(int)
- Set the caret position to some position.
-
setVisible(boolean)
- Set the visibility of the caret.
forwardAction
public static final String forwardAction
- Name of the Action for moving the caret
logically forward one position.
- See Also:
- getActions
backwardAction
public static final String backwardAction
- Name of the Action for moving the caret
logically backward one position.
- See Also:
- getActions
selectionForwardAction
public static final String selectionForwardAction
- Name of the Action for extending the selection
by moving the caret logically forward one position.
- See Also:
- getActions
selectionBackwardAction
public static final String selectionBackwardAction
- Name of the Action for extending the selection
by moving the caret logically backward one position.
- See Also:
- getActions
upAction
public static final String upAction
- Name of the Action for moving the caret
logically upward one position.
- See Also:
- getActions
downAction
public static final String downAction
- Name of the Action for moving the caret
logically downward one position.
- See Also:
- getActions
endParagraphAction
public static final String endParagraphAction
- Name of the Action for moving the caret
to the end of the paragraph
- See Also:
- getActions
beginParagraphAction
public static final String beginParagraphAction
- Name of the Action for moving the caret
to the begin of the paragraph
- See Also:
- getActions
beginAction
public static final String beginAction
- Name of the Action for moving the caret
to the begining of the document.
- See Also:
- getActions
endAction
public static final String endAction
- Name of the Action for moving the caret
to the end of the document.
- See Also:
- getActions
install
public abstract void install(JTextComponent c)
- Called when the UI is being installed into the
interface of a JTextComponent. This can be used
to gain access to the model that is being navigated
by the implementation of this interface.
deinstall
public abstract void deinstall(JTextComponent c)
- Called when the UI is being removed from the
interface of a JTextComponent. This is used to
unregister any listeners that were attached.
addChangeListener
public abstract void addChangeListener(ChangeListener l)
- Add a listener to track whenever the caret position
has been changed.
removeChangeListener
public abstract void removeChangeListener(ChangeListener l)
- Remove a listener that was tracking caret position changes.
isVisible
public abstract boolean isVisible()
- Determine if the caret is currently visible.
setVisible
public abstract void setVisible(boolean v)
- Set the visibility of the caret.
- Parameters:
- v - This is true if the caret should be shown,
and false if the caret should be hidden.
setBlinkRate
public abstract void setBlinkRate(int rate)
- Set the blink rate of the caret. This determines if
and how fast the caret blinks, which is common as one
way to attract attention to the caret.
- Parameters:
- rate - The delay in milliseconds. If this is
zero the caret will not blink.
getDot
public abstract int getDot()
- Fetch the current position of the caret
getMark
public abstract int getMark()
- Fetch the current position of the mark. If there
is a selection, the mark will not be the same as
the dot.
setDot
public abstract void setDot(int dot)
- Set the caret position to some position. This
causes the mark to become the same as the dot,
effectively setting the selection range to zero.
- Parameters:
- dot - The new position to set the caret to.
moveDot
public abstract void moveDot(int dot)
- Move the caret position to some other position,
leaving behind the mark. This is useful for
making selections.
- Parameters:
- dot - The new position to move the caret to.
getActions
public abstract Action[] getActions()
- Fetch the command list for navigating the caret
through the view.
All Packages Class Hierarchy This Package Previous Next Index