Package org.mt4j.components.clusters

Examples of org.mt4j.components.clusters.Cluster.removeChild()


                    //Remove component from cluster it is in
                    Cluster clusterOfComponent = clusterMgr.getCluster(sourceComp);
                    if (clusterOfComponent != null){
                      ((IdragClusterable)sourceComp).setSelected(false);
                      //Remvove the component from its former selection
                      clusterOfComponent.removeChild(sourceComp);
                     
                      //System.out.println("Comp destroyed and removed from cluster: " + sourceComp.getName());
                     
                      //remove the former selection from the selectionmanager if it consists only of 1 less components
                      if (clusterOfComponent.getChildCount() <= 2){
View Full Code Here


////////////////////////////////
             
              //Remove comp from former selection if it is in a new selection
              Cluster formerSelection = clusterMgr.getCluster(currentComp);
              if (formerSelection != null){
                formerSelection.removeChild(mtCurrentComp);
                //Remove the former selection from the selectionmanager if it consists only of 1 less components
                if (formerSelection.getChildCount() <= 2){ //2 because the selection polygon is also always in the selection
//                  SceneManager.getInstance().getCurrentScene().getMainCanvas().getSelectionManager().removeSelection(formerSelection);
                  clusterMgr.removeCluster(formerSelection);
                }else{
View Full Code Here

              //Remove comp from former selection if it is in a new selection
              Cluster formerSelection = clusterMgr.getCluster(currentComp);
              if (formerSelection != null){
                currentComp.setSelected(false);
                //Remvove the component from its former selection
                formerSelection.removeChild((MTComponent)currentComp);
                //remove the former selection from the selectionmanager if it consists only of 1 less components
                if (formerSelection.getChildCount() <= 2){
                  clusterMgr.removeCluster(formerSelection);
                }else{
                  //Tighten convex hull of reduced cluster
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.