package wordcram; /** * A WordSizer tells WordCram how big to render each word. * You'll pass a WordSizer to WordCram via {@link WordCram#withSizer(WordSizer)}. *
* Some useful implementations are available in {@link Sizers}. * * @author Dan Bernier */ public interface WordSizer { /** * How big should this {@link Word} be rendered? *
* Generally, a word cloud draws more important words bigger. Two typical * ways to measure word's importance are its weight, and its rank (its * position in the list of words, sorted by weight). *
* Given that, sizeFor is passed the Word (which knows its own weight), its * rank, and the total number of words. *
* For example, given the text "I think I can I think", the words would look * like this: *