本文整理汇总了Java中org.openide.util.lookup.AbstractLookup.Content方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractLookup.Content方法的具体用法?Java AbstractLookup.Content怎么用?Java AbstractLookup.Content使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.util.lookup.AbstractLookup
的用法示例。
在下文中一共展示了AbstractLookup.Content方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContent
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
private static AbstractLookup.Content getContent() {
InstanceContent c = new InstanceContent();
c.add(UT);
c.add(ActionsInfraHid.class.getClassLoader());
c.add(new NbMutexEventProvider());
return c;
}
示例2: OverFiles
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
private OverFiles(String path, List<FOItem> items, AbstractLookup lkp, AbstractLookup.Content cnt) {
super(computeDelegates(path, items, lkp));
this.path = path;
this.lkp = lkp;
this.content = cnt;
this.content.setPairs(order(items));
FileSystem fs = null;
try {
fs = FileUtil.getSystemConfigRoot().getFileSystem();
} catch (FileStateInvalidException ex) {
Exceptions.printStackTrace(ex);
}
this.weakL = FileUtil.weakFileChangeListener(this, fs);
fs.addFileChangeListener(weakL);
}
示例3: getEnvironment
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public Lookup getEnvironment(DataObject obj) {
failure = true;
return new AbstractLookup (new AbstractLookup.Content ());
}
示例4: GlobalLookup4TestImpl
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public GlobalLookup4TestImpl (AbstractLookup.Content content) {
super(content);
}
示例5: updateLookups
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
/** Extracts activated nodes from a top component and
* returns their lookups.
*/
public void updateLookups(Node[] arr) {
if (arr == null) {
AbstractLookup.Content c = new AbstractLookup.Content();
AbstractLookup l = new AbstractLookup(c);
c.addPair(new NoNodesPair());
setLookups(new Lookup[] { l, actionMap });
return;
}
Lookup[] lookups = new Lookup[arr.length];
Map<Lookup,Lookup.Result> copy;
synchronized (this) {
if (attachedTo == null) {
copy = Collections.emptyMap();
} else {
copy = new HashMap<Lookup,Lookup.Result>(attachedTo);
}
}
for (int i = 0; i < arr.length; i++) {
lookups[i] = arr[i].getLookup();
if (copy != null) {
// node arr[i] remains there, so do not remove it
copy.remove(arr[i]);
}
}
for (Iterator<Lookup.Result> it = copy.values().iterator(); it.hasNext();) {
Lookup.Result res = it.next();
res.removeLookupListener(listener);
}
synchronized (this) {
attachedTo = null;
}
setLookups(new Lookup[] { new NoNodeLookup(new ProxyLookup(lookups), arr), Lookups.fixed((Object[])arr), actionMap, });
}
示例6: CompatFileExtrasLkp
import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public CompatFileExtrasLkp(AbstractLookup.Content content) {
super(content);
this.ic = (InstanceContent)content;
}