@Override public final String getName() { return getID(); }
public ArtifactList(String label, ArrayList<Artifact> artifacts) { // TODO: should a defensive copy be made of artifacts? this.label = label; updateLabels(artifacts); this.artifacts = artifacts; }
@Override public final void drawHistory(Graphics2DAdapter graphics) { synchronized (historicalData) { for (double[] data : historicalData) { drawHistoryEntry(graphics, data); } } } }
private void addPolygonToArtifacts(String name, ConvexPolygon2D polygon, Color color) { YoFrameConvexPolygon2D yoPlanePolygon = new YoFrameConvexPolygon2D(name + "Polygon", worldFrame, 10, registry); artifacts.add(new YoArtifactPolygon(name, yoPlanePolygon , color, false)); yoPlanePolygon.set(polygon); }
@Override public YoArtifactPosition createArtifact() { return new YoArtifactPosition(getName(), x, y, type, getColor(), scale); }
public void registerArtifacts(String listName, Artifact[] artifacts) { ArtifactList list = new ArtifactList(listName, artifacts); registerArtifactList(list); }
private void updateLabels(ArrayList<Artifact> artifacts) { for (Artifact artifact : artifacts) { updateLabel(artifact); } }
public void addArtifactsToPlotter(PlotterInterface plotter) { for (Artifact artifact : artifacts) { plotter.addArtifact(artifact); } }
@Override public void drawHistoryEntry(Graphics2DAdapter graphics, double[] entry) { tempPoint.set(entry[0], entry[1]); drawLocal(graphics); }
public void hideArtifacts() { int numberOfElements = artifactLists.size(); for (int i = 0; i < numberOfElements; i++) { ArtifactList artifactList = artifactLists.get(i); artifactList.hideArtifacts(); } }
public YoArtifactLineSegment2d(String name, YoFrameLineSegment2d lineSegment, Color color, double arrowHeadWidth, double arrowHeadHeight) { super(name, new double[0], color, lineSegment.getYoFirstEndpointX(), lineSegment.getYoFirstEndpointY(), lineSegment.getYoSecondEndpointX(), lineSegment.getYoSecondEndpointY()); this.lineSegment = lineSegment; this.drawArrow = true; instatiateArrowObjects(arrowHeadWidth, arrowHeadHeight); }
private void updateLabels(ArrayList<Artifact> artifacts) { for (Artifact artifact : artifacts) { updateLabel(artifact); } }
public ArtifactList(String label, ArrayList<Artifact> artifacts) { // TODO: should a defensive copy be made of artifacts? this.label = label; updateLabels(artifacts); this.artifacts = artifacts; }
@Override public final String getName() { return getID(); }
@Override public final void drawHistory(Graphics2DAdapter graphics) { synchronized (historicalData) { for (double[] data : historicalData) { drawHistoryEntry(graphics, data); } } }
public void addArtifactsToPlotter(PlotterInterface plotter) { for (Artifact artifact : artifacts) { plotter.addArtifact(artifact); } }
@Override public void drawHistoryEntry(Graphics2DAdapter graphics, double[] entry) { tempPoint.set(entry[0], entry[1]); drawLocal(graphics); }
public void add(Artifact artifact) { updateLabel(artifact); this.artifacts.add(artifact); }
public ArtifactList(String label, Artifact[] artifactArray) { this.label = label; ArrayList<Artifact> artifacts = new ArrayList<Artifact>(artifactArray.length); for (Artifact artifact : artifactArray) { artifacts.add(artifact); } this.artifacts = artifacts; updateLabels(artifacts); }
public ArtifactList(String label, Artifact artifact) { this.label = label; updateLabel(artifact); ArrayList<Artifact> artifacts = new ArrayList<Artifact>(1); artifacts.add(artifact); this.artifacts = artifacts; }