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


Java DataNode类代码示例

本文整理汇总了Java中org.openide.loaders.DataNode的典型用法代码示例。如果您正苦于以下问题:Java DataNode类的具体用法?Java DataNode怎么用?Java DataNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: PaletteItemNode

import org.openide.loaders.DataNode; //导入依赖的package包/类
PaletteItemNode(DataNode original, 
                String name, 
                String bundleName, 
                String displayNameKey, 
                String className, 
                String tooltipKey, 
                String icon16URL, 
                String icon32URL, 
                InstanceContent content) 
{
    super(original, Children.LEAF, new ProxyLookup(( new Lookup[] {new AbstractLookup(content), original.getLookup()})));
    
    content.add( this );
    this.name = name;
    this.bundleName = bundleName; 
    this.displayNameKey = displayNameKey;
    this.className = className;
    this.tooltipKey = tooltipKey;
    this.icon16URL = icon16URL;
    this.icon32URL = icon32URL;
    
    this.originalDO = original.getLookup().lookup(DataObject.class);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:PaletteItemNode.java

示例2: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    return new DataNode(this, Children.LEAF, getLookup()) {
        @Override
        public Action getPreferredAction() {
            for(Action a : getActions(true)) {
                if (a == null) {
                    continue;
                }
                if (a.isEnabled()) {
                    if (a instanceof FXMLOpenAction) {
                        return a;
                    } else if (a instanceof FXMLEditAction) {
                        return a;
                    }
                }
            }
            return super.getPreferredAction();
        }
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:FXMLDataObject.java

示例3: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    return new DataNode(this, 
                        Children.create(new RootNodeFactory(this), true),
                        new ProxyLookup(getLookup(),abstractLookup))   {

        @Override
        public String getHtmlDisplayName() {
                    StringBuilder sb = new StringBuilder();
                    sb.append(R.HTML_R_Node);
                    sb.append(EGTaskDataObjectDataObject.this.getPrimaryFile().getName());
                    sb.append(R.HTML_CL_R_Node);
                    return sb.toString();
        }           
    };
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:17,代码来源:EGTaskDataObjectDataObject.java

示例4: createPaletteItemNode

import org.openide.loaders.DataNode; //导入依赖的package包/类
private PaletteItemNode createPaletteItemNode(PaletteItemHandler handler) {

            String name = xmlDataObject.getName();
            
            InstanceContent ic = new InstanceContent();
            String s = handler.getClassName();
            if (s != null)
                ic.add(s, ActiveEditorDropProvider.getInstance());
            else {
                s = handler.getBody();
                if (s != null)
                    ic.add(s, ActiveEditorDropDefaultProvider.getInstance());
            }
            
            return (null == handler.getDisplayName())
                ? new PaletteItemNode(
                    new DataNode(xmlDataObject, Children.LEAF), 
                    name, 
                    handler.getBundleName(), 
                    handler.getDisplayNameKey(), 
                    handler.getClassName(), 
                    handler.getTooltipKey(), 
                    handler.getIcon16URL(), 
                    handler.getIcon32URL(), 
                    ic )
                : new PaletteItemNode(
                        new DataNode(xmlDataObject, Children.LEAF), 
                        name, 
                        handler.getDisplayName(), 
                        handler.getTooltip(), 
                        handler.getIcon16URL(), 
                        handler.getIcon32URL(), 
                        ic );
        }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:PaletteEnvironmentProvider.java

示例5: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    return new DataNode(this, Children.LEAF, getLookup());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:HintDataObject.java

示例6: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
protected @Override Node createNodeDelegate() {
    Node base = new DataNode(this, Children.LEAF, getLookup());
    LayerHandle handle = lkp.lookup(LayerHandle.class);
    return handle != null ? new LayerNode(base, handle, false) : base;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:LayerDataObject.java

示例7: getHelpCtx

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
public HelpCtx getHelpCtx() {
    DataNode dn = (DataNode) getOriginal();
    Object helpId = dn.getDataObject().getPrimaryFile().getAttribute("helpId"); //NOI18N
    return (helpId == null ? super.getHelpCtx() : new HelpCtx(helpId.toString()));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:PaletteItemNode.java

示例8: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate () {
    DataNode node = new DataNode (this, Children.LEAF, getLookup ());
    return node;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:DiffDataObject.java

示例9: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected org.openide.nodes.Node createNodeDelegate() {
    DataNode n = new HtmlDataNode(this, Children.LEAF);
    n.setIconBaseWithExtension("org/netbeans/modules/html/htmlObject.png"); // NOI18N
    return n;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:HtmlDataObject.java

示例10: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    DataNode dn = new DataNode(this, Children.LEAF, getLookup());
    dn.setIconBaseWithExtension("cz/cuni/pogamut/posh/POSH_icon.png");
    return dn;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:7,代码来源:PoshDataObject.java

示例11: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    return new ApkFilterNode(new DataNode(this, Children.LEAF, getLookup()));
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:5,代码来源:ApkDataObject.java

示例12: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    DataNode node = new DataNode(this, Children.LEAF, getLookup());
    return node;
}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:6,代码来源:CfgPropsDataObject.java

示例13: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
    DataNode node = new DataNode(this, Children.LEAF, getLookup());
    node.setIconBaseWithExtension("com/jme3/gde/gui/multiview/icons/gui-icon.png");
    return node;
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:7,代码来源:NiftyGuiDataObject.java

示例14: restored

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
    public void restored() {
        // Force always showing file extensions for Nodes representing files on disk.
        DataNode.setShowFileExtensions(true);
        
        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {

            @Override
            public void run() {
                
                
                TopComponent projectExplorer = WindowManager.getDefault().findTopComponent(PROJECT_LOGICAL_TAB_ID);
                if (!projectExplorer.isOpened()) {
                    projectExplorer.open();
                    projectExplorer.requestActive();
                }
            }
        });
        
        // This was the solution to change BeanTree view of the Projects tab to Outline view.

//        final String PROJECT_LOGICAL_TAB_ID = "projectTabLogical_tc";
//        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
//            @Override
//            public void run() {
//                RequestProcessor.getDefault().post(new Runnable() {
//                    @Override
//                    public void run() {
//                        //We must do this in the awt thread
//                        SwingUtilities.invokeLater(new Runnable() {
//                            @Override
//                            public void run() {
//                                TopComponent findTopComponent = WindowManager.getDefault().findTopComponent(PROJECT_LOGICAL_TAB_ID); // TODO add your handling code here:
//                                findTopComponent.setVisible(false);
//                                findTopComponent.removeAll();
//                                findTopComponent.setLayout(new BorderLayout());
//                                OutlineView myView2 = new OutlineView("Filename");
//                                Outline outline2 = myView2.getOutline();
//                                outline2.setRootVisible(false);
//                                outline2.setTableHeader(null);
//                                findTopComponent.add(myView2, BorderLayout.CENTER);
//                                findTopComponent.setVisible(true);
//                                findTopComponent.open();
//                                findTopComponent.requestActive();
//                            }
//                        });
//                    }
//                    //This delay is important!
//                }, 1000);
//            }
//        });
    }
 
开发者ID:chhh,项目名称:batmass,代码行数:53,代码来源:Installer.java

示例15: createNodeDelegate

import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
   protected Node createNodeDelegate()
   {
return new DataNode(this, Children.LEAF, getLookup());
   }
 
开发者ID:tcolar,项目名称:fantomidemodule,代码行数:6,代码来源:AxonDataObject.java


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