本文整理匯總了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 );
}
}
示例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);
}
示例3: getPersistenceType
@Override
public int getPersistenceType() {
return TopComponent.PERSISTENCE_NEVER;
}
示例4: getPersistenceType
public final int getPersistenceType() {
return TopComponent.PERSISTENCE_NEVER;
}
示例5: getPersistenceType
@Override public int getPersistenceType() {
return TopComponent.PERSISTENCE_NEVER;
}
示例6: getPersistenceType
/**
* This component is not persistent
* @return
*/
@Override
public int getPersistenceType() {
return TopComponent.PERSISTENCE_NEVER;
}
示例7: getPersistenceType
@Override
public int getPersistenceType() {
return TopComponent.PERSISTENCE_NEVER;
}
示例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;
}
示例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 );
}