Examples of startPos()


Examples of org.movsim.roadmappings.RoadMapping.startPos()

            // draw the road segment source, if there is one
            final AbstractTrafficSource trafficSource = roadSegment.trafficSource();
            if (trafficSource != null) {
                g.setColor(sourceColor);
                posTheta = roadMapping.startPos();
                g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                g.setColor(Color.BLACK);
                StringBuilder inflowStringBuilder = new StringBuilder();
                inflowStringBuilder.append("set/target inflow: ");
                inflowStringBuilder.append((int) (Units.INVS_TO_INVH * trafficSource.getTotalInflow(simulationTime())));
 
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingBezier.startPos()

                // offsets
                // so only use this if lateral offset is zero (ie not for road
                // edge lines)
                final RoadMappingBezier bezier = (RoadMappingBezier) roadMapping;
                final GeneralPath path = new GeneralPath();
                posTheta = bezier.startPos(lateralOffset);
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = bezier.endPos(lateralOffset);
                final double cx = bezier.controlX(lateralOffset);
                final double cy = bezier.controlY(lateralOffset);
                path.quadTo(cx, cy, posTheta.x, posTheta.y);
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingBezier.startPos()

                final Iterator<RoadMappingBezier> iterator = polyBezier.iterator();
                if (!iterator.hasNext())
                    return;
                final GeneralPath path = new GeneralPath();
                RoadMappingBezier bezier = iterator.next();
                posTheta = bezier.startPos(lateralOffset);
                final int radius = 10;
                final int radiusC = 6;
                if (drawBezierPoints) {
                    g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                }
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingLine.startPos()

                final Iterator<RoadMappingLine> iterator = polyLine.iterator();
                if (!iterator.hasNext())
                    return;
                final GeneralPath path = new GeneralPath();
                RoadMappingLine line1 = iterator.next();
                posTheta = line1.startPos(lateralOffset);
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = line1.endPos(lateralOffset);
                path.lineTo(posTheta.x, posTheta.y);
                while (iterator.hasNext()) {
                    line1 = iterator.next();
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingU.startPos()

            to.setLocation(posTheta.x, posTheta.y);
            line.setLine(from, to);
            g.draw(line);

            // draw the U
            posTheta = mappingU.startPos();
            final double radius = mappingU.radius();
            final Arc2D.Double arc2D = new Arc2D.Double();
            arc2D.setArcByCenter(posTheta.x - straightLength, posTheta.y + radius, radius + lateralOffset, 90.0, 180.0,
                    Arc2D.OPEN);
            g.draw(arc2D);
View Full Code Here

Examples of org.nlogo.api.CompilerException.startPos()

  public void setError(Exception compilerError, int offset) {
    super.setError(compilerError, offset);

    if (compilerError instanceof CompilerException) {
      CompilerException compilerEx = (CompilerException) compilerError;
      editorArea.select(compilerEx.startPos() - offset, compilerEx.endPos() - offset);
      editorArea.setSelection(false);
      editorArea.requestFocus();
    } else {
      editorArea.setSelection(true);
    }
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.