use of com.haulmont.cuba.web.widgets.client.treetable.CubaTreeTableState in project cuba by cuba-platform.
the class CubaTreeTable method iterator.
@Override
@Nonnull
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