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