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


Java AbstractLookup.Content方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ActionsInfraHid.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:RecognizeInstanceFiles.java

示例3: getEnvironment

import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public Lookup getEnvironment(DataObject obj) {
    failure = true;
    return new AbstractLookup (new AbstractLookup.Content ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:InstanceDataObjectTest.java

示例4: GlobalLookup4TestImpl

import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public GlobalLookup4TestImpl (AbstractLookup.Content content) {
    super(content);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:NavigatorTCTest.java

示例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, });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:46,代码来源:DefaultTopComponentLookup.java

示例6: CompatFileExtrasLkp

import org.openide.util.lookup.AbstractLookup; //导入方法依赖的package包/类
public CompatFileExtrasLkp(AbstractLookup.Content content) {
    super(content);
    this.ic = (InstanceContent)content;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:CompatFileExtrasLkp.java


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