The custom control Avatar
from the Gluon Mobile library has API for setting the image and the radius.
Currently it doesn't provide API for setting the border color, but it can be done, based on how the control is designed.
If you check it with ScenicView, the control has an ImageView
and a Circle
on top, with styleClass decoration
.
So by code you can set the color of this circle:
avatar.getChildrenUnmodifiable().get(1).setStyle("-fx-stroke: red");
or better:
avatar.lookup(".decoration").setStyle("-fx-stroke: red");
With CSS is easier:
.avatar > .decoration {
-fx-stroke: red;
}