use of com.haulmont.cuba.web.toolkit.ui.client.treetable.CubaTreeTableState in project cuba by cuba-platform.
the class CubaTreeTable method iterator.
@Override
public Iterator<Component> iterator() {
List<Component> additionalConnectors = null;
CubaTreeTableState tableState = getState(false);
if (tableState.presentations != null) {
additionalConnectors = new LinkedList<>();
additionalConnectors.add((Component) tableState.presentations);
}
if (tableState.contextMenu != null) {
if (additionalConnectors == null) {
additionalConnectors = new LinkedList<>();
}
additionalConnectors.add((Component) tableState.contextMenu);
}
if (tableState.customPopup != null) {
if (additionalConnectors == null) {
additionalConnectors = new LinkedList<>();
}
additionalConnectors.add((Component) tableState.customPopup);
}
if (additionalConnectors == null) {
return super.iterator();
} else if (visibleComponents != null) {
return Iterables.concat(visibleComponents, additionalConnectors).iterator();
} else {
return additionalConnectors.iterator();
}
}
Aggregations