|
@@ -56,7 +56,7 @@ public class EquipmentNode extends DiagramNode implements IDataBind {
|
|
|
label.setLocation(new XY(10, 10)); //TODO
|
|
|
}
|
|
|
|
|
|
- setAnchorLocations();
|
|
|
+ //TODO anchors
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -115,16 +115,15 @@ public class EquipmentNode extends DiagramNode implements IDataBind {
|
|
|
return legend;
|
|
|
}
|
|
|
|
|
|
- public void setAnchorLocations() {
|
|
|
- if (legend.getAnchors() != null) {
|
|
|
- anchorLocations = new HashMap<>();
|
|
|
- for (Anchor anchor : legend.getAnchors()) {
|
|
|
- anchorLocations.put(anchor.getCode(), anchor.calcLocation(size));
|
|
|
+ public Map<String, XY> getAnchorLocations() {
|
|
|
+ if (anchorLocations == null) {
|
|
|
+ if (legend.getAnchors() != null) {
|
|
|
+ anchorLocations = new HashMap<>();
|
|
|
+ for (Anchor anchor : legend.getAnchors()) {
|
|
|
+ anchorLocations.put(anchor.getCode(), anchor.calcLocation(size));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- public Map<String, XY> getAnchorLocations() {
|
|
|
return anchorLocations;
|
|
|
}
|
|
|
|