jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java
changeset 42216 621af0ebf6c4
parent 41807 f9eb6cb54fed
child 43075 668b6d00cc79
equal deleted inserted replaced
42215:4efb5b19587b 42216:621af0ebf6c4
   469      * @return the bounding box of the given position
   469      * @return the bounding box of the given position
   470      * @exception BadLocationException  if the given position does not
   470      * @exception BadLocationException  if the given position does not
   471      *   represent a valid location in the associated document
   471      *   represent a valid location in the associated document
   472      * @see View#modelToView
   472      * @see View#modelToView
   473      */
   473      */
       
   474     @SuppressWarnings("deprecation")
   474     public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException {
   475     public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException {
   475         // line coordinates
   476         // line coordinates
   476         Document doc = getDocument();
   477         Document doc = getDocument();
   477         Element map = getElement();
   478         Element map = getElement();
   478         int lineIndex = map.getElementIndex(pos);
   479         int lineIndex = map.getElementIndex(pos);
   796     /**
   797     /**
   797      * Calculate the width of the line represented by
   798      * Calculate the width of the line represented by
   798      * the given element.  It is assumed that the font
   799      * the given element.  It is assumed that the font
   799      * and font metrics are up-to-date.
   800      * and font metrics are up-to-date.
   800      */
   801      */
       
   802     @SuppressWarnings("deprecation")
   801     private int getLineWidth(Element line) {
   803     private int getLineWidth(Element line) {
   802         if (line == null) {
   804         if (line == null) {
   803             return 0;
   805             return 0;
   804         }
   806         }
   805         int p0 = line.getStartOffset();
   807         int p0 = line.getStartOffset();