diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 7709d2afd..81e42a954 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -3479,22 +3479,28 @@ public class ProfileUtilities extends TranslatingUtilities { row.setIcon("icon_element.gif", HierarchicalTableGenerator.TEXT_ICON_ELEMENT); } } else if (hasDef && element.getType().size() > 1) { - if (allAreReference(element.getType())) + if (allAreReference(element.getType())) { row.setIcon("icon_reference.png", HierarchicalTableGenerator.TEXT_ICON_REFERENCE); - else { + } else { row.setIcon("icon_choice.gif", HierarchicalTableGenerator.TEXT_ICON_CHOICE); typesRow = row; } - } else if (hasDef && element.getType().get(0).getWorkingCode() != null && element.getType().get(0).getWorkingCode().startsWith("@")) + } else if (hasDef && element.getType().get(0).getWorkingCode() != null && element.getType().get(0).getWorkingCode().startsWith("@")) { row.setIcon("icon_reuse.png", HierarchicalTableGenerator.TEXT_ICON_REUSE); - else if (hasDef && isPrimitive(element.getType().get(0).getWorkingCode())) + } else if (hasDef && isPrimitive(element.getType().get(0).getWorkingCode())) { row.setIcon("icon_primitive.png", HierarchicalTableGenerator.TEXT_ICON_PRIMITIVE); - else if (hasDef && element.getType().get(0).hasTarget()) + } else if (hasDef && element.getType().get(0).hasTarget()) { row.setIcon("icon_reference.png", HierarchicalTableGenerator.TEXT_ICON_REFERENCE); - else if (hasDef && isDataType(element.getType().get(0).getWorkingCode())) + } else if (hasDef && isDataType(element.getType().get(0).getWorkingCode())) { row.setIcon("icon_datatype.gif", HierarchicalTableGenerator.TEXT_ICON_DATATYPE); - else + } else if (hasDef && Utilities.existsInList(element.getType().get(0).getWorkingCode(), "Element", "BackboneElement")) { + row.setIcon("icon_element.gif", HierarchicalTableGenerator.TEXT_ICON_ELEMENT); + } else { row.setIcon("icon_resource.png", HierarchicalTableGenerator.TEXT_ICON_RESOURCE); + } + if (element.hasUserData("render.opaque")) { + row.setOpacity("0.5"); + } UnusedTracker used = new UnusedTracker(); String ref = defPath == null ? null : defPath + element.getId(); String sName = tail(element.getPath()); diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/HierarchicalTableGenerator.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/HierarchicalTableGenerator.java index a69ab1336..8edbee65b 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/HierarchicalTableGenerator.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/HierarchicalTableGenerator.java @@ -430,6 +430,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities { private String color; private int lineColor; private String id; + private String opacity; public List getSubRows() { return subRows; @@ -473,6 +474,13 @@ public class HierarchicalTableGenerator extends TranslatingUtilities { public void setId(String id) { this.id = id; } + public String getOpacity() { + return opacity; + } + public void setOpacity(String opacity) { + this.opacity = opacity; + } + } public class TableModel { @@ -613,7 +621,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities { } table.setAttribute("style", "border: " + border + "px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;"); XhtmlNode tr = table.addTag("tr"); - tr.setAttribute("style", "border: " + Integer.toString(1 + border) + "px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;"); + tr.setAttribute("style", "border: " + Integer.toString(1 + border) + "px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top"); XhtmlNode tc = null; for (Title t : model.getTitles()) { tc = renderCell(tr, t, "th", null, null, null, false, null, "white", 0, imagePath, border, outputTracker, model, null); @@ -656,7 +664,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities { else if (model.isAlternating() && counter.isOdd()) color = BACKGROUND_ALT_COLOR; - tr.setAttribute("style", "border: " + border + "px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: "+color+";"); + tr.setAttribute("style", "border: " + border + "px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: "+color+(r.getOpacity() == null ? "" : "; opacity: "+r.getOpacity())); if (model.isActive()) { tr.setAttribute("id", r.getId()); }