站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

MultiViewDescription (MultiView Windows) - NetBeans API Javadoc (Current Development Version)

org.netbeans.core.multiview/1 1.9

org.netbeans.core.spi.multiview
Interface MultiViewDescription


public interface MultiViewDescription

Description of multi view element. Implementations should be lightweight and fast. Creating heavyweight MultiViewElement instances asociated with Swing visual representation should be done lazily in createElement() methods. The implementing class should be serializable. For performance reasons, don't include the element into serialization of the description. That one will be handled separately when necessary.


Method Summary
 MultiViewElement createElement()
          Creates and returns asociated multi view element.
 String getDisplayName()
          Gets localized display name of multi view element.
 HelpCtx getHelpCtx()
          Get the help context of multi view element.
 Image getIcon()
          Icon for the MultiViewDescription's multiview component.
 int getPersistenceType()
          Gets persistence type of multi view element, the TopComponent will decide on it's onw persistenceType based on the sum of all it's elements.
 String preferredID()
          A Description's contribution to unique TopComponent's Id returned by getID.
 

Method Detail

getPersistenceType

int getPersistenceType()
Gets persistence type of multi view element, the TopComponent will decide on it's onw 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.


getDisplayName

String getDisplayName()
Gets localized display name of multi view element. Will be placed on the Element's toggle button.

Returns:
localized display name

getIcon

Image getIcon()
Icon for the MultiViewDescription's multiview component. Will be shown as TopComponent's icon when this element is selected.

Returns:
the icon of multi view element

getHelpCtx

HelpCtx getHelpCtx()
Get the help context of multi view element.


preferredID

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.


createElement

MultiViewElement createElement()
Creates and returns asociated multi view element. it is called just once during the lifecycle of the multiview component.

Returns:
the multiview element associated with this description

org.netbeans.core.multiview/1 1.9

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.