Examples of JMTPoint


Examples of jmt.gui.jmodel.definitions.JMTPoint

      y = Double.parseDouble(position.getAttribute(XML_A_POSITION_Y));
      if (position.hasAttribute(XML_A_POSITION_ROTATE)) {
        rotate = Boolean.TRUE.toString().equalsIgnoreCase(position.getAttribute(XML_A_POSITION_ROTATE));
      }
      if (names.containsKey(name)) {
        model.setStationPosition(names.get(name), new JMTPoint(x, y, rotate));
      } else {
        System.out.println("Error - Found position info for station '" + name + "' which is not present into current model.");
      }
    }
  }
View Full Code Here

Examples of jmt.gui.jmodel.definitions.JMTPoint

    for (Object cell : cells) {
      if (cell instanceof JmtCell) {
        JmtCell jcell = (JmtCell) cell;
        key = ((CellComponent) jcell.getUserObject()).getKey();
        // Sets cell coordinate into data structure
        model.setStationPosition(key, new JMTPoint(getCellCoordinates(jcell), !jcell.isLeftInputCell()));
      }
    }
  }
View Full Code Here

Examples of jmt.gui.jmodel.definitions.JMTPoint

    int colCount = (graph.getHeight() - 2 * Y0) / Y;
    boolean containPosition = true;
    // Shows stations
    for (Object station : stations) {
      cell = cellFactory.createStationCell(station);
      JMTPoint position = model.getStationPosition(station);
      // If position is not present, auto-position this station

      while (position == null) {
        containPosition = false;
        JMTPoint tmp = new JMTPoint(X0 + X * (count / colCount), Y0 + Y * (count % colCount), false);
        if (!overlapCells(tmp, cell)) {
          position = tmp;
        }
        count++;
      }
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.