@Override public void getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) e.result = model.getAccessibleText(); else { int linkCount = model.getHyperlinkCount(); if (e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; if (e.childID != ACC.CHILDID_SELF && e.childID != ACC.CHILDID_NONE) { int index = e.childID; IHyperlinkSegment link = model.getHyperlink(index); if (link != null) { location = link.getBounds(); } } if (location == null) { location = getBounds(); } Point pt = toDisplay(new Point(location.x, location.y)); e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; }
@Override public void getHelp(AccessibleEvent e) { e.result = getToolTipText(); int linkCount = model.getHyperlinkCount(); if (e.result == null && e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } });
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; if (e.childID != ACC.CHILDID_SELF && e.childID != ACC.CHILDID_NONE) { int index = e.childID; IHyperlinkSegment link = model.getHyperlink(index); if (link != null) { location = link.getBounds(); } } if (location == null) { location = getBounds(); } Point pt = toDisplay(new Point(location.x, location.y)); e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; }
@Override public void getHelp(AccessibleEvent e) { e.result = getToolTipText(); int linkCount = model.getHyperlinkCount(); if (e.result == null && e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } });
@Override public void getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) e.result = model.getAccessibleText(); else { int linkCount = model.getHyperlinkCount(); if (e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } }