comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/Style.java @ 1345:92074508a387

Added documentation. flys-client/trunk@3003 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 18 Oct 2011 12:33:23 +0000
parents 974c6b3700de
children bb91cdf8407b
comparison
equal deleted inserted replaced
1344:51d4b51a51ed 1345:92074508a387
8 /** 8 /**
9 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> 9 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
10 */ 10 */
11 public class Style implements Serializable { 11 public class Style implements Serializable {
12 12
13 /** The theme name. */
13 protected String name; 14 protected String name;
14 15
16 /** The facet. */
15 protected String facet; 17 protected String facet;
16 18
19 /** The theme index. */
17 protected int index; 20 protected int index;
18 21
22 /** List of theme attribute settings. */
19 protected List<StyleSetting> settings; 23 protected List<StyleSetting> settings;
20 24
25
26 /**
27 * Create a new style for theme attribution.
28 */
21 public Style() { 29 public Style() {
22 settings = new ArrayList<StyleSetting>(); 30 settings = new ArrayList<StyleSetting>();
23 } 31 }
24 32
33
34 /**
35 * Append a new style setting.
36 * @param setting A theme attribution setting.
37 */
25 public void appendStyleSetting(StyleSetting setting) { 38 public void appendStyleSetting(StyleSetting setting) {
26 settings.add(setting); 39 settings.add(setting);
27 } 40 }
28 41
29 public void setName(String name) { 42 public void setName(String name) {
48 61
49 public int getIndex() { 62 public int getIndex() {
50 return this.index; 63 return this.index;
51 } 64 }
52 65
66
67 /**
68 * Getter for a theme attribution setting.
69 * @return The style setting.
70 */
53 public StyleSetting getSetting(String name) { 71 public StyleSetting getSetting(String name) {
54 for (int i = 0; i < settings.size (); i++) { 72 for (int i = 0; i < settings.size (); i++) {
55 if (settings.get(i).getName().equals(name)) { 73 if (settings.get(i).getName().equals(name)) {
56 return settings.get(i); 74 return settings.get(i);
57 } 75 }
58 } 76 }
59 return null; 77 return null;
60 } 78 }
61 79
80
81 /**
82 * Getter for number of settings.
83 * @return The size of the settings list.
84 */
62 public int getNumSettings () { 85 public int getNumSettings () {
63 return settings.size(); 86 return settings.size();
64 } 87 }
65 88
89
90 /**
91 * Getter for style setting.
92 * @param i The index in the settings list.
93 *
94 * @return The style setting at the given index.
95 */
66 public StyleSetting getSetting(int i) { 96 public StyleSetting getSetting(int i) {
67 return this.settings.get(i); 97 return this.settings.get(i);
68 } 98 }
69 } 99 }
70 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 100 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org