/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.pango;
import org.gnu.glib.Enum;
/**
 * describes how to align the lines of a PangoLayout within the available space.
 * If the PangoLayout is set to justify using pango_layout_set_justify(), then
 * this only has an effect for partial lines.
 */
public class Alignment extends Enum 
{
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    static final private int _LEFT = 0;
	/** Put all available space on the right */
    static final public org.gnu.pango.Alignment LEFT = new org.gnu.pango.Alignment (_LEFT);
    static final private int _CENTER = 1;
	/** Center the line within the available space */
    static final public org.gnu.pango.Alignment CENTER = new org.gnu.pango.Alignment (_CENTER);
    static final private int _RIGHT = 2;
	/** Put all available space on the left */
    static final public org.gnu.pango.Alignment RIGHT = new org.gnu.pango.Alignment (_RIGHT);
    static final private org.gnu.pango.Alignment[] theInterned = new org.gnu.pango.Alignment[] 
    {
        LEFT, CENTER, RIGHT 
    }

;
    static private java.util.Hashtable theInternedExtras;
    static final private org.gnu.pango.Alignment theSacrificialOne = new org.gnu.pango.Alignment (0);
    static public org.gnu.pango.Alignment intern (int value) 
    {
        if (value < theInterned.length) 
        {
            return theInterned[value];
        }
        theSacrificialOne.value_ = value;
        if (theInternedExtras == null) 
        {
            theInternedExtras = new java.util.Hashtable();
        }
        org.gnu.pango.Alignment already = (org.gnu.pango.Alignment) theInternedExtras.get (
            theSacrificialOne);
        if (already == null) 
        {
            already = new org.gnu.pango.Alignment(value);
            theInternedExtras.put(already, already);
        }
        return already;
    }

    private Alignment (int value) 
    {
        value_ = value;
    }

    public org.gnu.pango.Alignment or (org.gnu.pango.Alignment other) 
    {
        return intern(value_ | other.value_);
    }

    public org.gnu.pango.Alignment and (org.gnu.pango.Alignment other) 
    {
        return intern(value_ & other.value_);
    }

    public org.gnu.pango.Alignment xor (org.gnu.pango.Alignment other) 
    {
        return intern(value_ ^ other.value_);
    }

    public boolean test (org.gnu.pango.Alignment other) 
    {
        return (value_ & other.value_) == other.value_;
    }

    /****************************************
     * END OF GENERATED CODE
     ****************************************/
}

