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


Java RegistryNode类代码示例

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


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

示例1: getStatus

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public Status getStatus() {
    if(currentStatus == null && !isEmpty()) {                            
        final List<Status> statuses = new ArrayList<Status>();
        for (RegistryNode node: getVisibleChildren()) {
            if (node instanceof Group) {
               statuses.add(((Group)node).getStatus());
            } 
            if (node instanceof Product) {
               statuses.add(((Product)node).getStatus());
            }
        }            
        //todo
        currentStatus = statuses.contains(Status.TO_BE_INSTALLED) ||
               statuses.contains(Status.NOT_INSTALLED)? 
                   Status.TO_BE_INSTALLED : Status.INSTALLED;
    }        
    return currentStatus;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:Group.java

示例2: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    for (RegistryFilter filter: filters) {
        if (filter.accept(node)) {
            return true;
        }
    }
    
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:OrFilter.java

示例3: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    if (leaves.contains(node)) {
        return true;
    }
    
    for (RegistryNode leaf: leaves) {
        if (node.isAncestor(leaf)) {
            return true;
        }
    }
    
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:SubTreeFilter.java

示例4: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    if (node instanceof Group) {
        Group group = (Group) node;
        if (uid != null) {
            if (!group.getUid().equals(uid)) {
                return false;
            }
        }
        
        return true;
    }
    
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:GroupFilter.java

示例5: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    for (RegistryFilter filter: filters) {
        if (!filter.accept(node)) {
            return false;
        }
    }
    
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AndFilter.java

示例6: isEmpty

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean isEmpty() {
    for (RegistryNode node: getVisibleChildren()) {
        if (node instanceof Group) {
            if (!((Group) node).isEmpty()) {
                return false;
            }
        } else {
            return false;
        }
    }
    
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Group.java

示例7: setStatus

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public void setStatus(final Status status) {               
    currentStatus = status;
   
    for (RegistryNode node: getVisibleChildren()) {
        if(node instanceof StatusInterface && 
                ((StatusInterface)node).getStatus()!= Status.INSTALLED) {
            ((StatusInterface)node).setStatus(status);
        }            
    }        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:Group.java

示例8: updateDescription

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
private void updateDescription() {
    final TreePath path = componentsTree.getSelectionPath();
    
    if (path != null) {
        final RegistryNode node = (RegistryNode) path.getLastPathComponent();
        descriptionPane.setText(node.getDescription());
    } else {
        descriptionPane.clearText();
    }
    
    descriptionPane.setCaretPosition(0);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ComponentsSelectionPanel.java

示例9: updateSizes

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
private void updateSizes() {
    final Registry registry = Registry.getInstance();
    
    long installationSize = 0;
    long downloadSize     = 0;
    for (Product product: registry.getProductsToInstall()) {
        installationSize += product.getRequiredDiskSpace();
        downloadSize += product.getDownloadSize();
    }
    
    String template = panel.getProperty(SIZES_LABEL_TEXT_NO_DOWNLOAD_PROPERTY);
    for (RegistryNode remoteNode: registry.getNodes(RegistryType.REMOTE)) {
        if (remoteNode.isVisible()) {
            template = panel.getProperty(
                    SIZES_LABEL_TEXT_PROPERTY);
        }
    }
    
    if (installationSize == 0) {
        sizesLabel.setText(StringUtils.format(
                template,
                panel.getProperty(DEFAULT_INSTALLATION_SIZE_PROPERTY),
                panel.getProperty(DEFAULT_DOWNLOAD_SIZE_PROPERTY)));
    } else {
        sizesLabel.setText(StringUtils.format(
                template,
                StringUtils.formatSize(installationSize),
                StringUtils.formatSize(downloadSize)));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:ComponentsSelectionPanel.java

示例10: getProducts

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
private List<Product> getProducts(RegistryNode root) {
    final List<Product> list = new LinkedList<Product>();
    
    for (RegistryNode node: root.getChildren()) {
        if (node instanceof Product) {
            list.add((Product) node);
        }
        
        list.addAll(getProducts(node));
    }
    
    return list;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Components2.java

示例11: getGroups

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
private List<Group> getGroups(RegistryNode root) {
    final List<Group> list = new LinkedList<Group>();
    
    for (RegistryNode node: root.getChildren()) {
        if (node instanceof Group) {
            list.add((Group) node);
        }
        
        list.addAll(getGroups(node));
    }
    
    return list;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Components2.java

示例12: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    if (node.getIconUri().getLocal() != null) {
        if (node.getIconUri().getLocal().getScheme().equals("file")) {
            node.getIconUri().setLocal(null);
        }
    }
    
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:IconCorrectingFilter.java

示例13: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:TrueFilter.java

示例14: accept

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
    if (node instanceof Product) {
        final Product product = (Product) node;
        
        if (uid != null) {
            if (!product.getUid().equals(uid)) {
                return false;
            }
        }
        
        if ((versionLower != null) && (versionUpper != null)) {
            if (!product.getVersion().newerOrEquals(versionLower) ||
                    !product.getVersion().olderOrEquals(versionUpper)) {
                return false;
            }
        }
        
        if (platforms.size() > 0) {
            boolean intersects = false;
            
            for (Platform platform: platforms) {
                for (Platform productPlatform: product.getPlatforms()) {
                    if (platform.isCompatibleWith(productPlatform) || 
                            productPlatform.isCompatibleWith(platform)) {
                        intersects = true;
                    }
                }
                
                if (intersects) break;
            }
            
            if (!intersects) return false;
        }
        
        if (status != null) {
            if (product.getStatus() != status) {
                return false;
            }
        }
        
        if (detailedStatus != null) {
            if (product.getDetailedStatus() != detailedStatus) {
                return false;
            }
        }
        
        if (feature != null) {
            for (String id: product.getFeatures()) {
                if (feature.getId().equals(id)) {
                    return false;
                }
            }
        }
        
        if (visible != null) {
            if (product.isVisible() != visible.booleanValue()) {
                return false;
            }
        }
        
        return true;
    }
    
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:66,代码来源:ProductFilter.java

示例15: SubTreeFilter

import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public SubTreeFilter(List<? extends RegistryNode> nodes) {
    this.leaves = new LinkedList<RegistryNode>();
    this.leaves.addAll(nodes);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:SubTreeFilter.java


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