Examples of Point


Examples of com.sun.jna.examples.win32.WinDef.POINT

            List sizes = new ArrayList();
            while (!pi.isDone()) {
                int type = pi.currentSegment(coords);
                if (type == PathIterator.SEG_MOVETO) {
                    size = 1;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_LINETO) {
                    ++size;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_CLOSE) {
                    sizes.add(new Integer(size));
                }
                else {
                    throw new RuntimeException("Area is not polygonal: " + area);
                }
                pi.next();
            }
            POINT[] lppt = (POINT[])new POINT().toArray(points.size());
            POINT[] pts = (POINT[])points.toArray(new POINT[points.size()]);
            for (int i=0;i < lppt.length;i++) {
                lppt[i].x = pts[i].x;
                lppt[i].y = pts[i].y;
            }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinDef.POINT

            List<Integer> sizes = new ArrayList<Integer>();
            while (!pi.isDone()) {
                int type = pi.currentSegment(coords);
                if (type == PathIterator.SEG_MOVETO) {
                    size = 1;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_LINETO) {
                    ++size;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_CLOSE) {
                    sizes.add(new Integer(size));
                }
                else {
                    throw new RuntimeException("Area is not polygonal: " + area);
                }
                pi.next();
            }
            POINT[] lppt = (POINT[])new POINT().toArray(points.size());
            POINT[] pts = points.toArray(new POINT[points.size()]);
            for (int i=0;i < lppt.length;i++) {
                lppt[i].x = pts[i].x;
                lppt[i].y = pts[i].y;
            }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinUser.POINT

            List<Integer> sizes = new ArrayList<Integer>();
            while (!pi.isDone()) {
                int type = pi.currentSegment(coords);
                if (type == PathIterator.SEG_MOVETO) {
                    size = 1;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_LINETO) {
                    ++size;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_CLOSE) {
                    sizes.add(new Integer(size));
                }
                else {
                    throw new RuntimeException("Area is not polygonal: " + area);
                }
                pi.next();
            }
            POINT[] lppt = (POINT[])new POINT().toArray(points.size());
            POINT[] pts = (POINT[])points.toArray(new POINT[points.size()]);
            for (int i=0;i < lppt.length;i++) {
                lppt[i].x = pts[i].x;
                lppt[i].y = pts[i].y;
            }
View Full Code Here

Examples of com.sun.star.awt.Point

        XAccessibleComponent accComp = (XAccessibleComponent) UnoRuntime.queryInterface(
                                               XAccessibleComponent.class,
                                               oObj);

             
              final Point point = accComp.getLocationOnScreen();
      
        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {                            
View Full Code Here

Examples of com.tensegrity.palo.gwt.widgets.client.util.Point

    return STYLE;
  }
 
  public Point render(int width, int height) {
    if (hide) {
      return new Point(0,0);
    }
    int left = INDENT, top = INDENT;
    if(width < getMinWidth())
      width = getMinWidth();
    // renderer empty label if visible
    Widget emptyLabel = container.getEmptyLabel();
    if (emptyLabel != null && emptyLabel.isVisible()) {
      emptyLabel.setWidth(width + "px");
      container.setWidgetPosition(emptyLabel, 0, top);
    }
    ContainerWidget[] widgets = container.getWidgets();
    for (int i = 0; i < widgets.length; i++) {
      ContainerWidget widget = widgets[i];
      if (i < firstVisible) {
        widget.setVisible(false);
      } else {
        widget.setVisible(true);
        container.setWidgetPosition(widget, left, top);
        top += widget.getOffsetHeight() + INDENT;
      }
    }
    return new Point(width, top);
  }
View Full Code Here

Examples of com.vaadin.addon.timeline.gwt.client.VCanvasPlotter.Point

            List<Point> points = graph.getPoints();

            // Search for index of the closes point
            float minDiff = 10000000f;
            int pointIndex = 0;
            Point p;
            for (int i = 0; i < points.size(); i++) {
                p = points.get(i);
                if (p.x < 0 || p.x > canvas.getWidth()) {
                    continue;
                }

                float diff = Math.abs(x - p.x);
                if (currentMode == PlotMode.BAR) {
                    // Barchart renders to the left of the point so we have to
                    // adjust
                    diff = Math.abs(x - (p.x - p.width / 2f));
                }

                if (diff < minDiff) {
                    minDiff = diff;
                    pointIndex = i;
                }
            }

            // Retrieve the selected point
            p = points.get(pointIndex);
            if (dots.size() > g) {
                HTML dot = dots.get(g);
                dot.setVisible(true);
                if (widget.isGraphsStacked()) {
                    float pSum = 0;
                    for (int j = 0; j < g; j++) {
                        Graph graph2 = currentGraphs.get(j);
                        Point q = graph2.getPoints().get(pointIndex);
                        if (q != null) {
                            pSum += q.y - getCurrentZeroCoordinate();
                        }
                    }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point

 
  public void testUpdatePointMarker() throws Exception{
    PointMarker pm = geomMarkerDao.getPointMarker(m1.getId());
    pm.setMarkerIconId(10);
    pm.setNotes("newnotes");
    Point p3 = factory.createPoint(new Coordinate(30,30));
    pm.setPoint(p3);
    assertTrue(geomMarkerDao.updatePointMarker(pm));
    pm = geomMarkerDao.getPointMarker(m1.getId());
    assertEquals(m1.getId(),pm.getId());
    assertEquals(10,pm.getMarkerIconId());
View Full Code Here

Examples of com.wizriver.entity.beans.Point

    @Override
    protected void prepareModel() throws Exception {
        if (id != null) {
            entity = pointManager.getPoint(id);
        } else {
            entity = new Point();
        }
    }
View Full Code Here

Examples of common.Point

            } else if (tp.equals(TypeConteneur.POINT)) {
              System.out.println("[" + pseudo
                  + "] J'ai recu le point :");

              Point p = (Point) c.getObject();
              System.out.println("Symbole = " + p.getSymbole()
                  + " X = " + p.getX() + " Y = " + p.getY());

              // action sur la reception d'un point
              jxoGui.showPointAdversaire(p);


            } else if (tp.equals(TypeConteneur.GAGNE)) {
              // J'ai gagné
              System.out.println("[" + pseudo+"] Vous avez gagne !");

              jxoGui.desactiverTousChamps();
              jxoGui.info("Vous avez gagne cette partie !\nFelicitations !");

              fini = veutTerminer();

//              if(jxoGui.rejouer()){
//              envoyerMessage(TypeConteneur.REJOUER_OK, TypeConteneur.REJOUER_OK);
//              }else{
//              envoyerMessage(TypeConteneur.REJOUER_KO, TypeConteneur.REJOUER_KO);
//              fini = true;
//              disconnect();
//              }


            }else if(tp.equals(TypeConteneur.MATCH_NUL)){
              System.out.println("[" + pseudo+"] Match nul");

              jxoGui.desactiverTousChamps();
              jxoGui.info("Match Nul !");

              fini = veutTerminer();

//              if(jxoGui.rejouer()){
//              envoyerMessage(TypeConteneur.REJOUER_OK, TypeConteneur.REJOUER_OK);
//              }else{
//              envoyerMessage(TypeConteneur.REJOUER_KO, TypeConteneur.REJOUER_KO);
//              fini = true;
//              disconnect();
//              }

              jxoGui.resetMainPanel();
              jxoGui.desactiverTousChamps();

            }else if (tp.equals(TypeConteneur.PERDU)) {
              // J'ai perdu
              System.out.println("[" + pseudo+"]J'ai perdu !");

              // affichage du point du gagnant.
              Point p = (Point) c.getObject();
              jxoGui.showPointAdversaire(p);

              jxoGui.desactiverTousChamps();

              jxoGui.info("Vous avez perdu cette partie !");
View Full Code Here

Examples of cranks.geom.Point

      getLink(2).getPostJoint().setCoordinates(l2*Math.cos(inputAngle.getAngle())-(l1/2),
                                         l2*Math.sin(inputAngle.getAngle()));
      getLink(4).getPostJoint().setCoordinates(l1/2, 0);
      Circle circle1 = new Circle(getLink(2).getPostJoint(), l3);
      Circle circle2 = new Circle(getLink(4).getPostJoint(), l4);
      Point newJoint = (elbowUp)?(circle1.intersect(circle2)[0]):
                                 (circle1.intersect(circle2)[1]);
      if (newJoint != null)
        getLink(3).getPostJoint().setCoordinates(newJoint.getX(), newJoint.getY());
    }
  }
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.