Class ComponentScopeEditor.BindingCompatibleNodeEditor

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Enclosing class:
ComponentScopeEditor

protected class ComponentScopeEditor.BindingCompatibleNodeEditor extends PerspectiveNodeEditor
This custom node editor is what extends the base Json Editor's node editor in order to add perspective-specific things like the binding control in the left-side gutter and the documentation and non-persistent indicators in the right-hand icon area.

It also listens to the component prop document model for any changes to the overall prop config for the scope, and updates the ui accordingly.

See Also:
  • Constructor Details

    • BindingCompatibleNodeEditor

      public BindingCompatibleNodeEditor(JsonEditor jsonEditor, int depth, @Nullable NodeEditor parentEditor, @Nullable DocumentNode node)
  • Method Details

    • onPropConfigChanged

      protected void onPropConfigChanged(PropertyConfigCollection newCollection)
    • onInit

      protected void onInit()
      Description copied from class: NodeEditor
      Subclasses may override this to provide custom initialization.
      Overrides:
      onInit in class NodeEditor
    • changeNodeType

      protected void changeNodeType(NodeType type)
      Called when the user requests a type change from the menu action item. Checks to see if the model will have any orphaned bindings caused by a type change and warns users before committing to the change.
      Overrides:
      changeNodeType in class NodeEditor
    • getObjectHelper

      protected Optional<JComponent> getObjectHelper(JsonSchema schema)
      Description copied from class: NodeEditor
      Called for object-typed nodes, in order to optionally create a helper component that will be added to the right of the object size indicator.
      Overrides:
      getObjectHelper in class NodeEditor
    • createValueEditor

      protected JComponent createValueEditor(DocumentNode node, MouseListener popupListener)
      Description copied from class: NodeEditor
      Called for "value" nodes, that is, nodes that are not objects or arrays, in order to create an editor for them.

      If your editor happens to implement NodeEditor.ValueEditorComponent, you'll get additional functionality like schema and ui lifecycle support

      Overrides:
      createValueEditor in class NodeEditor
      popupListener - Mouse listener to add to any interior components in order for the context menu to work correctly
      Returns:
      A component to use as the editor
    • onDestroy

      protected void onDestroy()
      Description copied from class: NodeEditor
      Subclasses may override this to do something when the editor is being destroyed
      Overrides:
      onDestroy in class NodeEditor
    • initContextMenu

      protected void initContextMenu(JPopupMenu menu)
      Description copied from class: NodeEditor
      Called to initialize the context menu at the very end (to add actions after the cut, copy, paste, delete, and type actions.
      Overrides:
      initContextMenu in class NodeEditor
    • getAddChildText

      protected String getAddChildText(DocumentNode parent)
      Overrides:
      getAddChildText in class NodeEditor
    • openBindingEditor

      protected void openBindingEditor(@Nullable BindingConfig binding)