本文整理汇总了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 );
}