Package javax.accessibility

Examples of javax.accessibility.AccessibleText


        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here


   */
  private void testNoHTML(TestHarness h)
  {
    h.checkPoint("testNoHTML");
    JLabel l = new JLabel("Hello World");
    AccessibleText at = (AccessibleText) l.getAccessibleContext();
    Rectangle b = at.getCharacterBounds(2);
    h.check(b, null);
  }
View Full Code Here

    JLabel l = new JLabel("<html>Hello World</html>");
    f.getContentPane().add(l);
    f.pack();
    f.setVisible(true);
    l.setSize(100, 30);
    AccessibleText at = (AccessibleText) l.getAccessibleContext();
    // The HTML renderer is stored as client property.
    View v = (View) l.getClientProperty(BasicHTML.propertyKey);
    Rectangle r = getTextRectangle(l);
    Rectangle expected = null;
    try
      {
        expected = v.modelToView(2, r, Position.Bias.Forward).getBounds();
      }
    catch (BadLocationException ex)
      {
        h.debug(ex);
        h.fail("Unexpected BadLocationException");
      }
    Rectangle b = at.getCharacterBounds(2);
    h.check(b, expected);
    f.dispose();
  }
View Full Code Here

   */
  private void testNoHTML(TestHarness h)
  {
    h.checkPoint("testNoHTML");
    JLabel l = new JLabel("Hello World");
    AccessibleText at = (AccessibleText) l.getAccessibleContext();
    int i = at.getIndexAtPoint(new Point(5, 5));
    h.check(i, -1);
  }
View Full Code Here

    JLabel l = new JLabel("<html>Hello World</html>");
    f.getContentPane().add(l);
    f.pack();
    f.setVisible(true);
    l.setSize(100, 30);
    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

        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here

        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here

        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here

        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here

        protected void handleVisibleDataChanged() {
            if (Paragraph.this.isFocusOwner()) {
                AccessibleContext ac = accessibleContext;
                if (ac != null) {
                    AccessibleText at = ac.getAccessibleText();
                    if (at != null) {
                        int pos = at.getCaretPosition();
                        // Simulating a caret event here should help at tools
                        // that re not aware of the paragraph approach of OOo.
                        firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY,
                            new Integer(-1), new Integer(pos));
                    }
View Full Code Here

TOP

Related Classes of javax.accessibility.AccessibleText

Copyright © 2018 www.massapicom. 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.