當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。