1 package org.columba.core.tagging; 2 3 import java.awt.Color ; 4 5 import org.columba.core.tagging.api.ITag; 6 7 13 public class Tag implements ITag { 14 15 private String id; 16 private Color color; 18 private String name; 19 private String description; 20 21 public Tag(String newId, String name) { 22 this.id = newId; 23 this.name = name; 24 } 25 26 public String getId() { 27 return id; 28 } 29 30 42 public Color getColor() { 43 return color; 44 } 45 46 public String getName() { 47 return name; 48 } 49 50 public void setColor(Color color) { 51 if ( color == null ) throw new IllegalArgumentException ("color == null"); 52 this.color = color; 53 } 54 55 public void setName(String name) { 56 if ( name == null ) throw new IllegalArgumentException ("name == null"); 57 if ( name.length() == 0 ) throw new IllegalArgumentException ("name length == 0"); 58 59 this.name = name; 60 } 61 62 public String getDescription() { 63 return description; 64 } 65 66 public void setDescription(String description) { 67 this.description = description; 68 } 69 70 } 71 | Popular Tags |