NodeLabel label = node.setLabel("The Label");or:
NodeLabel label = new NodeLabel("The Label"); node.setLabel(label);
LabelPlacement placement = label.createLabelPlacement();or:
LabelPlacement placement = label.createLabelPlacement(placement);The available placement model is: You can specify the position of the label on the different positions inside the node with the LabelPlacement.setPlacement(short) method. The possible placements are:
LabelPlacement placement = placement.setPlacement(LabelPlacement.PLACEMENT_CENTER); // put the label on the center of the node placement = placement.setPlacement(LabelPlacement.PLACEMENT_TOP_RIGHT); // put the label on the top right of the node
Copyright 2021 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence