}
private void rebuildInterface() {
controlPanel.removeAll();
controlMap.clear();
Node node = getActiveNode();
if (node == null) return;
int rowIndex = 0;
ArrayList<String> portNames = new ArrayList<String>();
String activeNodePath = document.getActiveNodePath();
for (Port p : node.getInputs())
portNames.add(p.getName());
for (String portName : portNames) {
Port p = node.getInput(portName);
// Hide ports with names that start with an underscore.
if (portName.startsWith("_") || p.getName().startsWith("_")) continue;
// Hide ports whose values can't be persisted.
if (p.isCustomType()) continue;
// Hide ports that accept lists.