Search in sources :

Example 1 with HCPrismJS

use of com.helger.photon.uictrls.prism.HCPrismJS in project phoss-smp by phax.

the class SMPCommonUI method getExtensionDisplay.

@Nullable
public static IHCNode getExtensionDisplay(@Nonnull final ISMPHasExtension aHasExtension) {
    final ICommonsList<com.helger.xsds.bdxr.smp1.ExtensionType> aExtensions = aHasExtension.extensions();
    if (aExtensions.isEmpty())
        return null;
    final HCNodeList aNL = new HCNodeList();
    for (final com.helger.xsds.bdxr.smp1.ExtensionType aExtension : aExtensions) {
        if (aNL.hasChildren()) {
            // add a separator line
            aNL.addChild(new HCHR());
        }
        // Use only the XML element of the first extension
        final Element aAny = (Element) aExtension.getAny();
        final String sXML = XMLWriter.getNodeAsString(aAny);
        aNL.addChild(new HCPrismJS(EPrismLanguage.MARKUP).addChild(sXML));
    }
    return aNL;
}
Also used : HCNodeList(com.helger.html.hc.impl.HCNodeList) HCHR(com.helger.html.hc.html.grouping.HCHR) Element(org.w3c.dom.Element) HCPrismJS(com.helger.photon.uictrls.prism.HCPrismJS) PDTToString(com.helger.commons.datetime.PDTToString) Nullable(javax.annotation.Nullable)

Aggregations

PDTToString (com.helger.commons.datetime.PDTToString)1 HCHR (com.helger.html.hc.html.grouping.HCHR)1 HCNodeList (com.helger.html.hc.impl.HCNodeList)1 HCPrismJS (com.helger.photon.uictrls.prism.HCPrismJS)1 Nullable (javax.annotation.Nullable)1 Element (org.w3c.dom.Element)1