Package org.woped.editor.controller

Examples of org.woped.editor.controller.RoleLayoutGrid


            }
         
            Iterator<?> it = lm.allCompoundRoles.iterator();
            while (it.hasNext()) {
              CompoundRole currentCompoundRole = (CompoundRole) it.next();
              RoleLayoutGrid grid = new RoleLayoutGrid(currentCompoundRole);
              grid.identifyTrueSubSets();
              grid.analyzeSubSets();
              if (grid.complexSubsets == false) {
                grid.removeTrueSubSets();
              }
              grid.identifyUsersWithSingleAncestor();
              grid.moveUsersWithSingleAncestors();
              grid.identifyUsersWithMultipleAncestors();
              grid.moveUsersWithMultipleAncestors();
              grid.adjustYAxis();
              Layout layout = grid.createLayout();
              layout.name = currentCompoundRole.name;
              RoleLayoutSet.add(layout);
            }
          }
         
          //Execute algorithm for the compound Groups
          if (lm.allGroups.size() > 0) {
           
            if (lm.allCompoundGroups.size() == 1) {
              boolean unrelatedGroup = false;
              Iterator<?> it = lm.allGroups.iterator();
              while (it.hasNext()) {
                Group currentGroup = (Group) it.next();
                Iterator<?> subit = currentGroup.ancestors.iterator();
                while (subit.hasNext()) {
                  CompoundGroup currentCompound = (CompoundGroup) subit.next();
                  if (currentCompound.name == "") {
                    unrelatedGroup = true;
                    break;
                  }
                }
                if (unrelatedGroup == true ) {
                  break;
                }
              }
              if (unrelatedGroup == true) {
                CompoundGroup allGroups = new CompoundGroup(Messages.getString("PetriNet.Resources.AllCompoundGroupsName"));
                allGroups.children.addAll(lm.allGroups);
                it = lm.allGroups.iterator();
                while (it.hasNext()) {
                  Group currentGroup = (Group) it.next();
                  currentGroup.ancestors.add(allGroups);
                }
                lm.allCompoundGroups.add(allGroups);
              }
            }
           
            else if (lm.allCompoundGroups.size() == 0) {
              CompoundGroup cg = new CompoundGroup(Messages.getString("PetriNet.Resources.DefaultCompoundGroupName"));
              cg.children.addAll(lm.allGroups);
              Iterator<?> it = lm.allGroups.iterator();
              while (it.hasNext()) {
                Group currentGroup = (Group) it.next();
                currentGroup.ancestors.add(cg);
              }
              lm.allCompoundGroups.add(cg);
            }

            else {
              CompoundGroup allGroups = new CompoundGroup(Messages.getString("PetriNet.Resources.AllCompoundGroupsName"));
              allGroups.children.addAll(lm.allGroups);
              Iterator<?> it = lm.allGroups.iterator();
              while (it.hasNext()) {
                Group currentGroup = (Group) it.next();
                currentGroup.ancestors.add(allGroups);
              }
              lm.allCompoundGroups.add(allGroups);
            }
         
            Iterator<?> it = lm.allCompoundGroups.iterator();
            while (it.hasNext()) {
              CompoundGroup currentCompoundGroup = (CompoundGroup) it.next();
              GroupLayoutGrid grid = new GroupLayoutGrid(currentCompoundGroup);
              grid.identifyTrueSubSets();
              grid.analyzeSubSets();
              if (grid.complexSubsets == false) {
                grid.removeTrueSubSets();
              }
              grid.identifyUsersWithSingleAncestor();
              grid.moveUsersWithSingleAncestors();
              grid.identifyUsersWithMultipleAncestors();
              grid.moveUsersWithMultipleAncestors();
              grid.adjustYAxis();
              Layout layout = grid.createLayout();
              layout.name = currentCompoundGroup.name;
              GroupLayoutSet.add(layout);
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.woped.editor.controller.RoleLayoutGrid

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.