Package org.rhq.coregui.client.bundle.group

Examples of org.rhq.coregui.client.bundle.group.BundleGroupSelector$SelectedBundleGroupsDataSource


            canvas.addMember(selector);
        }
    }

    private BundleGroupSelector getSelector(final Map<BundleGroup, Boolean> map, boolean readOnly) {
        BundleGroupSelector result;

        if (map.isEmpty()) {
            result = new BundleGroupSelector(readOnly);

        } else {
            Set<BundleGroup> bundleGroups = map.keySet();
            Integer[] idsFilter = new Integer[bundleGroups.size()];
            int i = 0;
            for (BundleGroup bundleGroup : bundleGroups) {
                idsFilter[i++] = bundleGroup.getId();
            }

            List<ListGridRecord> initiallyAssigned = new ArrayList<ListGridRecord>(bundleGroups.size());
            BundleGroupsDataSource ds = new BundleGroupsDataSource();
            for (BundleGroup bundleGroup : bundleGroups) {
                if (map.get(bundleGroup) == Boolean.TRUE) {
                    initiallyAssigned.add(ds.copyValues(bundleGroup));
                }
            }
            result = new BundleGroupSelector(idsFilter, initiallyAssigned.toArray(new ListGridRecord[initiallyAssigned
                .size()]), readOnly);
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.bundle.group.BundleGroupSelector$SelectedBundleGroupsDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.