Class UniformStyleCollection


  • public class UniformStyleCollection
    extends java.lang.Object
    Collection of nodes that share the same style. In case of overlap, the nested ones gain css classes like depth-0, depth-1, etc. A collection can be overlaid into a single span in one pass using toSpans().
    Since:
    6.5.0
    Author:
    Clément Fournier
    • Constructor Summary

      Constructors 
      Constructor Description
      UniformStyleCollection​(java.util.Set<java.lang.String> style, java.util.Collection<net.sourceforge.pmd.util.fxdesigner.util.codearea.NodeStyleSpan> ns)  
    • Constructor Detail

      • UniformStyleCollection

        public UniformStyleCollection​(java.util.Set<java.lang.String> style,
                                      java.util.Collection<net.sourceforge.pmd.util.fxdesigner.util.codearea.NodeStyleSpan> ns)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • getStyle

        public java.util.Set<java.lang.String> getStyle()
      • toSpans

        public org.fxmisc.richtext.model.StyleSpans<java.util.Collection<java.lang.String>> toSpans()
        Overlays all the nodes in this collection into a single StyleSpans. This algorithm makes the strong assumption that the nodes can be ordered as a tree, that is, given two nodes n and m, then one of the following holds true: - m and n are disjoint - m is entirely contained within n, or the reverse is true E.g. [ m ] but not [ m ]        [ n ] [ n' ] [ n ]
      • buildSpans

        public org.fxmisc.richtext.model.StyleSpans<java.util.Collection<java.lang.String>> buildSpans()