org.netbeans.core.multiview/1 1.29

org.netbeans.core.spi.multiview
Annotation Type MultiViewElement.Registration


@Target(value={TYPE,METHOD})
@Retention(value=SOURCE)
public static @interface MultiViewElement.Registration

Registers a MultiViewElement, so it is available in MimeLookup and can be found and located by MultiViews.createCloneableMultiView(java.lang.String, T) and MultiViews.createMultiView(java.lang.String, T) factory methods.

The element class may have default constructor or a constructor that takes Lookup as an argument. Similarly for a factory method.


Required Element Summary
 String displayName
          Gets localized display name of multi view element.
 String[] mimeType
          Mime type this registration is associated with.
 int persistenceType
          Gets persistence type of multi view element, the TopComponent will decide on it's own persistenceType based on the sum of all it's elements.
 String preferredID
          A Description's contribution to unique TopComponent's Id returned by getID.
 
Optional Element Summary
 String iconBase
          Icon for the MultiViewDescription's multiview component.
 int position
          Position of this element amoung the list of other elements.
 

Element Detail

mimeType

public abstract String[] mimeType
Mime type this registration is associated with.

Returns:
array of mime types like "text/java", "text", etc.

persistenceType

public abstract int persistenceType
Gets persistence type of multi view element, the TopComponent will decide on it's own persistenceType based on the sum of all it's elements. TopComponent.PERSISTENCE_ALWAYS has higher priority than TopComponent.PERSISTENCE_ONLY_OPENED and TopComponent.PERSISTENCE_NEVER has lowest priority. The TopComponent will be stored only if at least one element requesting persistence was made visible.


displayName

public abstract String displayName
Gets localized display name of multi view element. Will be placed on the Element's toggle button.

Returns:
localized display name

preferredID

public abstract String preferredID
A Description's contribution to unique TopComponent's Id returned by getID. Returned value is used as starting value for creating unique TopComponent ID for whole enclosing multi view component. Value should be preferably unique, but need not be.

iconBase

public abstract String iconBase
Icon for the MultiViewDescription's multiview component. Will be shown as TopComponent's icon when this element is selected. If the icon is not provided, then the multiview component will use the icon provided by the first MultiViewDescription.

Returns:
the icon of multi view element
Default:
""

position

public abstract int position
Position of this element amoung the list of other elements.

Returns:
integer value
Default:
2147483647

org.netbeans.core.multiview/1 1.29

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