Class StyleWrapper


  • public class StyleWrapper
    extends Object
    A wrapper for the Style object to ease gui use.
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

      • StyleWrapper

        public StyleWrapper​(org.geotools.styling.Style style)
    • Method Detail

      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getFirstRule

        public RuleWrapper getFirstRule()
        Facility to get the first rule, if available.
        Returns:
        the first rule or null.
      • getFirstTextSymbolizer

        public TextSymbolizerWrapper getFirstTextSymbolizer()
        Facility to get the first TextSymbolizer, if available.
        Returns:
        the first textsymbolizer or null.
      • toXml

        public String toXml()
                     throws Exception
        Converts a style to its string representation to be written to file.
        Parameters:
        style - the style to convert.
        Returns:
        the style string.
        Throws:
        Exception
      • getStyle

        public org.geotools.styling.Style getStyle()
      • swap

        public void swap​(int src,
                         int dest)
        Swap two elements of the list.
        Parameters:
        src - the position first element.
        dest - the position second element.