org.netbeans.core.multiview/1 1.29

org.netbeans.core.api.multiview
Class MultiViews

java.lang.Object
  extended by org.netbeans.core.api.multiview.MultiViews

public final class MultiViews
extends Object

Factory class for handling multi views.


Method Summary
static
<T extends Serializable & Lookup.Provider>
CloneableTopComponent
createCloneableMultiView(String mimeType, T context)
          Factory method to create cloneable multiview for a given mime type.
static
<T extends Serializable & Lookup.Provider>
TopComponent
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findMultiViewHandler

public static MultiViewHandler findMultiViewHandler(TopComponent tc)
For advanced manipulation with Multiview component, the handler can be requested

Returns:
handle that one can use for manipulation with multiview component.

createMultiView

public static <T extends Serializable & Lookup.Provider> TopComponent createMultiView(String mimeType,
                                                                                     T context)
Factory method to create multiview for a given mime type. The list of MultiViewElements 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.

Parameters:
context - lookup provider representing the object to displayed in the multiview
mimeType - the mime type to seek for elements in
Returns:
multiview component
Since:
1.24

createCloneableMultiView

public static <T extends Serializable & Lookup.Provider> CloneableTopComponent createCloneableMultiView(String mimeType,
                                                                                                       T context)
Factory method to create cloneable multiview for a given mime type. The way to obtain individual elements is the same as in createMultiView(java.lang.String, T)

Parameters:
context - lookup representing the object to be displayed in the multiview
mimeType - the mime type to seek for elements in
Returns:
cloneable multiview component also implementing CloneableEditorSupport.Pane interface
Since:
1.24

org.netbeans.core.multiview/1 1.29

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.