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


Java MultiViewElement.componentDeactivated方法代码示例

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


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

示例1: selectionChanged

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
public void selectionChanged(MultiViewDescription oldOne, MultiViewDescription newOne) {
    if (isActivated()) {
        MultiViewElement el = model.getElementForDescription(oldOne);
        el.componentDeactivated();
    }
    hideElement(oldOne);
    showCurrentElement();
    delegateUndoRedo.updateListeners(model.getElementForDescription(oldOne),
                                     model.getElementForDescription(newOne));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:MultiViewPeer.java

示例2: peerClearSplit

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
void peerClearSplit(int splitElementToActivate) {
MultiViewDescription activeDescription = null;
       if( splitElementToActivate < 0 || splitElementToActivate >= topBottomDescriptions.length ) {
           activeDescription = model.getActiveDescription();
           if( null == activeDescription )
               activeDescription = topBottomDescriptions[0]; //just being paranoid
       } else {
           activeDescription = topBottomDescriptions[splitElementToActivate];
       }

       MultiViewDescription toDeactivate = activeDescription == topBottomDescriptions[0]
               ? topBottomDescriptions[1] : topBottomDescriptions[0];
       if( activeDescription == topBottomDescriptions[1] ) {
           //the description to be activated is actually a split copy so find the original non-split one
           MultiViewDescription[] descriptions = model.getDescriptions();
           for( int i=1; i<descriptions.length; i++ ) {
               if( descriptions[i] == activeDescription ) {
                   activeDescription = descriptions[i-1];
                   break;
               }
           }
       }
Toolkit.getDefaultToolkit().removeAWTEventListener(getAWTEventListener());
splitPane.removePropertyChangeListener(splitterPropertyChangeListener);
removeAll();
splitPane = null;
topBottomDescriptions = null;
isTopLeft = true;
topLeftComponent = null;
bottomRightComponent = null;
alreadyAddedElementsSplit = null;
awtEventListener = null;
barSplit = null;
cardLayoutSplit = null;
componentPanelSplit = null;
toolbarPanelSplit = null;
splitterPropertyChangeListener = null;

add(bar, BorderLayout.NORTH);
       if( null != layerUI ) {
           add(new JLayer( componentPanel, layerUI ), BorderLayout.CENTER);
       } else {
           add(componentPanel, BorderLayout.CENTER);
       }
       MultiViewElement mve = model.getElementForDescription( toDeactivate );
       mve.componentDeactivated();
       mve.componentHidden();
model.setActiveDescription(activeDescription);
       syncButtonsWithModel();
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:51,代码来源:TabsComponent.java


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