1 /* 2 * XNap Commons 3 * 4 * Copyright (C) 2005 Steffen Pingel 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 package org.xnap.commons.pkg; 21 22 import javax.swing.Icon; 23 24 /*** 25 * @see PackageManager 26 */ 27 public class DefaultPackageSection implements PackageSection 28 { 29 30 private Icon icon; 31 private String name; 32 33 public DefaultPackageSection(String name, Icon icon) 34 { 35 this.name = name; 36 this.icon = icon; 37 } 38 39 /*** 40 * @see PackageSection#getIcon() 41 */ 42 public Icon getIcon() 43 { 44 return icon; 45 } 46 47 /*** 48 * @see PackageSection#getName() 49 */ 50 public String getName() 51 { 52 return name; 53 } 54 55 /*** 56 * @see DefaultPackageSection#getName() 57 */ 58 public String toString() 59 { 60 return getName(); 61 } 62 63 } 64