Logo
Distributed Genetic Programming Framework
print print

File org.sfc.gui.DefaultIcon.java

Here you can find all the information about the file org.sfc.gui.DefaultIcon.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2005 Thomas Weise
 *
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2005-08-30 14:07:23
 * Original Filename: org.sfc.gui.DefaultIcon.java
 * Version          : 2.0.1
 * Last modification: 2006-03-07
 *                by: Thomas Weise
 *
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */


package org.sfc.gui;

import java.awt.Component;
import java.awt.Graphics;

import javax.swing.Icon;

import org.sfc.utils.ICloneable;

/**
 * This class can be used as base for any self-defined image stuff.
 *
 * @author Thomas Weise
 */

public class DefaultIcon implements  Icon, ICloneable
  {
/**
 * The icon's width.
 */

  private int   m_width   ;
/**
 * The icon's height.
 */

  private int   m_height  ;


/**
 * The default constructor of images.
 * @param p_width   The image's width.
 * @param p_height  The image's height.
 */

  public  DefaultIcon  (final  int p_width,
                        final  int p_height)
    {
    super();
    this.m_width  = p_width;
    this.m_height = p_height;
    }


/**
 * Draw the icon at the specified location.  Icon implementations
 * may use the Component argument to get properties useful for
 * painting, e.g. the foreground or background color.
 * @param p_c   The component to paint on.
 * @param p_g   The graphics to be used.
 * @param p_x   The x-position where to paint.
 * @param p_y   The y-position where to paint.
 */

  public  void paintIcon(final  Component p_c,
                         final  Graphics  p_g,
                         final  int       p_x,
                         final  int       p_y)
    {
    //
    }

/**
 * Returns the icon's width.
 *
 * @return an int specifying the fixed width of the icon.
 */

  public  final int getIconWidth()
    {
    return this.m_width;
    }

/**
 * Returns the icon's height.
 *
 * @return an int specifying the fixed height of the icon.
 */

  public  final int getIconHeight()
    {
    return this.m_height;
    }

/**
 * Clone this image.
 * @return  The cloned image.
 */

  @Override
  public final Object  clone ()
    {
    try
      {
      return super.clone();
      }
    catch(CloneNotSupportedException l_cnse)
      {
      return null;
      }
    }
  }

File Information:

file name:DefaultIcon.java
package:org.sfc.gui
qualified name:org.sfc.gui.DefaultIcon.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/sfc/gui/DefaultIcon.java
size:2.995 KB (3067 B)
uploaded: 2015-07-22 04:11:11 GMT+0000
last update: 2006-03-07 04:19:29 GMT+0000
last access: 2018-01-24 01:13:01 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2018-01-24 01:13:01 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo