deWidget.decorate(canvas);
}
}
private void layoutWithReferences(UiCanvas canvas) {
KongaSplitPane split = new KongaSplitPane(JSplitPane.HORIZONTAL_SPLIT);
split.setOneTouchExpandable(true);
split.setResizeWeight(0.5);
// HACK: Just setting the minimum size of the split pane's right-component does
// not work; the divider cannot be moved all the way to the right anyway. I believe
// this is because of the JTable inside of the DataElementReferenceTable.
JComponent c = BorderLayoutBuilder.fillWith(referencesTable);
ComponentTraverser.traverse(c, new Acceptor<Component>() {
@Override
public boolean accept(Component t) {
t.setMinimumSize(new Dimension(1, 1));
return !(t instanceof JTable);
}
});
split.split(deWidget, new UiProviderAdapter(c));
canvas.display(split);
}