Example #1
0
 @Override
 public void paint(CGMDisplay d) {
   if (this.color != null) {
     d.setLineColor(this.color);
   } else {
     d.setLineColorIndex(this.colorIndex);
   }
 }
Example #2
0
  @Override
  public void paint(CGMDisplay d) {
    Graphics2D g2d = d.getGraphics2D();
    g2d.setColor(d.getMarkerColor());

    Type markerType = d.getMarkerType();
    double size = d.getMarkerSize();

    // save the current stroke and use a default one for markers
    Stroke savedStroke = g2d.getStroke();
    // TODO: what is the best stroke to use for markers?
    g2d.setStroke(new BasicStroke());

    if (MarkerType.Type.ASTERISK.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawAsterisk(g2d, point, size);
      }
    } else if (MarkerType.Type.CIRCLE.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCircle(g2d, point, size, false);
      }
    } else if (MarkerType.Type.CROSS.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCross(g2d, point, size);
      }
    } else if (MarkerType.Type.DOT.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCircle(g2d, point, size, true);
      }
    } else if (MarkerType.Type.PLUS.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawPlus(g2d, point, size);
      }
    }

    g2d.setStroke(savedStroke);
  }
Example #3
0
 public void paint(CGMDisplay d) {
   d.setFillColor(C);
 }
 @Override
 public void paint(CGMDisplay d) {
   d.addLineType(this.lineType, this.dashElements, this.dashCycleRepeatLength);
 }
Example #5
0
 @Override
 public void paint(CGMDisplay d) {
   d.setEdge(this.isVisible);
 }
Example #6
0
 @Override
 public void paint(CGMDisplay d) {
   d.setHatchStyle(this.type);
 }