use of com.ait.lienzo.client.core.shape.wires.WiresConnection in project kie-wb-common by kiegroup.
the class LogMagnetsDevCommand method logMagnets.
private void logMagnets(Element<? extends View<?>> element) {
if (null != element.asNode()) {
final Shape shape = getCanvasHandler().getCanvas().getShape(element.getUUID());
final WiresShape wiresShape = (WiresShape) shape.getShapeView();
final MagnetManager.Magnets magnets = wiresShape.getMagnets();
if (null != magnets) {
log("---- Magnets [" + element.getUUID() + "] ------");
for (int i = 0; i < magnets.size(); i++) {
WiresMagnet magnet = magnets.getMagnet(i);
NFastArrayList<WiresConnection> connections = magnet.getConnections();
WiresConnector connector = null;
if (null != connections && !connections.isEmpty()) {
WiresConnection connection = connections.iterator().next();
connector = connection.getConnector();
}
log("[" + i + "] - " + connector);
}
log("-------------------------------------------------------");
} else {
log("No magnets are set.");
}
}
}
Aggregations