当前位置: 首页>>代码示例>>Java>>正文


Java TopComponent.PERSISTENCE_NEVER属性代码示例

本文整理汇总了Java中org.openide.windows.TopComponent.PERSISTENCE_NEVER属性的典型用法代码示例。如果您正苦于以下问题:Java TopComponent.PERSISTENCE_NEVER属性的具体用法?Java TopComponent.PERSISTENCE_NEVER怎么用?Java TopComponent.PERSISTENCE_NEVER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.openide.windows.TopComponent的用法示例。


在下文中一共展示了TopComponent.PERSISTENCE_NEVER属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: add

/**
 * Track the given window
 * @param tc TopComponent
 * @param mode Mode the window is docked to
 */
void add( TopComponent tc, ModeImpl mode ) {
    if( tc.getPersistenceType() == TopComponent.PERSISTENCE_NEVER )
        return;
    String tcId = WindowManagerImpl.getInstance().findTopComponentID( tc );
    if( null == tcId )
        return;
    if( viewIds.contains( tcId ) || editorIds.contains( tcId ) )
        return;
    if( mode.getKind() != Constants.MODE_KIND_EDITOR ) {
        if( editors.contains( tc ) ) {
            editorIds.add( tcId );
        } else {
            viewIds.add( tcId );
        }
    } else {
        editors.add( tc );
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:TopComponentTracker.java

示例2: forPOMEditor

@MultiViewElement.Registration(
    displayName="#TAB_Effective",
    iconBase=POMDataObject.POM_ICON,
    persistenceType=TopComponent.PERSISTENCE_NEVER,
    preferredID="effectivePom",
    mimeType=Constants.POM_MIME_TYPE,
    position=101
)
@Messages("TAB_Effective=Effective")
public static MultiViewElement forPOMEditor(final Lookup editor) {
    return new EffPOMView(editor);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:EffectivePomMD.java

示例3: getPersistenceType

@Override
public int getPersistenceType() {
    return TopComponent.PERSISTENCE_NEVER;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:BasicArtifactMD.java

示例4: getPersistenceType

public final int getPersistenceType() {
    return TopComponent.PERSISTENCE_NEVER;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:ProfilingPointReport.java

示例5: getPersistenceType

@Override public int getPersistenceType() {
    return TopComponent.PERSISTENCE_NEVER;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:BasicPomMD.java

示例6: getPersistenceType

/**
 * This component is not persistent
 * @return
 */
@Override
public int getPersistenceType() {
    return TopComponent.PERSISTENCE_NEVER;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:8,代码来源:PureMapTopComponent.java

示例7: getPersistenceType

@Override
public int getPersistenceType() {
	return TopComponent.PERSISTENCE_NEVER;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:4,代码来源:MVMapDescription.java

示例8: isTopComponentProbablyPersistent

/** Tests if given top component with specified stringId is persistent.
 * This is used to split TopComponents to 2 groups:
 * First group contains all persistent TopComponents (default) and all 
 * TopComponents which could be persistent client property is set 
 * to persistent only when opened.
 * Second group contains TopComponents which are never persistent.
 * @param tc top component in question
 * @return true if component is persistent (which is by default) or it can be
 * persistent when opened.
 */
private boolean isTopComponentProbablyPersistent (TopComponent tc) {
    int persistenceType = persistenceType(tc);
    if (TopComponent.PERSISTENCE_NEVER == persistenceType) {
        return false;
    }
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:PersistenceManager.java

示例9: isViewTopComponent

/**
 * Check whether the given TopComponent is an editor window or a view window.
 * @param tc
 * @return True if the given TopComponent has persistence type <code>PERSISTENCE_ALWAYS</code>
 * or <code>PERSISTENCE_ONLY_OPENED</code> and was initially opened in a view or
 * sliding mode. Also returns true if the given TopComponent has peristence type
 * <code>PERSISTENCE_NEVER</code> and is docked in non-editor mode.
 * Returns false in all other cases.
 */
public boolean isViewTopComponent( TopComponent tc ) {
    if( tc.getPersistenceType() == TopComponent.PERSISTENCE_NEVER ) {
        ModeImpl mode = ( ModeImpl ) WindowManagerImpl.getInstance().findMode( tc );
        return null != mode && mode.getKind() != Constants.MODE_KIND_EDITOR;
    }
    String id = WindowManagerImpl.getInstance().findTopComponentID( tc );
    return id != null && viewIds.contains( id );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:TopComponentTracker.java


注:本文中的org.openide.windows.TopComponent.PERSISTENCE_NEVER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。