Class TagCloud


  • public class TagCloud
    extends java.lang.Object
    TagCloud helps displaying a tag cloud with n-tile font sizes.
    • Constructor Detail

      • TagCloud

        public TagCloud​(Tag[] tags)
      • TagCloud

        public TagCloud​(Tag[] tags,
                        java.util.Locale locale)
      • TagCloud

        @Deprecated
        public TagCloud​(TagManager tagManager)
        Deprecated.
      • TagCloud

        @Deprecated
        public TagCloud​(TagManager tagManager,
                        Resource resource)
        Deprecated.
    • Method Detail

      • getTags

        public Tag[] getTags()
      • isEmpty

        public boolean isEmpty()
      • calculateNtiles

        public int calculateNtiles​(long tagCount,
                                   int n)
        Calculates the n-tiles (eg. dectiles for n=10) for a specific frequency / tag count, and using the frequency set of the tags in this cloud.
        Parameters:
        tagCount - the tagCount for which to calculate the result
        n - how many tiles the resulting value should have
        Returns:
        a value between 1 and n, the n-tile
      • calculateNtiles

        public static int calculateNtiles​(long frequency,
                                          long[] frequencies,
                                          int n)
        Calculates the n-tiles (eg. dectiles for n=10) for a specific frequency.
        Parameters:
        frequency - the frequency for which to calculate the result
        frequencies - a list of all frequencies
        n - how many tiles the resulting value should have
        Returns:
        a value between 1 and n, the n-tile