| java.lang.Object javax.swing.text.Utilities
Utilities | public class Utilities (Code) | | |
Method Summary | |
final public static int | drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander t, int pos) | final public static int | getBreakLocation(Segment s, FontMetrics fm, int start, int end, TabExpander t, int pos) Uses BreakIterator. | final public static int | getNextWord(JTextComponent c, int pos) | final public static Element | getParagraphElement(JTextComponent c, int p) If the components document is instanceof AbstractDocument uses by its
method(getParagraphElement). | final public static int | getPositionAbove(JTextComponent c, int p, int x) Finds row above, calculates modelToView for all position from this view
and selects the best (the closest). | final public static int | getPositionBelow(JTextComponent c, int p, int x) Finds row below, calculates modelToView for all position from this view
and selects the best (the closest). | final public static int | getPreviousWord(JTextComponent c, int pos) | final public static int | getRowEnd(JTextComponent c, int pos) | final public static int | getRowStart(JTextComponent c, int pos) | final public static int | getTabbedTextOffset(Segment s, FontMetrics fm, int start, int end, TabExpander t, int pos) | final public static int | getTabbedTextOffset(Segment s, FontMetrics fm, int start, int end, TabExpander t, int pos, boolean round) If round equals false, it needs that symbol is placed completely. | final public static int | getTabbedTextWidth(Segment s, FontMetrics fm, int x, TabExpander t, int pos) | final public static int | getWordEnd(JTextComponent c, int pos) | final public static int | getWordStart(JTextComponent c, int pos) If pos < 0 or pos > length of the document BadLocationException will be
thrown. |
getParagraphElement | final public static Element getParagraphElement(JTextComponent c, int p)(Code) | | If the components document is instanceof AbstractDocument uses by its
method(getParagraphElement). Otherwise, uses Document.getDefaultRoot for
search.
|
getPositionAbove | final public static int getPositionAbove(JTextComponent c, int p, int x) throws BadLocationException(Code) | | Finds row above, calculates modelToView for all position from this view
and selects the best (the closest).
|
getPositionBelow | final public static int getPositionBelow(JTextComponent c, int p, int x) throws BadLocationException(Code) | | Finds row below, calculates modelToView for all position from this view
and selects the best (the closest).
|
getTabbedTextOffset | final public static int getTabbedTextOffset(Segment s, FontMetrics fm, int start, int end, TabExpander t, int pos, boolean round)(Code) | | If round equals false, it needs that symbol is placed completely. If
round equals true, it needs that more than half of the symbol is placed.
|
|
|