本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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);
}
示例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)));
}
}
示例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;
}
示例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;
}
示例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;
}
示例13: accept
import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public boolean accept(final RegistryNode node) {
return true;
}
示例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;
}
示例15: SubTreeFilter
import org.netbeans.installer.product.RegistryNode; //导入依赖的package包/类
public SubTreeFilter(List<? extends RegistryNode> nodes) {
this.leaves = new LinkedList<RegistryNode>();
this.leaves.addAll(nodes);
}