Package jmt.gui.jmodel.JGraphMod

Examples of jmt.gui.jmodel.JGraphMod.BlockingRegion


    // Checks if all children of a blocking region have been removed
    Iterator<Object> it = regions.iterator();
    while (it.hasNext()) {
      jmtCells.add(null);
      BlockingRegion region = (BlockingRegion) it.next();
      List child = region.getChildren();
      boolean empty = true;
      for (int i = 0; i < child.size(); i++) {
        if (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {
          empty = false;
          break;
        }
      }
      if (empty) {
        model.deleteBlockingRegion(region.getKey());
        graphmodel.remove(new Object[] { region });
      }
    }

    // Removes cells from data structure
View Full Code Here


  /**
   * Adds given JmtCells to a freshly created blocking station. This method will not modify
   * data structure and is used during load operation
   */
  public void addCellsToBlockingRegion(Object[] cells, Object regionKey) {
    BlockingRegion bl = new BlockingRegion(this, regionKey);
    bl.addStations(cells);
  }
View Full Code Here

      }
    }
    // If blocking region can be added, adds it to graph window, otherwise
    // deletes it
    if (canBeAdded && stations.size() > 0) {
      BlockingRegion bl = new BlockingRegion(this, regionKey);
      Object[] stationCells = stations.keySet().toArray();
      bl.addStations(stationCells);
      // Adds stations to blocking region into data structure
      for (Object stationCell : stationCells) {
        model.addRegionStation(regionKey, stations.get(stationCell));
      }
    } else {
View Full Code Here

        // Resets parent for this cell
        cell.resetParent();
      }
      // Avoid insertion of a blocking region in an other
      else if (cell2 instanceof BlockingRegion) {
        BlockingRegion region = (BlockingRegion) cell2;
        if (region.getParent() != null) {
          region.removeFromParent();
          graph.getModel().insert(new Object[] { region }, null, null, null, null);
        }
      }
    }
    // Puts cells removed from blocking regiont on background
View Full Code Here

TOP

Related Classes of jmt.gui.jmodel.JGraphMod.BlockingRegion

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.