759 |
containerListener = AWTEventMulticaster.remove(containerListener, l); |
containerListener = AWTEventMulticaster.remove(containerListener, l); |
760 |
} |
} |
761 |
|
|
762 |
|
public synchronized ContainerListener[] getContainerListeners() |
763 |
|
{ |
764 |
|
return (ContainerListener[]) |
765 |
|
AWTEventMulticaster.getListeners(containerListener, |
766 |
|
ContainerListener.class); |
767 |
|
} |
768 |
|
|
769 |
/** @since 1.3 */ |
/** @since 1.3 */ |
770 |
public EventListener[] getListeners(Class listenerType) |
public EventListener[] getListeners(Class listenerType) |
771 |
{ |
{ |
772 |
if (listenerType == ContainerListener.class) |
if (listenerType == ContainerListener.class) |
773 |
return getListenersImpl(listenerType, containerListener); |
return getContainerListeners(); |
774 |
else return super.getListeners(listenerType); |
return super.getListeners(listenerType); |
775 |
} |
} |
776 |
|
|
777 |
/** |
/** |
1126 |
* |
* |
1127 |
* @serial the handler for property changes |
* @serial the handler for property changes |
1128 |
*/ |
*/ |
1129 |
protected ContainerListener accessibleContainerHandler; |
protected ContainerListener accessibleContainerHandler |
1130 |
|
= new AccessibleContainerHandler(); |
1131 |
|
|
1132 |
/** |
/** |
1133 |
* The default constructor. |
* The default constructor. |
1134 |
*/ |
*/ |
1135 |
protected AccessibleAWTContainer() |
protected AccessibleAWTContainer() |
1136 |
{ |
{ |
1137 |
|
Container.this.addContainerListener(accessibleContainerHandler); |
1138 |
} |
} |
1139 |
|
|
1140 |
/** |
/** |
1145 |
*/ |
*/ |
1146 |
public int getAccessibleChildrenCount() |
public int getAccessibleChildrenCount() |
1147 |
{ |
{ |
1148 |
// XXX |
int count = 0; |
1149 |
throw new Error("not implemented"); |
int i = component == null ? 0 : component.length; |
1150 |
|
while (--i >= 0) |
1151 |
|
if (component[i] instanceof Accessible) |
1152 |
|
count++; |
1153 |
|
return count; |
1154 |
} |
} |
1155 |
|
|
1156 |
/** |
/** |
1161 |
*/ |
*/ |
1162 |
public Accessible getAccessibleChild(int i) |
public Accessible getAccessibleChild(int i) |
1163 |
{ |
{ |
1164 |
// XXX |
if (component == null) |
1165 |
throw new Error("not implemented"); |
return null; |
1166 |
|
int index = -1; |
1167 |
|
while (i >= 0 && ++index < component.length) |
1168 |
|
if (component[index] instanceof Accessible) |
1169 |
|
i--; |
1170 |
|
if (i < 0) |
1171 |
|
return (Accessible) component[index]; |
1172 |
|
return null; |
1173 |
} |
} |
1174 |
|
|
1175 |
/** |
/** |
1178 |
* |
* |
1179 |
* @param p the point to look at |
* @param p the point to look at |
1180 |
* @return an accessible object at that point, or null |
* @return an accessible object at that point, or null |
1181 |
|
* @throws NullPointerException if p is null |
1182 |
*/ |
*/ |
1183 |
public Accessible getAccessibleAt(Point p) |
public Accessible getAccessibleAt(Point p) |
1184 |
{ |
{ |
1185 |
// XXX |
Component c = getComponentAt(p.x, p.y); |
1186 |
throw new Error("not implemented"); |
return c != Container.this && c instanceof Accessible ? (Accessible) c |
1187 |
|
: null; |
1188 |
} |
} |
1189 |
|
|
1190 |
/** |
/** |
1211 |
*/ |
*/ |
1212 |
public void componentAdded(ContainerEvent e) |
public void componentAdded(ContainerEvent e) |
1213 |
{ |
{ |
1214 |
// XXX |
AccessibleAWTContainer.this.firePropertyChange |
1215 |
throw new Error("not implemented"); |
(ACCESSIBLE_CHILD_PROPERTY, null, e.getChild()); |
1216 |
} |
} |
1217 |
|
|
1218 |
/** |
/** |
1223 |
*/ |
*/ |
1224 |
public void componentRemoved(ContainerEvent e) |
public void componentRemoved(ContainerEvent e) |
1225 |
{ |
{ |
1226 |
// XXX |
AccessibleAWTContainer.this.firePropertyChange |
1227 |
throw new Error("not implemented"); |
(ACCESSIBLE_CHILD_PROPERTY, e.getChild(), null); |
1228 |
} |
} |
1229 |
} // class AccessibleContainerHandler |
} // class AccessibleContainerHandler |
1230 |
} // class AccessibleAWTPanel |
} // class AccessibleAWTPanel |