Ejemplo n.º 1
0
  private static void paintLine2D(Graphics g, RemoteLine line, boolean fill) {
    Graphics2D g2d = (Graphics2D) g;

    try {
      Line2D.Double line2D = new Line2D.Double(line.getNWCorner(), line.getSECorner());

      // Rectangle bounds = line.getBounds();
      if (fill)
        // g2d.fill(line2D);
        g2d.draw(line2D);
      else g2d.draw(line2D);

    } catch (Exception e) {
      e.printStackTrace();
      // System.out.println(e);
    }
  }
Ejemplo n.º 2
0
 private static void paintLine(Graphics g, RemoteLine line, boolean fill) {
   try {
     Rectangle bounds = line.getBounds();
     if (fill) g.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height);
     else g.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height);
   } catch (Exception e) {
     e.printStackTrace();
     // System.out.println(e);
   }
 }