}
private void refreshLabels() {
labelPanel.clear();
labelPanel.setWidth("100%");
labelPanel.setWidget(0, 0, new PLabel("Index"));
labelPanel.setWidget(0, 1, new PLabel("Header"));
labelPanel.setWidget(0, 2, new PLabel("Visible"));
labelPanel.getRowFormatter().addStyleName(0, "pony-ComplexList-ColumnHeader");
int i = 1;
int nextViewableIndex = 1;
for (final SelectableLabel label : labels) {
// add index if and only if label is viewable
if (label.viewable) {
labelPanel.setWidget(i, 0, new PLabel(nextViewableIndex + ""));
nextViewableIndex++;
}
final PHorizontalPanel panel = new PHorizontalPanel();
panel.setSizeFull();