addArtifact method

void addArtifact(
  1. Artifact artifact
)

Adds the given artifact to the band.

This method adds the provided artifact to the list of artifacts in the band. It also resets the cached rectangle, as the addition or removal of an artifact can affect the overall layout and dimensions of the band.

Implementation

void addArtifact(final Artifact artifact) {
  // reset the cached rectangle each time an artifact is added or removed
  this.artifacts.add(artifact);
}