public void selectionChanged() {
Event event = new Event();
event
SelectionEvent e = new SelectionEvent(event);
for (int i =
SelectionListener listener = (SelectionListener) selectionListeners
listener
}
}
現在輔助功能(Accessibility)也日益成為軟件重要的部分
Accessible accessible = getAccessible();
accessible
public void getRole(AccessibleControlEvent e) {
int role =
if (childID == ACC
role = ACC
else if (childID >=
role = ACC
}
e
}
public void getValue(AccessibleControlEvent e){
int childID = e
if (childID == ACC
e
}
else if (childID >=
e
}
}
public void getChildAtPoint(AccessibleControlEvent e) {
Point testPoint = toControl(new Point(e
int childID = ACC
childID = (testPoint
if (childID == ACC
Rectangle location = getBounds();
location
if (location
childID = ACC
}
}
e
}
public void getLocation(AccessibleControlEvent e) {
Rectangle location = null;
int childID = e
if (childID == ACC
location = getBounds();
}
if (childID >=
location = new Rectangle(cx
}
if (location != null) {
Point pt = toDisplay(new Point(location
e
e
e
e
}
}
[
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28983.html