FileDocCategorySizeDatePackage
SmilRootLayoutElementImpl.javaAPI DocAndroid 1.5 API2721Wed May 06 22:42:46 BST 2009com.android.mms.dom.smil

SmilRootLayoutElementImpl

public class SmilRootLayoutElementImpl extends SmilElementImpl implements org.w3c.dom.smil.SMILRootLayoutElement

Fields Summary
private static final String
WIDTH_ATTRIBUTE_NAME
private static final String
HEIGHT_ATTRIBUTE_NAME
private static final String
BACKGROUND_COLOR_ATTRIBUTE_NAME
private static final String
TITLE_ATTRIBUTE_NAME
Constructors Summary
SmilRootLayoutElementImpl(SmilDocumentImpl owner, String tagName)


        
        super(owner, tagName);
    
Methods Summary
public java.lang.StringgetBackgroundColor()

        return this.getAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME);
    
public intgetHeight()

        String heightString = this.getAttribute(HEIGHT_ATTRIBUTE_NAME);
        return parseAbsoluteLength(heightString);
    
public java.lang.StringgetTitle()

        return this.getAttribute(TITLE_ATTRIBUTE_NAME);
    
public intgetWidth()

        String widthString = this.getAttribute(WIDTH_ATTRIBUTE_NAME);
        return parseAbsoluteLength(widthString);
    
private intparseAbsoluteLength(java.lang.String length)

        if (length.endsWith("px")) {
            length = length.substring(0, length.indexOf("px"));
        }
        try {
            return Integer.parseInt(length);
        } catch (NumberFormatException e) {
            return 0;
        }
    
public voidsetBackgroundColor(java.lang.String backgroundColor)

        this.setAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME, backgroundColor);
    
public voidsetHeight(int height)

        this.setAttribute(HEIGHT_ATTRIBUTE_NAME, String.valueOf(height) + "px");

    
public voidsetTitle(java.lang.String title)

        this.setAttribute(TITLE_ATTRIBUTE_NAME, title);
    
public voidsetWidth(int width)

        this.setAttribute(WIDTH_ATTRIBUTE_NAME, String.valueOf(width) + "px");