while (!(component instanceof NodeBoxDocument)) {
component = component.getParent();
}
if (colorDialog == null) {
colorDialog = new ColorDialog((Frame) SwingUtilities.getWindowAncestor(this));
colorDialog.setColor(port.colorValue().getAwtColor());
int height = colorDialog.getHeight();
colorDialog.setMinimumSize(new Dimension(400, height));
colorDialog.setPreferredSize(new Dimension(540, height));
colorDialog.setMaximumSize(new Dimension(Integer.MAX_VALUE, height));