GraphMLNode node = diagram.addNode(); node.setLabel("The Label");
GraphMLNode node = diagram.addNode(); node.setLabel("The Label");By default the text color is black, and the label has no background and no border. However it is possible to set the text color of the label. For example:
NodeLabel label = node.setLabel("The Label"); label.setTextColor(Color.RED);
GraphMLNode node = diagram.addNode(); node.setLabel("The Label"); LabelPlacement placement = label.createLabelPlacement(); placement.setPlacementModel(LabelPlacement.MODEL_INTERNAL); placement.setPlacement(LabelPlacement.PLACEMENT_TOP);The result will be:
Copyright 2021 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence