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


Java MultiViewElement.getVisualRepresentation方法代码示例

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


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

示例1: addPropertyChangeListeners

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
private void addPropertyChangeListeners() {
    if( null != model ) {
        for (MultiViewDescription mvd : model.getDescriptions()) {
            if( mvd instanceof ContextAwareDescription && ((ContextAwareDescription)mvd).isSplitDescription() )
                continue; //#240371 - don't update name from spit elements
            
            MultiViewElement el = model.getElementForDescription( mvd, false );
            if (el == null) {
                continue;
            }
            if (el.getVisualRepresentation() instanceof Pane) {
                Pane pane = (Pane)el.getVisualRepresentation();
                final CloneableTopComponent tc = pane.getComponent();
                if (!Arrays.asList(tc.getPropertyChangeListeners()).contains(propListener)) {
                    tc.addPropertyChangeListener(propListener);
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:MultiViewPeer.java

示例2: updateName

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
public void updateName() {
    // is called before setMultiViewDescriptions() need to check for null.
    if (model != null) {
        for (MultiViewDescription mvd : model.getDescriptions()) {
            if( mvd instanceof ContextAwareDescription && ((ContextAwareDescription)mvd).isSplitDescription() )
                continue; //#240371 - don't update name from spit elements
            
            MultiViewElement el = model.getElementForDescription(
                mvd, MultiViewCloneableTopComponent.isSourceView(mvd)
            );
            if (el == null) {
                continue;
            }
            if (el.getVisualRepresentation() instanceof Pane) {
                Pane pane = (Pane)el.getVisualRepresentation();
                pane.updateName();
                final CloneableTopComponent tc = pane.getComponent();
                peer.setDisplayName(tc.getDisplayName());
                peer.setIcon(tc.getIcon());
                if (!Arrays.asList(tc.getPropertyChangeListeners()).contains(propListener)) {
                    tc.addPropertyChangeListener(propListener);
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:MultiViewPeer.java

示例3: getEditorPane

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
JEditorPane getEditorPane() {
    if (model != null) {
        MultiViewElement el = model.getActiveElement();
        if (el != null && el.getVisualRepresentation() instanceof Pane) {
            Pane pane = (Pane)el.getVisualRepresentation();
            return pane.getEditorPane();
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:MultiViewPeer.java

示例4: getEditorPane

import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
public javax.swing.JEditorPane getEditorPane() {
    if (peer == null || peer.model == null) {
        return null;
    }
    MultiViewElement paneEl = findPaneElement();
    if (paneEl != null) {
        CloneableEditorSupport.Pane pane = (CloneableEditorSupport.Pane)paneEl.getVisualRepresentation();
        return pane.getEditorPane();
    }
    // hopeless case, don't try to create new elements. it's users responsibility to
    // switch to the editor element before getEditorPane() 
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:MultiViewCloneableTopComponent.java


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