public static Node lockDecorator(Node node, Document doc, String tooltipText) {
        if (doc instanceof HasNameProtectedProperty
        && !((HasNameProtectedProperty) doc).isNameProtected()) return node;

        node.setDisable(true);

        final StackPane pane = new StackPane();
        final ContextMenu menu = new ContextMenu();
        final MenuItem item = new MenuItem("Enable editing");
        final Tooltip tooltip = new Tooltip(tooltipText);
        
        Tooltip.install(pane, tooltip);
        menu.getItems().add(item);

        final EventHandler<MouseEvent> contextMenuToggle = (MouseEvent event) -> {
            if (event.isSecondaryButtonDown() && !menu.isShowing()) {
                menu.show(pane, event.getScreenX(), event.getScreenY());
            } else if (menu.isShowing()) {
                menu.hide();
            }
            event.consume();
        };
        final EventHandler<ActionEvent> menuItemClicked = (ActionEvent event) -> {
            Tooltip.uninstall(pane, tooltip);
            pane.removeEventHandler(MouseEvent.MOUSE_PRESSED, contextMenuToggle);
            node.setDisable(false);
            if (doc instanceof HasNameProtectedProperty) {
                ((HasNameProtectedProperty) doc)
                    .nameProtectedProperty().set(false);
            }
        };

        item.setOnAction(menuItemClicked);

        pane.setOnMousePressed(contextMenuToggle);
        pane.getChildren().add(node);
        return pane;
    }
Makes a node disabled by default, and requires that the user right-clicks
the node to enable it.
<p>
This decorator is intended to use on fields that can be edited, but
should only be edited under certain conditions, such as the Table.Name
field

@param node         the node to decorate
@param doc          the document
@param tooltipText  the tooltip text displayed while the node is disabled
@return             the decorated node, which will be wrapped in a StackPane
tool-parent/tool-propertyeditor/src/main/java/com/speedment/tool/propertyeditor/item/ItemUtil.java