<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:01:41 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  Utilities
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Utilities.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/TextAction.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/View.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Utilities.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing.text</FONT>
<BR>
Class  Utilities</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.swing.text.Utilities</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Utilities</B><DT>extends java.lang.Object</DL>

<P>
A collection of methods to deal with various text
 related activities.
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#Utilities()">Utilities</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#drawTabbedText(javax.swing.text.Segment, int, int, java.awt.Graphics, javax.swing.text.TabExpander, int)">drawTabbedText</A></B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
               int&nbsp;x,
               int&nbsp;y,
               java.awt.Graphics&nbsp;g,
               <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
               int&nbsp;startOffset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the given text, expanding any tabs that are contained
 using the given tab expansion technique.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getBreakLocation(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int)">getBreakLocation</A></B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                 java.awt.FontMetrics&nbsp;metrics,
                 int&nbsp;x0,
                 int&nbsp;x,
                 <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                 int&nbsp;startOffset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine where to break the given text to fit
 within the the given span.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getNextWord(javax.swing.text.JTextComponent, int)">getNextWord</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
            int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the start of the next word for the given location.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../javax/swing/text/Element.html">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getParagraphElement(javax.swing.text.JTextComponent, int)">getParagraphElement</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                    int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the element to use for a paragraph/line.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getPositionAbove(javax.swing.text.JTextComponent, int, int)">getPositionAbove</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                 int&nbsp;offs,
                 int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the position in the model that is closest to the given 
 view location in the row above.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getPositionBelow(javax.swing.text.JTextComponent, int, int)">getPositionBelow</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                 int&nbsp;offs,
                 int&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the position in the model that is closest to the given 
 view location in the row below.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getPreviousWord(javax.swing.text.JTextComponent, int)">getPreviousWord</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine the start of the prev word for the given location.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getRowEnd(javax.swing.text.JTextComponent, int)">getRowEnd</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
          int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the ending row model position of the row that contains
 the specified model position.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getRowStart(javax.swing.text.JTextComponent, int)">getRowStart</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
            int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the starting row model position of the row that contains
 the specified model position.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int)">getTabbedTextOffset</A></B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                    java.awt.FontMetrics&nbsp;metrics,
                    int&nbsp;x0,
                    int&nbsp;x,
                    <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                    int&nbsp;startOffset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the relative offset into the given text that
 best represents the given span in the view coordinate
 system.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int, boolean)">getTabbedTextOffset</A></B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                    java.awt.FontMetrics&nbsp;metrics,
                    int&nbsp;x0,
                    int&nbsp;x,
                    <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                    int&nbsp;startOffset,
                    boolean&nbsp;round)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getTabbedTextWidth(javax.swing.text.Segment, java.awt.FontMetrics, int, javax.swing.text.TabExpander, int)">getTabbedTextWidth</A></B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                   java.awt.FontMetrics&nbsp;metrics,
                   int&nbsp;x,
                   <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                   int&nbsp;startOffset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the width of the given segment of text taking tabs 
 into consideration.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getWordEnd(javax.swing.text.JTextComponent, int)">getWordEnd</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
           int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the end of a word for the given location.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Utilities.html#getWordStart(javax.swing.text.JTextComponent, int)">getWordStart</A></B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
             int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the start of a word for the given model location.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Utilities()"><!-- --></A><H3>
Utilities</H3>
<PRE>
public <B>Utilities</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="drawTabbedText(javax.swing.text.Segment, int, int, java.awt.Graphics, javax.swing.text.TabExpander, int)"><!-- --></A><H3>
drawTabbedText</H3>
<PRE>
public static final int <B>drawTabbedText</B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                                       int&nbsp;x,
                                       int&nbsp;y,
                                       java.awt.Graphics&nbsp;g,
                                       <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                                       int&nbsp;startOffset)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the source of the text<DD><CODE>x</CODE> - the X origin >= 0<DD><CODE>y</CODE> - the Y origin >= 0<DD><CODE>g</CODE> - the graphics context<DD><CODE>e</CODE> - how to expand the tabs.  If this value is null, 
   tabs will be expanded as a space character.<DD><CODE>startOffset</CODE> - starting offset of the text in the document >= 0</DL>
</DD>
</DL>
<HR>

<A NAME="getTabbedTextWidth(javax.swing.text.Segment, java.awt.FontMetrics, int, javax.swing.text.TabExpander, int)"><!-- --></A><H3>
getTabbedTextWidth</H3>
<PRE>
public static final int <B>getTabbedTextWidth</B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                                           java.awt.FontMetrics&nbsp;metrics,
                                           int&nbsp;x,
                                           <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                                           int&nbsp;startOffset)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the source of the text<DD><CODE>metrics</CODE> - the font metrics to use for the calculation<DD><CODE>x</CODE> - the X origin >= 0<DD><CODE>e</CODE> - how to expand the tabs.  If this value is null, 
   tabs will be expanded as a space character.<DD><CODE>startOffset</CODE> - starting offset of the text in the document >= 0</DL>
</DD>
</DL>
<HR>

<A NAME="getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int)"><!-- --></A><H3>
getTabbedTextOffset</H3>
<PRE>
public static final int <B>getTabbedTextOffset</B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                                            java.awt.FontMetrics&nbsp;metrics,
                                            int&nbsp;x0,
                                            int&nbsp;x,
                                            <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                                            int&nbsp;startOffset)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the source of the text<DD><CODE>metrics</CODE> - the font metrics to use for the calculation<DD><CODE>x0</CODE> - the starting view location representing the start
   of the given text >= 0.<DD><CODE>x</CODE> - the target view location to translate to an
   offset into the text >= 0.<DD><CODE>e</CODE> - how to expand the tabs.  If this value is null, 
   tabs will be expanded as a space character.<DD><CODE>startOffset</CODE> - starting offset of the text in the document >= 0</DL>
</DD>
</DL>
<HR>

<A NAME="getTabbedTextOffset(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int, boolean)"><!-- --></A><H3>
getTabbedTextOffset</H3>
<PRE>
public static final int <B>getTabbedTextOffset</B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                                            java.awt.FontMetrics&nbsp;metrics,
                                            int&nbsp;x0,
                                            int&nbsp;x,
                                            <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                                            int&nbsp;startOffset,
                                            boolean&nbsp;round)</PRE>
<DL>
</DL>
<HR>

<A NAME="getBreakLocation(javax.swing.text.Segment, java.awt.FontMetrics, int, int, javax.swing.text.TabExpander, int)"><!-- --></A><H3>
getBreakLocation</H3>
<PRE>
public static final int <B>getBreakLocation</B>(<A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;s,
                                         java.awt.FontMetrics&nbsp;metrics,
                                         int&nbsp;x0,
                                         int&nbsp;x,
                                         <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e,
                                         int&nbsp;startOffset)</PRE>
<DL>
<DD>Determine where to break the given text to fit
 within the the given span.  This trys to find a
 whitespace boundry.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the source of the text<DD><CODE>metrics</CODE> - the font metrics to use for the calculation<DD><CODE>x0</CODE> - the starting view location representing the start
   of the given text.<DD><CODE>x</CODE> - the target view location to translate to an
   offset into the text.<DD><CODE>e</CODE> - how to expand the tabs.  If this value is null, 
   tabs will be expanded as a space character.<DD><CODE>startOffset</CODE> - starting offset in the document of the text</DL>
</DD>
</DL>
<HR>

<A NAME="getRowStart(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getRowStart</H3>
<PRE>
public static final int <B>getRowStart</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                    int&nbsp;offs)
                             throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the starting row model position of the row that contains
 the specified model position.  Assumes the row(s) are currently
 displayed in a view.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Returns:</B><DD>the position >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getRowEnd(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getRowEnd</H3>
<PRE>
public static final int <B>getRowEnd</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                  int&nbsp;offs)
                           throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the ending row model position of the row that contains
 the specified model position.  Assumes the row(s) are currently
 displayed in a view.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Returns:</B><DD>the position >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getPositionAbove(javax.swing.text.JTextComponent, int, int)"><!-- --></A><H3>
getPositionAbove</H3>
<PRE>
public static final int <B>getPositionAbove</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                         int&nbsp;offs,
                                         int&nbsp;x)
                                  throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the position in the model that is closest to the given 
 view location in the row above.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DD><CODE>x</CODE> - the X coordinate >= 0<DT><B>Returns:</B><DD>the model position >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getPositionBelow(javax.swing.text.JTextComponent, int, int)"><!-- --></A><H3>
getPositionBelow</H3>
<PRE>
public static final int <B>getPositionBelow</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                         int&nbsp;offs,
                                         int&nbsp;x)
                                  throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the position in the model that is closest to the given 
 view location in the row below.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DD><CODE>x</CODE> - the X coordinate >= 0<DT><B>Returns:</B><DD>the model position >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getWordStart(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getWordStart</H3>
<PRE>
public static final int <B>getWordStart</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                     int&nbsp;offs)
                              throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the start of a word for the given model location.
 Uses BreakIterator.getWordInstance() to actually get the words.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getWordEnd(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getWordEnd</H3>
<PRE>
public static final int <B>getWordEnd</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                   int&nbsp;offs)
                            throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the end of a word for the given location.
 Uses BreakIterator.getWordInstance() to actually get the words.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getNextWord(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getNextWord</H3>
<PRE>
public static final int <B>getNextWord</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                    int&nbsp;offs)
                             throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determines the start of the next word for the given location.
 Uses BreakIterator.getWordInstance() to actually get the words.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getPreviousWord(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getPreviousWord</H3>
<PRE>
public static final int <B>getPreviousWord</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                        int&nbsp;offs)
                                 throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Determine the start of the prev word for the given location.
 Uses BreakIterator.getWordInstance() to actually get the words.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the offset in the document >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the offset is out of range</DL>
</DD>
</DL>
<HR>

<A NAME="getParagraphElement(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>
getParagraphElement</H3>
<PRE>
public static final <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getParagraphElement</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;c,
                                                int&nbsp;offs)</PRE>
<DL>
<DD>Determines the element to use for a paragraph/line.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the editor<DD><CODE>offs</CODE> - the starting offset in the document >= 0<DT><B>Returns:</B><DD>the element</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/Utilities.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/TextAction.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/View.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Utilities.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
