public void actionPerformed(ActionEvent e) {
if (e.getSource() == textField) {
setPortValue(textField.getText());
} else if (e.getSource() == externalWindowButton) {
NodeBoxDocument doc = NodeBoxDocument.getCurrentDocument();
if (doc == null) throw new RuntimeException("No current active document.");
// TextWindow window = new TextWindow(port);
// window.setLocationRelativeTo(this);
// window.setVisible(true);
// doc.addPortEditor(window);