Package com.projity.graphic.configuration.shape

Examples of com.projity.graphic.configuration.shape.PredefinedPaint


  void build() {
    shape = PredefinedShape.find(shapeName);
    color = Colors.findColor(colorName);
    stroke = PredefinedStroke.find(strokeName);
    paint = new PredefinedPaint(PredefinedPaint.find(paintName), color, Colors.findColor("WHITE"));
  }
View Full Code Here


    // if ("SVGGraphics2D".equals(g2.getClass().getSimpleName()))
    if (texture)
      g2.setPaint(paint); // the paint already has the color set
    else {
      if (paint instanceof PredefinedPaint) {
        PredefinedPaint p = (PredefinedPaint) paint;
        p.applyPaint(g2, texture);
      } else
        g2.setColor(getColor());
    }

  }
View Full Code Here

        boolean useScale2=coord.getTimescaleManager().getCurrentScaleIndex()==0; //valid only for current time scales
        TimeIterator i=coord.getTimeIterator(bounds.getX(), bounds.getMaxX(),useScale2);
        long startNonworking=-1L,endNonWorking=-1L;
        Calendar cal=DateTime.calendarInstance();

        PredefinedPaint paint=(PredefinedPaint)calFormat.getMiddle().getPaint();//new PredefinedPaint(PredefinedPaint.DOT_LINE,Colors.VERY_LIGHT_GRAY,Color.WHITE);
        paint.applyPaint(g2, useTextures());
        while (i.hasNext()){
          TimeInterval interval=i.next();
          long s=interval.getStart();
          if (CalendarService.getInstance().getDay(wc, s).isWorking()){
            if (startNonworking!=-1L){
              drawNonWorking(g2, startNonworking, endNonWorking, cal, coord, bounds,useScale2);
              startNonworking=endNonWorking=-1L;
            }
          }else{
            if (startNonworking==-1L) startNonworking=s;
            endNonWorking=s;

          }
        }
        if (startNonworking!=-1L){
          drawNonWorking(g2, startNonworking, endNonWorking, cal, coord, bounds,useScale2);
          startNonworking=endNonWorking=-1L;
        }
      }

    if (container!=null){
      //scale2 separation lines
      TimeIterator i=coord.getTimeIterator(bounds.getX(), bounds.getMaxX(),true);
      g2.setPaint(new PredefinedPaint(PredefinedPaint.DOT_LINE2,Color.GRAY,g2.getBackground()));
      while (i.hasNext()){
        TimeInterval interval=i.next();
        int startX=(int)Math.round(coord.toX(interval.getStart()));
        g2.drawLine(startX,bounds.y,startX,bounds.y+bounds.height);
      }

      //project start
      int projectStartX=(int)Math.round(coord.toX(project.getStart()));
      if (projectStartX>=bounds.getX()&&projectStartX<=bounds.getMaxX()){
        g2.setPaint(new PredefinedPaint(PredefinedPaint.DASH_LINE,Color.GRAY,g2.getBackground()));
        g2.drawLine(projectStartX,bounds.y,projectStartX,bounds.y+bounds.height);
      }

      //project start
      long statusDate = project.getStatusDate();
      if (statusDate != 0) {
        int statusDateX=(int)Math.round(coord.toX(statusDate));
        if (statusDateX>=bounds.getX()&&statusDateX<=bounds.getMaxX()){
          g2.setPaint(new PredefinedPaint(PredefinedPaint.DOT_LINE2,Color.GREEN,g2.getBackground()));
          g2.drawLine(statusDateX,bounds.y,statusDateX,bounds.y+bounds.height);
        }
      }

View Full Code Here

TOP

Related Classes of com.projity.graphic.configuration.shape.PredefinedPaint

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.