1 /* 2 * Copyright 2011-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.tagcloud; 17 18 /** 19 * Creates instances of tag clouds. 20 * 21 * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a> 22 * @version $Revision:591 $ 23 */ 24 public interface TagCloudFactory 25 { 26 // ********************************* Fields ********************************* 27 28 // --- constants ------------------------------------------------------------ 29 30 // ****************************** Initializer ******************************* 31 32 // ****************************** Inner Classes ***************************** 33 34 // ********************************* Methods ******************************** 35 36 // --- get&set -------------------------------------------------------------- 37 38 /** 39 * Sets the minimum weight for the font. 40 * 41 * @param maxWeight the minimum weight for the font. 42 */ 43 void setMinWeight(double minWeight); 44 45 /** 46 * Sets the maximum weight for the font. 47 * 48 * @param maxWeight the maximum weight for the font. 49 */ 50 void setMaxWeight(double maxWeight); 51 52 /** 53 * The maximum number of tags to display. 54 * 55 * @param maxTagsToDisplay the maximum number of tags to display. 56 */ 57 void setMaxTagsToDisplay(int maxTagsToDisplay); 58 59 /** 60 * Activates the filter that removes Java reserved words from the tag cloud. 61 * 62 * @param useJavaReservedWordsFilter <code>true</code> to activate. 63 */ 64 void setUseJavaReservedWordsFilter(boolean useJavaReservedWordsFilter); 65 66 /** 67 * Activates the filter that removes usual Java words from the tag cloud. 68 * 69 * @param useUsualWordsFilter <code>true</code> to activate. 70 */ 71 void setUseUsualWordsFilter(boolean useUsualWordsFilter); 72 73 /** 74 * Sets the list of words to be removed from the tag cloud. This allows an 75 * individual configuration. 76 * 77 * @param wordsToFilter the list of words to be removed from the tag cloud. 78 */ 79 void setWordsToFilter(String[] wordsToFilter); 80 81 // --- business ------------------------------------------------------------- 82 83 /** 84 * Creates an instance of the tag cloud for arbitrary texts. 85 * 86 * @return an instance of the tag cloud. 87 */ 88 TagCloud createTextCloud(); 89 90 /** 91 * Creates an instance of the tag cloud for Java source code. 92 * 93 * @return an instance of the tag cloud. 94 */ 95 TagCloud createJavaCloud(); 96 97 // --- object basics -------------------------------------------------------- 98 }