2002/css-validator/org/w3c/css/properties/css2/table BorderCollapse.java,NONE,1.1 BorderCollapseATSC.java,NONE,1.1 BorderSpacing.java,NONE,1.1 BorderSpacingATSC.java,NONE,1.1 CaptionSide.java,NONE,1.1 ColumnSpan.java,NONE,1.1 ColumnSpanATSC.java,NONE,1.1 Css2Style.java,NONE,1.1 EmptyCells.java,NONE,1.1 EmptyCellsATSC.java,NONE,1.1 RowSpan.java,NONE,1.1 RowSpanATSC.java,NONE,1.1 SpeakHeader.java,NONE,1.1 SpeakHeaderATSC.java,NONE,1.1 TableLayout.java,NONE,1.1 TableLayoutATSC.java,NONE,1.1 TableProperties.java,NONE,1.1 TableProperty.java,NONE,1.1

Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2/table
In directory hutz:/tmp/cvs-serv9948/table

Added Files:
	BorderCollapse.java BorderCollapseATSC.java BorderSpacing.java 
	BorderSpacingATSC.java CaptionSide.java ColumnSpan.java 
	ColumnSpanATSC.java Css2Style.java EmptyCells.java 
	EmptyCellsATSC.java RowSpan.java RowSpanATSC.java 
	SpeakHeader.java SpeakHeaderATSC.java TableLayout.java 
	TableLayoutATSC.java TableProperties.java TableProperty.java 
Log Message:
major reorganization of property files

--- NEW FILE: Css2Style.java ---
//
// $Id: Css2Style.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */
package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssPrinterStyle;
import org.w3c.css.properties.aural.ACssStyle;

/**
 * @version $Revision: 1.1 $
 */
public class Css2Style extends ACssStyle {

    RowSpan rowSpan;
    RowSpanATSC rowSpanATSC;
    ColumnSpan columnSpan;
    ColumnSpanATSC columnSpanATSC;
    CaptionSide captionSide;
    TableLayout tableLayout;
    TableLayoutATSC tableLayoutATSC;
    BorderCollapse borderCollapse;
    BorderCollapseATSC borderCollapseATSC;
    BorderSpacing borderSpacing;
    BorderSpacingATSC borderSpacingATSC;
    EmptyCells emptyCells;
    EmptyCellsATSC emptyCellsATSC;
    SpeakHeader speakHeader;
    SpeakHeaderATSC speakHeaderATSC;

    /**
     * Get the row-span property
     */
    public final RowSpan getRowSpan() {
	if (rowSpan == null) {
	    rowSpan = (RowSpan)
		style.CascadingOrder(new RowSpan(), style, selector);
	}
	return rowSpan;
    }

    public final RowSpanATSC getRowSpanATSC() {
	if (rowSpanATSC == null) {
	    rowSpanATSC = (RowSpanATSC)
		style.CascadingOrder(new RowSpanATSC(), style, selector);
	}
	return rowSpanATSC;
    }

    /**
     * Get the column-span property
     */

    public final ColumnSpan getColumnSpan() {
	if (columnSpan == null) {
	    columnSpan = (ColumnSpan)
		style.CascadingOrder(new ColumnSpan(), style, selector);
	}
	return columnSpan;
    }

    public final ColumnSpanATSC getColumnSpanATSC() {
	if (columnSpanATSC == null) {
	    columnSpanATSC = (ColumnSpanATSC)
		style.CascadingOrder(new ColumnSpanATSC(), style, selector);
	}
	return columnSpanATSC;
    }

    /**
     * Get the table-layout property
     */
    public final TableLayout getTableLayout() {
	if (tableLayout == null) {
	    tableLayout = (TableLayout)
		style.CascadingOrder(new TableLayout(), style, selector);
	}
	return tableLayout;
    }

    public final TableLayoutATSC getTableLayoutATSC() {
	if (tableLayoutATSC == null) {
	    tableLayoutATSC = (TableLayoutATSC)
		style.CascadingOrder(new TableLayoutATSC(), style, selector);
	}
	return tableLayoutATSC;
    }

    /**
     * Get the caption-side property
     */
    public final CaptionSide getCaptionSide() {
	if (captionSide == null) {
	    captionSide = (CaptionSide)
		style.CascadingOrder(new CaptionSide(), style, selector);
	}
	return captionSide;
    }

    /**
     * Get the border-collapse property
     */
    public final BorderCollapse getBorderCollapse() {
	if (borderCollapse == null) {
	    borderCollapse = (BorderCollapse)
		style.CascadingOrder(new BorderCollapse(), style, selector);
	}
	return borderCollapse;
    }

    public final BorderCollapseATSC getBorderCollapseATSC() {
	if (borderCollapseATSC == null) {
	    borderCollapseATSC = (BorderCollapseATSC)
		style.CascadingOrder(new BorderCollapseATSC(), style, selector);
	}
	return borderCollapseATSC;
    }

    /**
     * Get the border-spacing property
     */
    public final BorderSpacing getBorderSpacing() {
	if (borderSpacing == null) {
	    borderSpacing = (BorderSpacing)
		style.CascadingOrder(new BorderSpacing(), style, selector);
	}
	return borderSpacing;
    }

    public final BorderSpacingATSC getBorderSpacingATSC() {
	if (borderSpacingATSC == null) {
	    borderSpacingATSC = (BorderSpacingATSC)
		style.CascadingOrder(new BorderSpacingATSC(), style, selector);
	}
	return borderSpacingATSC;
    }

    /**
     * Get the emtpy-cells property
     */
    public final EmptyCells getEmptyCells() {
	if (emptyCells == null) {
	    emptyCells = (EmptyCells)
		style.CascadingOrder(new EmptyCells(), style, selector);
	}
	return emptyCells;
    }

    public final EmptyCellsATSC getEmptyCellsATSC() {
	if (emptyCellsATSC == null) {
	    emptyCellsATSC = (EmptyCellsATSC)
		style.CascadingOrder(new EmptyCellsATSC(), style, selector);
	}
	return emptyCellsATSC;
    }

    /**
     * Get the emtpy-header property
     */
    public final SpeakHeader getSpeakHeader() {
	if (speakHeader == null) {
	    speakHeader = (SpeakHeader)
		style.CascadingOrder(new SpeakHeader(), style, selector);
	}
	return speakHeader;
    }

    public final SpeakHeaderATSC getSpeakHeaderATSC() {
	if (speakHeaderATSC == null) {
	    speakHeaderATSC = (SpeakHeaderATSC)
		style.CascadingOrder(new SpeakHeaderATSC(), style, selector);
	}
	return speakHeaderATSC;
    }


    /**
     * Print this style.
     *
     * @param printer The printer interface.
     */
    public void print(CssPrinterStyle printer) {
	super.print(printer);

	if (rowSpan != null) {
	    rowSpan.print(printer);
	}
	if (rowSpanATSC != null) {
	    rowSpanATSC.print(printer);
	}
	if (columnSpan != null) {
	    columnSpan.print(printer);
	}
	if (columnSpanATSC != null) {
	    columnSpanATSC.print(printer);
	}
	if (tableLayout != null) {
	    tableLayout.print(printer);
	}
	if (tableLayoutATSC != null) {
	    tableLayoutATSC.print(printer);
	}
	if (captionSide != null) {
	    captionSide.print(printer);
	}
	if (borderCollapse != null) {
	    borderCollapse.print(printer);
	}
	if (borderCollapseATSC != null) {
	    borderCollapseATSC.print(printer);
	}
	if (borderSpacing != null) {
	    borderSpacing.print(printer);
	}
	if (borderSpacingATSC != null) {
	    borderSpacingATSC.print(printer);
	}
	if (emptyCells != null) {
	    emptyCells.print(printer);
	}
	if (emptyCellsATSC != null) {
	    emptyCellsATSC.print(printer);
	}
	if (speakHeader != null) {
	    speakHeader.print(printer);
	}
	if (speakHeaderATSC != null) {
	    speakHeaderATSC.print(printer);
	}
    }
}

--- NEW FILE: TableProperty.java ---
//
// $Id: TableProperty.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.properties.css1.CssProperty;

/**
 * @version $Revision: 1.1 $
 */
public abstract class TableProperty extends CssProperty {

  /**
   * Returns true if the property is inherited
   */
  public boolean Inherited() {
    return TableProperties.getInheritance(this);
  }

}

--- NEW FILE: TableProperties.java ---
//
// $Id: TableProperties.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css2.table;

import java.net.URL;

import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.Utf8Properties;

/**
 * @version $Revision: 1.1 $
 */
public class TableProperties {
    public static Utf8Properties properties;

    public static String getString(CssProperty property, String prop) {
      return properties.getProperty(property.getPropertyName() + "." + prop);
    }
    
    public static boolean getInheritance(CssProperty property) {
	return getString(property, "inherited").equals("true");
    }
  
    static {
	properties = new Utf8Properties();
	try {
	    URL url = TableProperties.class
	    .getResource("TableDefault.properties");
	    properties.load(url.openStream());
	} catch (Exception e) {
	    System.err
	    .println("org.w3c.css.properties.css2.table.TableProperties: couldn't load properties ");
	    System.err.println("  " + e.toString());
	}
    }
}

--- NEW FILE: BorderSpacingATSC.java ---
//
// $Id: BorderSpacingATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssLength;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssOperator;
import org.w3c.css.values.CssValue;


/**
 */
public class BorderSpacingATSC extends TableProperty implements CssOperator {
    
    CssValue value;

    CssLength second;

    /**
     * Create a new BorderSpacingATSC
     */  
    public BorderSpacingATSC() {
    }
    
    /**
     * Creates a new CssBorderSpacingATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public BorderSpacingATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 2) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	CssLength le = getLength(val);
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    if(expression.getCount() > 1) {
		throw new InvalidParamException("unrecognize", ac);
	    }
	    value = inherit;
	} else if (le != null) {
	    value = le;
	    if (expression.getOperator() == SPACE) {
		expression.next();
		if(expression.getValue().equals(inherit)) {
		    throw new InvalidParamException("unrecognize", ac);
		}
		le = getLength(expression.getValue());
		if (le != null) {
		    second = le;
		} else {
		    return;
		}
	    }
		
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public BorderSpacingATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	if (second != null) {
	    return value + " " + second;
	} else {
	    return value.toString();
	}
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "border-spacing";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.borderSpacingATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.borderSpacingATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getBorderSpacingATSC();
	} else {
	    return ((Css2Style) style).borderSpacingATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof BorderSpacingATSC && 
		    ((BorderSpacingATSC) property).value == value);
	} else {
	    return (property instanceof BorderSpacingATSC && 
		    ((BorderSpacingATSC) property).value.equals(value));
	}
    }
    
    CssLength getLength(CssValue val) throws InvalidParamException {
	if (val instanceof CssLength) {
	    return (CssLength) val;
	} else if (val instanceof CssNumber) {
	    return ((CssNumber) val).getLength();
	} else {
	    return null;
	}
    }

}

--- NEW FILE: RowSpan.java ---
//
// $Id: RowSpan.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssValue;


/**
 */
public class RowSpan extends TableProperty {
    
    CssValue value;
    
    /**
     * Create a new RowSpan
     */  
    public RowSpan() {
	value = new CssNumber(null, 1);
    }
    
    /**
     * Creates a new CssRowSpan
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public RowSpan(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	    expression.next();
	    return;
	} else if (val instanceof CssNumber) {
	    if (((CssNumber) val).isInteger()) {
		value = val;
		expression.next();
		return;
	    } else {
		throw new InvalidParamException("integer", 
						val.toString(), 
						getPropertyName(), ac);
	    }
	} 
	
	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
    }
    
    public RowSpan(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "row-span";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.rowSpan != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.rowSpan = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getRowSpan();
	} else {
	    return ((Css2Style) style).rowSpan;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof RowSpan && 
		    ((RowSpan) property).value == value);
	} else {
	    return (property instanceof RowSpan && 
		    ((RowSpan) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: RowSpanATSC.java ---
//
// $Id: RowSpanATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssValue;


/**
 */
public class RowSpanATSC extends TableProperty {
    
    CssValue value;
    
    /**
     * Create a new RowSpanATSC
     */  
    public RowSpanATSC() {
	value = new CssNumber(null, 1);
    }
    
    /**
     * Creates a new CssRowSpanATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public RowSpanATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	    expression.next();
	    return;
	} else if (val instanceof CssNumber) {
	    if (((CssNumber) val).isInteger()) {
		value = val;
		expression.next();
		return;
	    } else {
		throw new InvalidParamException("integer", 
						val.toString(), 
						getPropertyName(), ac);
	    }
	} 
	
	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
    }
    
    public RowSpanATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "row-span";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.rowSpanATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.rowSpanATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getRowSpanATSC();
	} else {
	    return ((Css2Style) style).rowSpanATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof RowSpanATSC && 
		    ((RowSpanATSC) property).value == value);
	} else {
	    return (property instanceof RowSpanATSC && 
		    ((RowSpanATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: BorderCollapse.java ---
//
// $Id: BorderCollapse.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class BorderCollapse extends TableProperty {
    
    CssValue value;
    
    private static CssIdent collapse = new CssIdent("collapse");
    private static CssIdent separate = new CssIdent("separate");

    /**
     * Create a new BorderCollapse
     */  
    public BorderCollapse() {
	value = collapse;
    }
    
    /**
     * Creates a new CssBorderCollapse
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public BorderCollapse(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(collapse)) {
	    value = collapse;
	} else if (val.equals(separate)) {
	    value = separate;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public BorderCollapse(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "border-collapse";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.borderCollapse != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.borderCollapse = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getBorderCollapse();
	} else {
	    return ((Css2Style) style).borderCollapse;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof BorderCollapse && 
		    ((BorderCollapse) property).value == value);
	} else {
	    return (property instanceof BorderCollapse && 
		    ((BorderCollapse) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: BorderCollapseATSC.java ---
//
// $Id: BorderCollapseATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class BorderCollapseATSC extends TableProperty {
    
    CssValue value;
    
    private static CssIdent collapse = new CssIdent("collapse");
    private static CssIdent separate = new CssIdent("separate");

    /**
     * Create a new BorderCollapseATSC
     */  
    public BorderCollapseATSC() {
	value = collapse;
    }
    
    /**
     * Creates a new CssBorderCollapseATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public BorderCollapseATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(collapse)) {
	    value = collapse;
	} else if (val.equals(separate)) {
	    value = separate;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public BorderCollapseATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "border-collapse";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.borderCollapseATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.borderCollapseATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getBorderCollapseATSC();
	} else {
	    return ((Css2Style) style).borderCollapseATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof BorderCollapseATSC && 
		    ((BorderCollapseATSC) property).value == value);
	} else {
	    return (property instanceof BorderCollapseATSC && 
		    ((BorderCollapseATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: TableLayout.java ---
//
// $Id: TableLayout.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class TableLayout extends TableProperty {
    
    CssValue value;
    
    private static CssIdent auto = new CssIdent("auto");
    private static CssIdent fixed = new CssIdent("fixed");

    /**
     * Create a new TableLayout
     */  
    public TableLayout() {
	value = auto;
    }
    
    /**
     * Creates a new CssTableLayout
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public TableLayout(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(auto)) {
	    value = auto;
	} else if (val.equals(fixed)) {
	    value = fixed;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public TableLayout(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "table-layout";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.tableLayout != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.tableLayout = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getTableLayout();
	} else {
	    return ((Css2Style) style).tableLayout;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof TableLayout && 
		    ((TableLayout) property).value == value);
	} else {
	    return (property instanceof TableLayout && 
		    ((TableLayout) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: BorderSpacing.java ---
//
// $Id: BorderSpacing.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssLength;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssOperator;
import org.w3c.css.values.CssValue;


/**
 */
public class BorderSpacing extends TableProperty implements CssOperator {
    
    CssValue value;

    CssLength second;

    /**
     * Create a new BorderSpacing
     */  
    public BorderSpacing() {
    }
    
    /**
     * Creates a new CssBorderSpacing
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public BorderSpacing(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 2) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	CssLength le = getLength(val);
	setByUser();

	if (val.equals(inherit)) {
	    if(expression.getCount() > 1) {
		throw new InvalidParamException("unrecognize", ac);
	    }
	    value = inherit;
	} else if (le != null) {
	    value = le;
	    if (expression.getOperator() == SPACE) {		
		expression.next();		
		val = expression.getValue();
		if(val != null && val.equals(inherit)) {
		    throw new InvalidParamException("unrecognize", ac);
		}
		le = getLength(expression.getValue());
		if (le != null) {
		    second = le;
		} else {
		    return;
		}
	    }
		
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public BorderSpacing(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	if (second != null) {
	    return value + " " + second;
	} else {
	    return value.toString();
	}
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "border-spacing";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.borderSpacing != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.borderSpacing = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getBorderSpacing();
	} else {
	    return ((Css2Style) style).borderSpacing;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof BorderSpacing && 
		    ((BorderSpacing) property).value == value);
	} else {
	    return (property instanceof BorderSpacing && 
		    ((BorderSpacing) property).value.equals(value));
	}
    }
    
    CssLength getLength(CssValue val) throws InvalidParamException {
	if (val instanceof CssLength) {
	    return (CssLength) val;
	} else if (val instanceof CssNumber) {
	    return ((CssNumber) val).getLength();
	} else {
	    return null;
	}
    }

}

--- NEW FILE: ColumnSpanATSC.java ---
//
// $Id: ColumnSpanATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssValue;


/**
 */
public class ColumnSpanATSC extends TableProperty {
    
    CssValue value;
    
    /**
     * Create a new ColumnSpanATSC
     */  
    public ColumnSpanATSC() {
	value = new CssNumber(null, 1);
    }
    
    /**
     * Creates a new CssColumnSpanATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public ColumnSpanATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	    expression.next();
	    return;
	} else if (val instanceof CssNumber) {
	    if (((CssNumber) val).isInteger()) {
		value = val;
		expression.next();
		return;
	    } else {
		throw new InvalidParamException("integer", 
						val.toString(), 
						getPropertyName(), ac);
	    }
	} 
	
	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
    }
    
    public ColumnSpanATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "column-span";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.columnSpanATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.columnSpanATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getColumnSpanATSC();
	} else {
	    return ((Css2Style) style).columnSpanATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof ColumnSpanATSC && 
		    ((ColumnSpanATSC) property).value == value);
	} else {
	    return (property instanceof ColumnSpanATSC && 
		    ((ColumnSpanATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: SpeakHeaderATSC.java ---
//
// $Id: SpeakHeaderATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class SpeakHeaderATSC extends TableProperty {
    
    CssValue value;
    
    private static CssIdent once = new CssIdent("once");
    private static CssIdent always = new CssIdent("always");

    /**
     * Create a new SpeakHeaderATSC
     */  
    public SpeakHeaderATSC() {
	value = once;
    }
    
    /**
     * Creates a new CssSpeakHeaderATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public SpeakHeaderATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(once)) {
	    value = once;
	} else if (val.equals(always)) {
	    value = always;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public SpeakHeaderATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "speak-header";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.speakHeaderATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.speakHeaderATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getSpeakHeaderATSC();
	} else {
	    return ((Css2Style) style).speakHeaderATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof SpeakHeaderATSC && 
		    ((SpeakHeaderATSC) property).value == value);
	} else {
	    return (property instanceof SpeakHeaderATSC && 
		    ((SpeakHeaderATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: ColumnSpan.java ---
//
// $Id: ColumnSpan.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssValue;


/**
 */
public class ColumnSpan extends TableProperty {
    
    CssValue value;
    
    /**
     * Create a new ColumnSpan
     */  
    public ColumnSpan() {
	value = new CssNumber(null, 1);
    }
    
    /**
     * Creates a new CssColumnSpan
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public ColumnSpan(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	    expression.next();
	    return;
	} else if (val instanceof CssNumber) {
	    if (((CssNumber) val).isInteger()) {
		value = val;
		expression.next();
		return;
	    } else {
		throw new InvalidParamException("integer", 
						val.toString(), 
						getPropertyName(), ac);
	    }
	} 
	
	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
    }
    
    public ColumnSpan(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "column-span";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.columnSpan != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.columnSpan = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getColumnSpan();
	} else {
	    return ((Css2Style) style).columnSpan;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof ColumnSpan && 
		    ((ColumnSpan) property).value == value);
	} else {
	    return (property instanceof ColumnSpan && 
		    ((ColumnSpan) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: TableLayoutATSC.java ---
//
// $Id: TableLayoutATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class TableLayoutATSC extends TableProperty {
    
    CssValue value;
    
    private static CssIdent auto = new CssIdent("auto");
    private static CssIdent fixed = new CssIdent("fixed");

    /**
     * Create a new TableLayoutATSC
     */  
    public TableLayoutATSC() {
	value = auto;
    }
    
    /**
     * Creates a new CssTableLayoutATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public TableLayoutATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(auto)) {
	    value = auto;
	} else if (val.equals(fixed)) {
	    value = fixed;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public TableLayoutATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "table-layout";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.tableLayoutATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.tableLayoutATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getTableLayoutATSC();
	} else {
	    return ((Css2Style) style).tableLayoutATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof TableLayoutATSC && 
		    ((TableLayoutATSC) property).value == value);
	} else {
	    return (property instanceof TableLayoutATSC && 
		    ((TableLayoutATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: SpeakHeader.java ---
//
// $Id: SpeakHeader.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class SpeakHeader extends TableProperty {
    
    CssValue value;
    
    private static CssIdent once = new CssIdent("once");
    private static CssIdent always = new CssIdent("always");

    /**
     * Create a new SpeakHeader
     */  
    public SpeakHeader() {
	value = once;
    }
    
    /**
     * Creates a new CssSpeakHeader
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public SpeakHeader(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(once)) {
	    value = once;
	} else if (val.equals(always)) {
	    value = always;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public SpeakHeader(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "speak-header";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.speakHeader != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.speakHeader = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getSpeakHeader();
	} else {
	    return ((Css2Style) style).speakHeader;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof SpeakHeader && 
		    ((SpeakHeader) property).value == value);
	} else {
	    return (property instanceof SpeakHeader && 
		    ((SpeakHeader) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: CaptionSide.java ---
//
// $Id: CaptionSide.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class CaptionSide extends TableProperty {
    
    CssValue value;
    
    private static CssIdent top = new CssIdent("top");
    private static CssIdent bottom = new CssIdent("bottom");
    private static CssIdent right = new CssIdent("right");
    private static CssIdent left = new CssIdent("left");

    /**
     * Create a new CaptionSide
     */  
    public CaptionSide() {
	value = top;
    }
    
    /**
     * Creates a new CssCaptionSide
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public CaptionSide(ApplContext ac, CssExpression expression, boolean check)
    	throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(top)) {
	    value = top;
	} else if (val.equals(bottom)) {
	    value = bottom;
	} else if (val.equals(left)) {
	    value = left;
	} else if (val.equals(right)) {
	    value = right;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public CaptionSide(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "caption-side";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.captionSide != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.captionSide = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getCaptionSide();
	} else {
	    return ((Css2Style) style).captionSide;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof CaptionSide && 
		    ((CaptionSide) property).value == value);
	} else {
	    return (property instanceof CaptionSide && 
		    ((CaptionSide) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: EmptyCellsATSC.java ---
//
// $Id: EmptyCellsATSC.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class EmptyCellsATSC extends TableProperty {
    
    CssValue value;
    
    private static CssIdent show = new CssIdent("show");
    private static CssIdent hide = new CssIdent("hide");

    /**
     * Create a new EmptyCellsATSC
     */  
    public EmptyCellsATSC() {
	value = show;
    }
    
    /**
     * Creates a new CssEmptyCellsATSC
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public EmptyCellsATSC(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	ac.getFrame().addWarning("atsc", val.toString());

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(show)) {
	    value = show;
	} else if (val.equals(hide)) {
	    value = hide;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public EmptyCellsATSC(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "empty-cells";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.emptyCellsATSC != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.emptyCellsATSC = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getEmptyCellsATSC();
	} else {
	    return ((Css2Style) style).emptyCellsATSC;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof EmptyCellsATSC && 
		    ((EmptyCellsATSC) property).value == value);
	} else {
	    return (property instanceof EmptyCellsATSC && 
		    ((EmptyCellsATSC) property).value.equals(value));
	}
    }
    
}

--- NEW FILE: EmptyCells.java ---
//
// $Id: EmptyCells.java,v 1.1 2005/08/23 16:33:50 ylafon Exp $
// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
//
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html
/*
 */

package org.w3c.css.properties.css2.table;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css1.CssProperty;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssValue;


/**
 */
public class EmptyCells extends TableProperty {
    
    CssValue value;
    
    private static CssIdent show = new CssIdent("show");
    private static CssIdent hide = new CssIdent("hide");

    /**
     * Create a new EmptyCells
     */  
    public EmptyCells() {
	value = show;
    }
    
    /**
     * Creates a new CssEmptyCells
     *
     * @param expression the expression of the size
     * @exception InvalidParamException The expression is incorrect
     */  
    public EmptyCells(ApplContext ac, CssExpression expression,
	    boolean check) throws InvalidParamException {
	
	if(check && expression.getCount() > 1) {
	    throw new InvalidParamException("unrecognize", ac);
	}
	
	CssValue val = expression.getValue();
	setByUser();

	if (val.equals(inherit)) {
	    value = inherit;
	} else if (val.equals(show)) {
	    value = show;
	} else if (val.equals(hide)) {
	    value = hide;
	} else {
	    throw new InvalidParamException("value", 
					    val.toString(), 
					    getPropertyName(), ac);
	}

	expression.next();
    }
    
    public EmptyCells(ApplContext ac, CssExpression expression) 
	throws InvalidParamException {
	this(ac, expression, false);
    }
    
    /**
     * Returns the current value
     */  
    public Object get() {
	return value;
    }
    
    /**
     * Returns true if this property is "softly" inherited
     * e.g. his value equals inherit
     */
    public boolean isSoftlyInherited() {
	return value == inherit;
    }
    
    /**
     * Returns a string representation of the object.
     */
    public String toString() {
	return value.toString();
    }
    
    
    /**
     * Returns the name of this property
     */  
    public String getPropertyName() {
	return "empty-cells";
    }
    
    /**
     * Add this property to the CssStyle.
     *
     * @param style The CssStyle
     */
    public void addToStyle(ApplContext ac, CssStyle style) {
	Css2Style style0 = (Css2Style) style;
	if (style0.emptyCells != null) {
	    style.addRedefinitionWarning(ac, this);
	}
	style0.emptyCells = this;
    }
    
    /**
     * Get this property in the style.
     *
     * @param style The style where the property is
     * @param resolve if true, resolve the style to find this property
     */  
    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
	if (resolve) {
	    return ((Css2Style) style).getEmptyCells();
	} else {
	    return ((Css2Style) style).emptyCells;
	}
    }
    
    /**
     * Compares two properties for equality.
     *
     * @param value The other property.
     */  
    public boolean equals(CssProperty property) {
	if (value == null) {
	    return (property instanceof EmptyCells && 
		    ((EmptyCells) property).value == value);
	} else {
	    return (property instanceof EmptyCells && 
		    ((EmptyCells) property).value.equals(value));
	}
    }
    
}

Received on Tuesday, 23 August 2005 16:34:13 UTC