Package javax.swing.text

Examples of javax.swing.text.View.viewToModel()


    AccessibleText at = (AccessibleText) l.getAccessibleContext();
    // The HTML renderer is stored as client property.
    View v = (View) l.getClientProperty(BasicHTML.propertyKey);
    Rectangle r = getTextRectangle(l);
    int expected = -1;
    expected = v.viewToModel(5, 5, r, new Position.Bias[0]);
    int i = at.getIndexAtPoint(new Point(5, 5));
    h.check(i, expected);
    f.dispose();
  }
View Full Code Here


      return null;
    if(!textR.contains(p))
      return null;
    int x = (int) (p.x / getZoom());
    int y = (int) (p.y / getZoom());
    final int pos = view.viewToModel(x, y, textR);
    final HTMLDocument document = (HTMLDocument) view.getDocument();
    final String linkURL = HtmlUtils.getURLOfExistingLink(document, pos);
    return linkURL;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.