001 // This file is part of the Attempto Java Packages. 002 // Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch). 003 // 004 // The Attempto Java Packages is free software: you can redistribute it and/or modify it under the 005 // terms of the GNU Lesser General Public License as published by the Free Software Foundation, 006 // either version 3 of the License, or (at your option) any later version. 007 // 008 // The Attempto Java Packages is distributed in the hope that it will be useful, but WITHOUT ANY 009 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 010 // PURPOSE. See the GNU Lesser General Public License for more details. 011 // 012 // You should have received a copy of the GNU Lesser General Public License along with the Attempto 013 // Java Packages. If not, see http://www.gnu.org/licenses/. 014 015 package ch.uzh.ifi.attempto.acewiki.gui; 016 017 import ch.uzh.ifi.attempto.echocomp.Label; 018 import nextapp.echo2.app.Component; 019 import nextapp.echo2.app.Extent; 020 import nextapp.echo2.app.Row; 021 022 /** 023 * This class represents a GUI component that is shown as a list item with a preceding "-". 024 * 025 * @author Tobias Kuhn 026 */ 027 public class ListItem extends Row { 028 029 private static final long serialVersionUID = 1214629285195105570L; 030 031 /** 032 * Creates a new list item that contains the given components. 033 * 034 * @param components The components of the list item. 035 */ 036 public ListItem(Component... components) { 037 setCellSpacing(new Extent(2)); 038 add(new Label("-")); 039 for (Component c : components) { 040 add(c); 041 } 042 } 043 044 }