| File |
Line |
| it/amattioli/guidate/collections/GroupPropertyModel.java |
60 |
| it/amattioli/guidate/collections/GroupingPropertyModel.java |
74 |
return (List<? extends Entity<?>>)values;
} else {
return new ArrayList(values);
}
} catch (IllegalAccessException e) {
// TODO Handle exception
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
// TODO Handle exception
throw new RuntimeException(e);
} catch (NoSuchMethodException e) {
return Collections.emptyList();
}
}
@Override
public Object getChild(int groupIdx, int childIdx) {
return getGroup(groupIdx).getMember(childIdx);
}
@Override
public int getChildCount(int groupIdx) {
return getGroup(groupIdx).size();
}
@Override
public EntityGroup<?, ?> getGroup(int idx) {
return (EntityGroup<?, ?>)getModelValues().get(idx);
}
@Override
public int getGroupCount() {
return getModelValues().size();
}
@Override
public Object getGroupfoot(int arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean hasGroupfoot(int arg0) {
// TODO Auto-generated method stub
return false;
}
}
|
| File |
Line |
| it/amattioli/guidate/browsing/tree/BrowserTreeComposer.java |
63 |
| it/amattioli/guidate/editing/EditorTreeComposer.java |
78 |
tree.setAttribute("BrowserTreeComposer.selectionListener", listener);
}
public void onOpenForSelection(Event evt) {
selectItem((Tree)evt.getTarget(), new TreePath((String)evt.getData()));
}
private void selectItem(Tree tree, TreePath path) {
Treechildren treechildren = tree.getTreechildren();
Treeitem item = null;
for (int i = 0; i < path.depth(); i++) {
if (treechildren.getChildren().size() == 0) {
item.setOpen(true);
Events.echoEvent("onOpenForSelection", tree, path.toString());
}
item = ((Treeitem)treechildren.getChildren().get(path.elementAt(i)));
treechildren = item.getTreechildren();
}
item.setSelected(true);
}
public void onSelect(SelectEvent evt) {
Treeitem item = (Treeitem)evt.getSelectedItems().iterator().next();
|