Package simtools.shapes

Examples of simtools.shapes.StrokeParameters


       
    public CircuitConnection(int x, int y, int w, int h, CircuitGate fisrtGate, CircuitGate lastGate) {
        super(x, y, w, h, fisrtGate, lastGate);

        // Set stroke thickness to 2 for circuit connectors...
        StrokeParameters strockeParam =  StrokeDisplay.defaultstrokes[0].getStrokeParams();
        strockeParam.setThickness(2);
        stroke = StrokeParameters.createStroke(strokeParams.param1, strokeParams.param2, strokeParams.thickness);
       
        this.connectionColor = null;
    }
View Full Code Here


    public CurveParameters(){
      xds=null;
      yds=null;
      points=false;
      drawBars = false;
      strokeParams=new StrokeParameters();
      color=Color.BLACK;
      usePrimaryX = true;
      usePrimaryY = true;
    }
View Full Code Here

        } else if (name.equalsIgnoreCase("DRAW_MAPPER")) {
            res = drawMapper;
        } else if (name.equalsIgnoreCase("DRAW_MAPPER_SOURCE")) {
            res = drawMapperSource;
        } else if (name.equalsIgnoreCase("STROKE_PARAMS")) {
            StrokeParameters sp = (((StrokeDisplay) (cbxdashes.getSelectedItem())).getStrokeParams());
            res = new StrokeParameters(sp);
            ((StrokeParameters) res).setThickness(((Number) spithickness.getValue()).floatValue());
        } else if (name.equalsIgnoreCase("TRANSFORM")) {
            res = transform;
        }
        return res;
View Full Code Here

    public Abstract1DShape(int ox, int oy, int width, int height) {
        super(ox, oy);
        delegateEndNotificationListener = this; // by default
        _w = width;
        _h = height;
        strokeParams = new StrokeParameters();
        stroke = strokeParams.createStroke();
        allowResize = true;
        updateBounds();

        ratio = (double)_w / (double)_h;
View Full Code Here

        if (clone != null) {
            if (clone.drawMapperSource != null) {
                clone.drawMapperSource.addListener(clone);
                clone.drawMapperSource.addEndNotificationListener(clone.delegateEndNotificationListener);
            }
            clone.strokeParams = new StrokeParameters(strokeParams);
            clone.stroke = clone.strokeParams.createStroke();
            if (clone.transform != null) {
                clone.transform = transform.cloneTransform();
                clone.transform.setListener(clone);
            }
View Full Code Here

            drawDynamicColor = (Color) drawMapper.getPaint(drawMapperSource, drawMapperIndex);
        } else {
            drawDynamicColor = null;
        }
        if (strokeParams == null) {
            strokeParams = new StrokeParameters();
        }
        stroke = strokeParams.createStroke();
        bounds2D = new Rectangle2D.Double();
        // Update geometric transformation and bounding box
        if (transform != null) {
View Full Code Here

  /** The preferred size of the component. */
  private Dimension preferredSize;

  public StrokeDisplay(){
    strokeParams=new StrokeParameters();
    stroke=StrokeParameters.createStroke(strokeParams.param1,strokeParams.param2,strokeParams.thickness);
    preferredSize = new Dimension(80, 18);
  }
View Full Code Here

   * Creates a StrokeDisplay for the specified basic stroke.
   * @param float p1, float p2 : the necessary datas for
   * the construction of a stroke
   */
  public StrokeDisplay(float p1, float p2, float thickness) {
    strokeParams=new StrokeParameters(p1,p2,thickness);
    stroke=StrokeParameters.createStroke(strokeParams.param1,strokeParams.param2,strokeParams.thickness);
    preferredSize = new Dimension(80, 18);
  }
View Full Code Here

  /**
   * Creates a StrokeDisplay for the specified basic stroke.
   * @param strokeParams : the data model to build and handle stroke.
   */
  public StrokeDisplay(StrokeParameters strokeParams) {
    this.strokeParams=new StrokeParameters(strokeParams);
    stroke=StrokeParameters.createStroke(strokeParams.param1,strokeParams.param2,strokeParams.thickness);
    preferredSize = new Dimension(80, 18);
  }
View Full Code Here

        }
       
        Curve c=getCurve(cs);
        res.points=c.showPoints;
        res.drawBars=c.drawBars;
        res.strokeParams=new StrokeParameters(c.dashParam1 ,c.dashParam2);
        res.color=c.color;
        res.usePrimaryX= !c.secondaryXaxis;
        res.usePrimaryY= !c.secondaryYaxis;
       
        return res;
View Full Code Here

TOP

Related Classes of simtools.shapes.StrokeParameters

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.