本文整理汇总了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);
}
示例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();
}
};
}
示例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();
}
};
}
示例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 );
}
示例5: createNodeDelegate
import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
return new DataNode(this, Children.LEAF, getLookup());
}
示例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;
}
示例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()));
}
示例8: createNodeDelegate
import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate () {
DataNode node = new DataNode (this, Children.LEAF, getLookup ());
return node;
}
示例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;
}
示例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;
}
示例11: createNodeDelegate
import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
return new ApkFilterNode(new DataNode(this, Children.LEAF, getLookup()));
}
示例12: createNodeDelegate
import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate() {
DataNode node = new DataNode(this, Children.LEAF, getLookup());
return node;
}
示例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;
}
示例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);
// }
// });
}
示例15: createNodeDelegate
import org.openide.loaders.DataNode; //导入依赖的package包/类
@Override
protected Node createNodeDelegate()
{
return new DataNode(this, Children.LEAF, getLookup());
}