Class ComponentPalette

java.lang.Object
org.praxislive.ide.pxr.api.ComponentPalette
All Implemented Interfaces:
AutoCloseable, org.praxislive.ide.core.api.Disposable

public final class ComponentPalette extends Object implements org.praxislive.ide.core.api.Disposable
Palette based on the supported-types property of the given container context.

Add the controller() to the editor lookup. Make sure to dispose when no longer needed to free up listeners on the context.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.praxislive.ide.model.ContainerProxy
    Query the current container context.
    void
    context(org.praxislive.ide.model.ContainerProxy container)
    Update the context to a different container.
    org.netbeans.spi.palette.PaletteController
    Access the palette controller.
    create(org.praxislive.ide.model.ContainerProxy container)
    Create a new component palette with the provided initial context.
    void
     
    org.openide.nodes.Node
    Access the root node of the palette.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.praxislive.ide.core.api.Disposable

    close
  • Method Details

    • context

      public void context(org.praxislive.ide.model.ContainerProxy container)
      Update the context to a different container.
      Parameters:
      container - container context or null
    • context

      public org.praxislive.ide.model.ContainerProxy context()
      Query the current container context.
      Returns:
      current context
    • controller

      public org.netbeans.spi.palette.PaletteController controller()
      Access the palette controller.
      Returns:
      palette controller
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.praxislive.ide.core.api.Disposable
    • root

      public org.openide.nodes.Node root()
      Access the root node of the palette.
      Returns:
      root node
    • create

      public static ComponentPalette create(org.praxislive.ide.model.ContainerProxy container)
      Create a new component palette with the provided initial context.
      Parameters:
      container - initial context
      Returns:
      component palette