| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static int | Returns: the new insertion positionView hosting text view, AttributeSet the attributes containing the composed text attr, Graphics the graphics context g, int the X origin x, int the Y origin y, int starting offset in the composed text to be rendered p0, int ending offset in the composed text to be rendered p1)Draws the given composed text passed from an input method. |
| pack-priv static float | |
| pack-priv static float | drawComposedText(View view, AttributeSet attr, Graphics g, float x, float y, int p0, int p1, boolean useFPAPI)
|
| public static final int | Returns: the X location at the end of the rendered textthe source of the text s, int the X origin >= 0 x, int the Y origin >= 0 y, Graphics the graphics context g, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document >= 0 startOffset)
Deprecated
since 9. replaced by
drawTabbedText(Segment, float, float, Graphics2D, TabExpander, int)
Draws the given text, expanding any tabs that are contained using the given tab expansion technique. |
| public static final float | Returns: the X location at the end of the rendered textthe source of the text s, float the X origin x, float >= 0the Y origin y, Graphics2D >= 0the graphics context g, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document startOffset)>= 0Draws the given text, expanding any tabs that are contained using the given tab expansion technique. |
| pack-priv static final int | Returns: the X location at the end of the rendered textView requesting rendering, may be null. view, Segment the source of the text s, int the X origin >= 0 x, int the Y origin >= 0 y, Graphics the graphics context g, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document >= 0 startOffset)Draws the given text, expanding any tabs that are contained using the given tab expansion technique. |
| pack-priv static final int | drawTabbedText(View view, Segment s, int x, int y, Graphics g, TabExpander e, int startOffset, int[] justificationData)
|
| pack-priv static final float | drawTabbedText(View view, Segment s, float x, float y, Graphics g, TabExpander e, int startOffset, int[] justificationData, boolean useFPAPI)
|
| public static final int | Returns: the offset into the given textthe source of the text s, FontMetrics the font metrics to use for the calculation metrics, int the starting view location representing the start
of the given text. x0, int the target view location to translate to an
offset into the text. x, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset in the document of the text startOffset)
Deprecated
since 9. replaced by
getBreakLocation(Segment, FontMetrics, float, float,
TabExpander, int)
Determine where to break the given text to fit within the given span. |
| pack-priv static final int | getBreakLocation(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean useFPIAPI)
|
| public static final int | Returns: the offset into the given textthe source of the text s, FontMetrics the font metrics to use for the calculation metrics, float the starting view location representing the start
of the given text. x0, float the target view location to translate to an
offset into the text. x, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset in the document of the text startOffset)Determine where to break the given text to fit within the given span. |
| pack-priv static JComponent | |
| pack-priv static int | Returns: the location within the model that best represents the next location visual positionView to query v, int the position to convert >= 0 pos, Position.the allocated region to render into alloc, int the direction from the current position that can
be thought of as the arrow keys typically found on a keyboard;
this may be one of the following:
direction, Position.
an array contain the bias that was checked biasRetProvides a way to determine the next visually represented model location that one might place a caret. |
| public static final int | Returns: the location in the model of the word start >= 0the editor c, int the offset in the document >= 0 offs)Determines the start of the next word for the given location. |
| pack-priv static int | getNextWordInParagraph(JTextComponent c, Element line, int offs, boolean first)
Finds the next word in the given elements text. |
| public static final Element | Returns: the elementthe editor c, int the starting offset in the document >= 0 offs)Determines the element to use for a paragraph/line. |
| public static final int | Returns: the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.the editor c, int the offset in the document >= 0 offs, int the X coordinate >= 0 x)
Deprecated
since 9. replaced by
getPositionAbove(JTextComponent, int, float)
Determines the position in the model that is closest to the given view location in the row above. |
| pack-priv static final int | |
| public static final int | Returns: the position>= 0 if the request can be computed, otherwise
a value of -1 will be returned.the editor c, int the offset in the document offs, float >= 0the X coordinate x)>= 0Determines the position in the model that is closest to the given view location in the row above. |
| public static final int | Returns: the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.the editor c, int the offset in the document >= 0 offs, int the X coordinate >= 0 x)
Deprecated
since 9. replaced by
getPositionBelow(JTextComponent, int, float)
Determines the position in the model that is closest to the given view location in the row below. |
| pack-priv static final int | |
| public static final int | Returns: the position>= 0 if the request can be computed, otherwise
a value of -1 will be returned.the editor c, int the offset in the document offs, float >= 0the X coordinate x)>= 0Determines the position in the model that is closest to the given view location in the row below. |
| public static final int | Returns: the location in the model of the word start >= 0the editor c, int the offset in the document >= 0 offs)Determine the start of the prev word for the given location. |
| pack-priv static int | getPrevWordInParagraph(JTextComponent c, Element line, int offs)
Finds the previous word in the given elements text. |
| public static final int | Returns: the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.the editor c, int the offset in the document >= 0 offs)Determines the ending row model position of the row that contains the specified model position. |
| public static final int | Returns: the position >= 0 if the request can be computed, otherwise a value of -1 will be returned.the editor c, int the offset in the document >= 0 offs)Determines the starting row model position of the row that contains the specified model position. |
| public static final int | Returns: the offset into the text >= 0the source of the text s, FontMetrics the font metrics to use for the calculation metrics, int the starting view location representing the start
of the given text >= 0. x0, int the target view location to translate to an
offset into the text >= 0. x, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document >= 0 startOffset)
Deprecated
since 9. replaced by
getTabbedTextOffset(Segment, FontMetrics, float, float,
TabExpander, int, boolean)
Determines the relative offset into the given text that best represents the given span in the view coordinate system. |
| pack-priv static final int | getTabbedTextOffset(View view, Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, int[] justificationData)
|
| pack-priv static final int | getTabbedTextOffset(View view, Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, int[] justificationData)
|
| public static final int | Returns: the offset into the text >= 0the source of the text s, FontMetrics the font metrics to use for the calculation metrics, int the starting view location representing the start
of the given text >= 0. x0, int the target view location to translate to an
offset into the text >= 0. x, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document >= 0 startOffset, boolean whether or not to round round)
Deprecated
since 9. replaced by
getTabbedTextOffset(Segment, FontMetrics, float, float,
TabExpander, int, boolean)
Determines the relative offset into the given text that best represents the given span in the view coordinate system. |
| public static final int | Returns: the offset into the text>= 0the source of the text s, FontMetrics the font metrics to use for the calculation metrics, float the starting view location representing the start
of the given text x0, float >= 0.the target view location to translate to an
offset into the text x, TabExpander >= 0.how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document startOffset, boolean >= 0whether or not to round round)Determines the relative offset into the given text that best represents the given span in the view coordinate system. |
| pack-priv static final int | getTabbedTextOffset(View view, Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean round, int[] justificationData, boolean useFPAPI)
|
| public static final int | Returns: the width of the textthe source of the text s, FontMetrics the font metrics to use for the calculation metrics, int the X origin >= 0 x, TabExpander how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document >= 0 startOffset)
Deprecated
since 9. replaced by
getTabbedTextWidth(Segment, FontMetrics, float, TabExpander, int)
Determines the width of the given segment of text taking tabs into consideration. |
| public static final float | Returns: the width of the textthe source of the text s, FontMetrics the font metrics to use for the calculation metrics, float the X origin x, TabExpander >= 0how to expand the tabs. If this value is null,
tabs will be expanded as a space character. e, int starting offset of the text in the document startOffset)>= 0Determines the width of the given segment of text taking tabs into consideration. |
| pack-priv static final int | getTabbedTextWidth(View view, Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset, int[] justificationData)
|
| pack-priv static final float | getTabbedTextWidth(View view, Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset, int[] justificationData)
|
| pack-priv static final float | getTabbedTextWidth(View view, Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset, int[] justificationData, boolean useFPAPI)
|
| public static final int | Returns: the location in the model of the word end >= 0the editor c, int the offset in the document >= 0 offs)Determines the end of a word for the given location. |
| public static final int | Returns: the location in the model of the word start >= 0the editor c, int the offset in the document >= 0 offs)Determines the start of a word for the given model location. |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static void |
| Utilities | back to summary |
|---|---|
| public Utilities() Constructs a | |
| drawComposedText | back to summary |
|---|---|
| pack-priv static int drawComposedText(View view, AttributeSet attr, Graphics g, int x, int y, int p0, int p1) throws BadLocationException Draws the given composed text passed from an input method.
| |
| drawComposedText | back to summary |
|---|---|
| pack-priv static float drawComposedText(View view, AttributeSet attr, Graphics g, float x, float y, int p0, int p1) throws BadLocationException | |
| drawComposedText | back to summary |
|---|---|
| pack-priv static float drawComposedText(View view, AttributeSet attr, Graphics g, float x, float y, int p0, int p1, boolean useFPAPI) throws BadLocationException | |
| drawTabbedText | back to summary |
|---|---|
| public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
Draws the given text, expanding any tabs that are contained using the given tab expansion technique. This particular implementation renders in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
| |
| drawTabbedText | back to summary |
|---|---|
| public static final float drawTabbedText(Segment s, float x, float y, Graphics2D g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
| |
| drawTabbedText | back to summary |
|---|---|
| pack-priv static final int drawTabbedText(View view, Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) Draws the given text, expanding any tabs that are contained using the given tab expansion technique. This particular implementation renders in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
| |
| drawTabbedText | back to summary |
|---|---|
| pack-priv static final int drawTabbedText(View view, Segment s, int x, int y, Graphics g, TabExpander e, int startOffset, int[] justificationData) | |
| drawTabbedText | back to summary |
|---|---|
| pack-priv static final float drawTabbedText(View view, Segment s, float x, float y, Graphics g, TabExpander e, int startOffset, int[] justificationData, boolean useFPAPI) | |
| getBreakLocation | back to summary |
|---|---|
| public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
Deprecated since 9. replaced by
Determine where to break the given text to fit within the given span. This tries to find a word boundary.
| |
| getBreakLocation | back to summary |
|---|---|
| pack-priv static final int getBreakLocation(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean useFPIAPI) | |
| getBreakLocation | back to summary |
|---|---|
| public static final int getBreakLocation(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset) Determine where to break the given text to fit within the given span. This tries to find a word boundary.
| |
| getJComponent | back to summary |
|---|---|
| pack-priv static JComponent getJComponent(View view) If | |
| getNextVisualPositionFrom | back to summary |
|---|---|
| pack-priv static int getNextVisualPositionFrom(View v, int pos, Position. Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.
This implementation assumes the views are laid out in a logical
manner. That is, that the view at index x + 1 is visually after
the View at index x, and that the View at index x - 1 is visually
before the View at x. There is support for reversing this behavior
only if the passed in
| |
| getNextWord | back to summary |
|---|---|
| public static final int getNextWord(JTextComponent c, int offs) throws BadLocationException Determines the start of the next word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
| |
| getNextWordInParagraph | back to summary |
|---|---|
| pack-priv static int getNextWordInParagraph(JTextComponent c, Element line, int offs, boolean first) throws BadLocationException Finds the next word in the given elements text. The first parameter allows searching multiple paragraphs where even the first offset is desired. Returns the offset of the next word, or BreakIterator.DONE if there are no more words in the element. | |
| getParagraphElement | back to summary |
|---|---|
| public static final Element getParagraphElement(JTextComponent c, int offs) Determines the element to use for a paragraph/line.
| |
| getPositionAbove | back to summary |
|---|---|
| public static final int getPositionAbove(JTextComponent c, int offs, int x) throws BadLocationException
Determines the position in the model that is closest to the given view location in the row above. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getPositionAbove | back to summary |
|---|---|
pack-priv static final int getPositionAbove(JTextComponent c, int offs, float x, boolean useFPAPI) throws BadLocationException
| |
| getPositionAbove | back to summary |
|---|---|
| public static final int getPositionAbove(JTextComponent c, int offs, float x) throws BadLocationException Determines the position in the model that is closest to the given view location in the row above. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getPositionBelow | back to summary |
|---|---|
| public static final int getPositionBelow(JTextComponent c, int offs, int x) throws BadLocationException
Determines the position in the model that is closest to the given view location in the row below. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getPositionBelow | back to summary |
|---|---|
pack-priv static final int getPositionBelow(JTextComponent c, int offs, float x, boolean useFPAPI) throws BadLocationException
| |
| getPositionBelow | back to summary |
|---|---|
| public static final int getPositionBelow(JTextComponent c, int offs, float x) throws BadLocationException Determines the position in the model that is closest to the given view location in the row below. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getPreviousWord | back to summary |
|---|---|
| public static final int getPreviousWord(JTextComponent c, int offs) throws BadLocationException Determine the start of the prev word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
| |
| getPrevWordInParagraph | back to summary |
|---|---|
| pack-priv static int getPrevWordInParagraph(JTextComponent c, Element line, int offs) throws BadLocationException Finds the previous word in the given elements text. The first parameter allows searching multiple paragraphs where even the first offset is desired. Returns the offset of the next word, or BreakIterator.DONE if there are no more words in the element. | |
| getRowEnd | back to summary |
|---|---|
| public static final int getRowEnd(JTextComponent c, int offs) throws BadLocationException Determines the ending row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getRowStart | back to summary |
|---|---|
| public static final int getRowStart(JTextComponent c, int offs) throws BadLocationException Determines the starting row model position of the row that contains the specified model position. The component given must have a size to compute the result. If the component doesn't have a size a value of -1 will be returned.
| |
| getTabbedTextOffset | back to summary |
|---|---|
| public static final int getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
Deprecated since 9. replaced by
Determines the relative offset into the given text that best represents the given span in the view coordinate system. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
| |
| getTabbedTextOffset | back to summary |
|---|---|
| pack-priv static final int getTabbedTextOffset(View view, Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, int[] justificationData) | |
| getTabbedTextOffset | back to summary |
|---|---|
| pack-priv static final int getTabbedTextOffset(View view, Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, int[] justificationData) | |
| getTabbedTextOffset | back to summary |
|---|---|
| public static final int getTabbedTextOffset(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round)
Deprecated since 9. replaced by
Determines the relative offset into the given text that best represents the given span in the view coordinate system.
| |
| getTabbedTextOffset | back to summary |
|---|---|
| public static final int getTabbedTextOffset(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean round) Determines the relative offset into the given text that best represents the given span in the view coordinate system.
| |
| getTabbedTextOffset | back to summary |
|---|---|
| pack-priv static final int getTabbedTextOffset(View view, Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean round, int[] justificationData, boolean useFPAPI) | |
| getTabbedTextWidth | back to summary |
|---|---|
| public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset)
Determines the width of the given segment of text taking tabs into consideration. This is implemented in a 1.1 style coordinate system where ints are used and 72dpi is assumed.
| |
| getTabbedTextWidth | back to summary |
|---|---|
| public static final float getTabbedTextWidth(Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.
| |
| getTabbedTextWidth | back to summary |
|---|---|
| pack-priv static final int getTabbedTextWidth(View view, Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset, int[] justificationData) | |
| getTabbedTextWidth | back to summary |
|---|---|
| pack-priv static final float getTabbedTextWidth(View view, Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset, int[] justificationData) | |
| getTabbedTextWidth | back to summary |
|---|---|
| pack-priv static final float getTabbedTextWidth(View view, Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset, int[] justificationData, boolean useFPAPI) | |
| getWordEnd | back to summary |
|---|---|
| public static final int getWordEnd(JTextComponent c, int offs) throws BadLocationException Determines the end of a word for the given location. Uses BreakIterator.getWordInstance() to actually get the words.
| |
| getWordStart | back to summary |
|---|---|
| public static final int getWordStart(JTextComponent c, int offs) throws BadLocationException Determines the start of a word for the given model location. Uses BreakIterator.getWordInstance() to actually get the words.
| |
| isComposedTextAttributeDefined | back to summary |
|---|---|
| pack-priv static boolean isComposedTextAttributeDefined(AttributeSet as) | |
| isComposedTextElement | back to summary |
|---|---|
| pack-priv static boolean isComposedTextElement(Document doc, int offset) | |
| isComposedTextElement | back to summary |
|---|---|
| pack-priv static boolean isComposedTextElement(Element elem) | |
| isLeftToRight | back to summary |
|---|---|
| pack-priv static boolean isLeftToRight(Component c) | |
| paintComposedText | back to summary |
|---|---|
| pack-priv static void paintComposedText(Graphics g, Rectangle alloc, GlyphView v) Paints the composed text in a GlyphView | |