MCPcopy Create free account
hub / github.com/Nurtak/ObjectGraphVisualization / setArrowLabels

Method setArrowLabels

src/ch/hsr/ogv/view/Arrow.java:391–403  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389 }
390
391 protected void setArrowLabels() {
392 this.labelStartRight.setTranslateXYZ(-LABEL_SPACING / 3 - 1, this.startPoint.getY(), -this.startEndDistance / 2 + LABEL_SPACING + 15);
393
394 double startLeftWidth = this.labelStartLeft.calcMinWidth();
395 startLeftWidth = startLeftWidth < 20 ? 20 : startLeftWidth;
396 this.labelStartLeft.setTranslateXYZ(startLeftWidth + LABEL_SPACING / 3, this.startPoint.getY(), -this.startEndDistance / 2 + LABEL_SPACING + 15);
397
398 this.labelEndRight.setTranslateXYZ(-LABEL_SPACING / 3 - 1, this.endPoint.getY(), this.startEndDistance / 2 - LABEL_SPACING + 10);
399
400 double endLeftWidth = this.labelEndLeft.calcMinWidth();
401 endLeftWidth = endLeftWidth < 20 ? 20 : endLeftWidth;
402 this.labelEndLeft.setTranslateXYZ(endLeftWidth + LABEL_SPACING / 3, this.endPoint.getY(), this.startEndDistance / 2 - LABEL_SPACING + 10);
403 }
404
405 public void setColor(Color color) {
406 this.color = color;

Callers 1

drawArrowMethod · 0.95

Calls 3

setTranslateXYZMethod · 0.45
getYMethod · 0.45
calcMinWidthMethod · 0.45

Tested by

no test coverage detected