Logo
Distributed Genetic Programming Framework
print print

File org.sfc.xml.formats.meta.Unit.java

Here you can find all the information about the file org.sfc.xml.formats.meta.Unit.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-20 07:56:37
 * Original Filename: org.sfc.xml.formats.meta.Unit.java
 * Version          : 3.0.2
 * Last modification: 2006-05-28
 *                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.xml.formats.meta;

import org.sfc.id.ID;
import org.sfc.id.IDManager;

/**
 * This class is used to define units.
 *
 * @author Thomas Weise
 */

public class Unit  extends ID<String,Unit>
  {
/**
 * The serial version uid.
 */

  private static  final long           serialVersionUID = 1;
/**
 * The internal id manager.
 */

  public  static  final IDManager<String,Unit> MANAGER =  
      new IDManager<String,Unit>();
/**
 * The unit "points".
 */

  public  static  final NoPercentUnit POINT = new NoPercentUnit("pt");
/**
 * The unit "pica".
 */

  public  static  final NoPercentUnit  PICA = new NoPercentUnit("pc");
/**
 * The unit "inch".
 */

  public  static  final NoPercentUnit  INCH = new NoPercentUnit("in");
/**
 * The unit "millimeters".
 */

  public  static  final NoPercentUnit  MM   = new NoPercentUnit("mm");
/**
 * The unit "centimeters".
 */

  public  static  final NoPercentUnit  CM   = new NoPercentUnit("cm");
/**
 * The unit "em".
 */

  public  static  final NoPercentUnit  EM   = new NoPercentUnit("em");
/**
 * The unit "ex".
 */

  public  static  final NoPercentUnit  EX   = new NoPercentUnit("ex");
/**
 * The unit "pixel".
 */

  public  static  final NoPercentUnit  PIXEL= new NoPercentUnit("px");
/**
 * The unit "percent".
 */

  public  static  final Unit  PERCENT   = new Unit("%");

/**
 * The default unit.
 */

  public  static  final Unit  DEFAULT = PIXEL;

/**
 * Create a new Unit.
 * @param p_name  The name of the new unit.
 */

  Unit  (final String p_name)
    {
    super(p_name);
    }

/**
 * Obtain the manager for the ids of this type.
 * @return  The manager for the ids of this type.
 */

  @Override
  protected final IDManager<String, Unit> get_manager ()
    {
    return MANAGER;
    }

/**
 * This class is used to define non-percent units.
 *
 * @author Thomas Weise
 */

  public final  static  class NoPercentUnit  extends Unit
    {
/**
 * The serial version uid.
 */

    private static  final long           serialVersionUID = 1;

/**
 * Create a new Unit.
 * @param p_name  The name of the new unit.
 */

    NoPercentUnit  (final String p_name)
      {
      super(p_name);
      }
    }
  }

File Information:

file name:Unit.java
package:org.sfc.xml.formats.meta
qualified name:org.sfc.xml.formats.meta.Unit.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/sfc/xml/formats/meta/Unit.java
size:3.275 KB (3354 B)
uploaded: 2018-01-07 12:03:36 GMT+0000
last update: 2006-05-28 13:59:30 GMT+0000
last access: 2018-04-21 07:43:26 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 2018-01-07 12:03:34 GMT+0000 served at 2018-04-21 07:43:26 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo