static Integer getDisplayedColor(final PathObject pathObject, final Integer defaultColor) { // Check if any color has been set - if so, return it Integer color = pathObject.getColorRGB(); if (color != null) return color; // Check if any class has been set, if so then use its color PathClass pathClass = pathObject.getPathClass(); if (pathClass != null) color = pathClass.getColor(); if (color != null) return color; return defaultColor; }
annotationNew.setColorRGB(temp.getColorRGB()); annotationNew.setName(temp.getName()); objectsToAdd.add(annotationNew);
annotation2.setColorRGB(pathObject.getColorRGB());