in uimaj-ep-cev/src/main/java/org/apache/uima/cev/data/CEVData.java [562:616]
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
if (element instanceof CEVAnnotationTreeNode) {
AnnotationFS annot = ((CEVAnnotationTreeNode) element).getAnnotation();
if (annotationState.containsKey(annot.getType())) {
HashMap<AnnotationFS, Boolean> map = annotationState.get(annot.getType());
if (map.containsKey(annot)) {
map.put(annot, event.getChecked());
int count = annotationStateCount.get(annot.getType());
if (event.getChecked())
count++;
else
count--;
annotationStateCount.put(annot.getType(), count);
annotationStateChanged(annot);
}
}
} else if (element instanceof CEVTypeTreeNode) {
Type type = ((CEVTypeTreeNode) element).getType();
if (annotationState.containsKey(type)) {
HashMap<AnnotationFS, Boolean> map = annotationState.get(type);
for (AnnotationFS a : map.keySet())
map.put(a, event.getChecked());
if (event.getChecked())
annotationStateCount.put(type, map.size());
else
annotationStateCount.put(type, 0);
if (!map.isEmpty())
annotationStateChanged(type);
}
} else if (element instanceof ICEVAnnotationNode) {
AnnotationFS annot = ((ICEVAnnotationNode) element).getAnnotation();
if (annotationState.containsKey(annot.getType())) {
HashMap<AnnotationFS, Boolean> map = annotationState.get(annot.getType());
if (map.containsKey(annot)) {
map.put(annot, event.getChecked());
int count = annotationStateCount.get(annot.getType());
if (event.getChecked())
count++;
else
count--;
annotationStateCount.put(annot.getType(), count);
annotationStateChanged(annot);
}
}
}
}