Package org.praxislive.ide.pxr.api
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 TypeMethodDescriptionorg.praxislive.ide.model.ContainerProxycontext()Query the current container context.voidcontext(org.praxislive.ide.model.ContainerProxy container) Update the context to a different container.org.netbeans.spi.palette.PaletteControllerAccess the palette controller.static ComponentPalettecreate(org.praxislive.ide.model.ContainerProxy container) Create a new component palette with the provided initial context.voiddispose()org.openide.nodes.Noderoot()Access the root node of the palette.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
disposein interfaceorg.praxislive.ide.core.api.Disposable
-
root
public org.openide.nodes.Node root()Access the root node of the palette.- Returns:
- root node
-
create
Create a new component palette with the provided initial context.- Parameters:
container- initial context- Returns:
- component palette
-