public void drawInternal(UGraphic ug) { if (color.size() > 1) { drawRainbow(ug); } else { worm.drawInternalOneColor( ug, color.getColors().get(0), 1.5, emphasizeDirection, endDecoration); drawInternalLabel(ug); } }
public Snake(Rainbow color, UPolygon endDecoration) { if (color == null) { throw new IllegalArgumentException(); } if (color.size() == 0) { throw new IllegalArgumentException(); } this.endDecoration = endDecoration; this.color = color; }