public final class MultiViews extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Serializable & Lookup.Provider> |
createCloneableMultiView(String mimeType,
T context)
Factory method to create cloneable multiview for a given mime type.
|
static <T extends Serializable & Lookup.Provider> |
createMultiView(String mimeType,
T context)
Factory method to create multiview for a given mime type.
|
static MultiViewHandler |
findMultiViewHandler(TopComponent tc)
For advanced manipulation with Multiview component, the handler can be requested
|
public static MultiViewHandler findMultiViewHandler(TopComponent tc)
public static <T extends Serializable & Lookup.Provider> TopComponent createMultiView(String mimeType, T context)
MultiViewElement
s to display is taken from MimeLookup.getLookup(org.netbeans.api.editor.mimelookup.MimePath)
.
The context
parameter has to be Serializable, so the top component
can be persisted and later, when deserialized, it can again recreate the
Lookup
. Suitable candidate for an object that implements both
Serializable
as well as Lookup.Provider
is
DataObject.
To register your elements into particular mime type see MultiViewElement.Registration
.context
- lookup provider representing the object to displayed in the multiviewmimeType
- the mime type to seek for elements inpublic static <T extends Serializable & Lookup.Provider> CloneableTopComponent createCloneableMultiView(String mimeType, T context)
MultiViews.createMultiView(java.lang.String, T)
context
- lookup representing the object to be displayed in the multiviewmimeType
- the mime type to seek for elements inCloneableEditorSupport.Pane
interface