Ejemplo n.º 1
0
  /** {@inheritDoc} */
  @Override
  public void moveTo(Position position) {
    Position delta;
    Position ref1 = this.path.getReferencePosition();
    Position ref2 = this.path2.getReferencePosition();
    if (ref1 != null && ref2 != null) delta = ref2.subtract(ref1);
    else delta = Position.ZERO;

    // Move the first path
    super.moveTo(position);

    // Move the second path
    this.path2.moveTo(position.add(delta));
  }
Ejemplo n.º 2
0
 @Override
 protected void doRenderGraphic(DrawContext dc) {
   super.doRenderGraphic(dc);
   this.path2.render(dc);
 }