Examples of NodeLocation


Examples of mindnotes.shared.model.NodeLocation

    Box b = root.getElementBounds();

    boolean right = px >= (b.x + b.w / 2);

    // mouse location
    NodeLocation ml = right ? NodeLocation.RIGHT : NodeLocation.LEFT;
    boolean up = py < (b.y + b.h / 2);

    boolean isRoot = root.getLocation() == NodeLocation.ROOT;

    if (root.getLayoutChildren().isEmpty()) {
View Full Code Here

Examples of org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils.Node.NodeLocation

                node.setShowMode(0);
            }
            if (node == m_TreeComponent.m_showNode) {
                m_TreeComponent.m_showNodePos = node.m_p.y;
            }
            NodeLocation nodeLocation = paintLineAndTextAndIcon(g, node, true);
            m_TreeComponent.m_savedPointsNode.add(nodeLocation);
            if (node.isNotExpanded() || !node.hasChildren()) {
                return;
            }
            x4 = (int) (node.m_p.x + Node.m_dx + Node.m_dx / 2 + 0.5);
View Full Code Here

Examples of org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils.Node.NodeLocation

        if (display_this) {
            updatePoint(child, sfdcObject);
            if (child == m_TreeComponent.m_showNode) {
                m_TreeComponent.m_showNodePos = node.m_p.y;
            }
            NodeLocation childNodeLocation = paintLineAndTextAndIcon(g, child, false);
            m_TreeComponent.m_savedPointsNode.add(childNodeLocation);
            int y1 = y, y2 = child.m_p.y + Node.m_textHeight / 2;
            if (y1 < m_TreeComponent.m_ymin) {
                y1 = m_TreeComponent.m_ymin;
            }
View Full Code Here

Examples of org.jitterbit.integration.client.ui.interchange.entity.transformation.tree.utils.Node.NodeLocation

                }
            }
            g.setColor(m_TreeComponent.m_textColor);
        }
        m_TreeComponent.m_xmax = m_TreeComponent.m_xmax > node.m_x8 ? m_TreeComponent.m_xmax : node.m_x8;
        return new NodeLocation(node, new Rectangle(node.m_p.x, node.m_p.y, node.m_x8 - node.m_p.x, Node.m_textHeight));
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.common.NodeLocation

   *
   * @param node
   *            The node to add.
   */
  public void addNodeLocation(Node node) {
    locationStore.addLocation(node.getId(), new NodeLocation(node.getLongitude(), node.getLatitude()));
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.common.NodeLocation

     * @param nodeId
     *             Id of the node.
     * @return Point object
     */
    public Point createPoint(long nodeId) {
      NodeLocation nodeLocation = locationStore.getNodeLocation(nodeId);
        Point point = new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude());
        point.srid = 4326;

        return point;
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.common.NodeLocation

    left = 0;
    right = 0;
    bottom = 0;
    top = 0;
    for (WayNode wayNode : way.getWayNodes()) {
      NodeLocation nodeLocation;
      double longitude;
      double latitude;
     
      nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId());
      longitude = nodeLocation.getLongitude();
      latitude = nodeLocation.getLatitude();
     
      if (nodeLocation.isValid()) {
        if (nodesFound) {
          if (longitude < left) {
            left = longitude;
          }
          if (longitude > right) {
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.common.NodeLocation

    List<Point> linePoints;
    int numValidNodes = 0;
   
    linePoints = new ArrayList<Point>();
    for (WayNode wayNode : way.getWayNodes()) {
      NodeLocation nodeLocation;
     
      nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId());
 
      if (nodeLocation.isValid()) {
        numValidNodes++;
        linePoints.add(new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude()));
      } else {
        return null;
      }
    }
 
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsimple.common.NodeLocation

      // The longitude and latitude must be different values to ensure they don't get mixed up.
      longitude = FixedPrecisionCoordinateConvertor.convertToDouble(1 << (i % 32));
      latitude = FixedPrecisionCoordinateConvertor.convertToDouble(1 << ((i + 1) % 32));
     
      // Add the location to the store but leave every node invalid.
      store.addLocation(i * 2, new NodeLocation(longitude, latitude));
    }
   

    // Verify that the data from the store matches.
    for (int i = 0; i < 100000; i++) {
      double longitude;
      double latitude;
      NodeLocation location;
     
      // Stores typically use fixed precision storage therefore ensure we
      // have a good spread of values.
      // The longitude and latitude must be different values to ensure they don't get mixed up.
      longitude = FixedPrecisionCoordinateConvertor.convertToDouble(1 << (i % 32));
      latitude = FixedPrecisionCoordinateConvertor.convertToDouble(1 << ((i + 1) % 32));
     
      location = store.getNodeLocation(i * 2);
      Assert.assertTrue("The node location should be valid.", location.isValid());
      Assert.assertEquals("The longitude is incorrect.", longitude, location.getLongitude(), 0);
      Assert.assertEquals("The latitude is incorrect.", latitude, location.getLatitude(), 0);
     
      location = store.getNodeLocation((i * 2) + 1);
      Assert.assertFalse("The node location should be invalid.", location.isValid());
    }
   
    store.release();
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.pgsnapshot.common.NodeLocation

   *
   * @param node
   *            The node to add.
   */
  public void addNodeLocation(Node node) {
    locationStore.addLocation(node.getId(), new NodeLocation(node.getLongitude(), node.getLatitude()));
  }
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.