001/* ----------------------------------------------------------------------------
002   The Kiwi Toolkit - A Java Class Library
003   Copyright (C) 1998-2004 Mark A. Lindner
004
005   This library is free software; you can redistribute it and/or
006   modify it under the terms of the GNU General Public License as
007   published by the Free Software Foundation; either version 2 of the
008   License, or (at your option) any later version.
009
010   This library is distributed in the hope that it will be useful,
011   but WITHOUT ANY WARRANTY; without even the implied warranty of
012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013   General Public License for more details.
014
015   You should have received a copy of the GNU General Public License
016   along with this library; if not, write to the Free Software
017   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
018   02111-1307, USA.
019 
020   The author may be contacted at: mark_a_lindner@yahoo.com
021   ----------------------------------------------------------------------------
022   $Log: UIElement.java,v $
023   Revision 1.4  2004/05/12 18:53:25  markl
024   comment block updates
025
026   Revision 1.3  2003/01/19 09:50:54  markl
027   Javadoc & comment header updates.
028
029   Revision 1.2  2001/03/12 09:28:01  markl
030   Source code and Javadoc cleanup.
031
032   Revision 1.1  1999/05/10 09:08:02  markl
033   Initial revision
034   ----------------------------------------------------------------------------
035*/
036
037package kiwi.ui;
038
039/** This class represents a user interface element, such as a texture, icon,
040 * or audio clip.
041 *
042 * @author Mark Lindner
043 */
044
045public class UIElement
046  {
047  private Object element;
048  private String name;
049
050  /** Construct a new <code>UIElement</code>.
051   */
052  
053  public UIElement()
054    {
055    this(null, null);
056    }
057
058  /** Construct a new <code>UIElement</code> for the specified element and
059   * name.
060   *
061   * @param element The user interface element object proper.
062   * @param name A descriptive name for the element.
063   */
064  
065  public UIElement(Object element, String name)
066    {
067    this.element = element;
068    this.name = name;
069    }
070
071  /** Get the name of the element.
072   *
073   * @return The name of the element.
074   */
075  
076  public String getName()
077    {
078    return(name);
079    }
080
081  /** Get the element object.
082   *
083   * @return The user interface element object proper.
084   */
085  
086  public Object getObject()
087    {
088    return(element);
089    }
090
091  /** Get a string representation for this object.
092   *
093   * @return The name of the element.
094   */
095
096  public String toString()
097    {
098    return(name);
099    }
100  
101  }
102
103/* end of source file */