FileDocCategorySizeDatePackage
HVGALayoutParameters.javaAPI DocAndroid 1.5 API2450Wed May 06 22:42:46 BST 2009com.android.mms.layout

HVGALayoutParameters

public class HVGALayoutParameters extends Object implements LayoutParameters

Fields Summary
private static final String
TAG
private static final boolean
DEBUG
private static final boolean
LOCAL_LOGV
private int
mType
private static final int
IMAGE_HEIGHT_LANDSCAPE
private static final int
TEXT_HEIGHT_LANDSCAPE
private static final int
IMAGE_HEIGHT_PORTRAIT
private static final int
TEXT_HEIGHT_PORTRAIT
Constructors Summary
public HVGALayoutParameters(int type)


       
        if ((type != HVGA_LANDSCAPE) && (type != HVGA_PORTRAIT)) {
            throw new IllegalArgumentException(
                    "Bad layout type detected: " + type);
        }

        if (LOCAL_LOGV) {
            Log.v(TAG, "HVGALayoutParameters.<init>(" + type + ").");
        }
        mType = type;
    
Methods Summary
public intgetHeight()

        return mType == HVGA_LANDSCAPE ? HVGA_LANDSCAPE_HEIGHT
                                       : HVGA_PORTRAIT_HEIGHT;
    
public intgetImageHeight()

        return mType == HVGA_LANDSCAPE ? IMAGE_HEIGHT_LANDSCAPE
                                       : IMAGE_HEIGHT_PORTRAIT;
    
public intgetTextHeight()

        return mType == HVGA_LANDSCAPE ? TEXT_HEIGHT_LANDSCAPE
                                       : TEXT_HEIGHT_PORTRAIT;
    
public intgetType()

        return mType;
    
public java.lang.StringgetTypeDescription()

        return mType == HVGA_LANDSCAPE ? "HVGA-L" : "HVGA-P";
    
public intgetWidth()

        return mType == HVGA_LANDSCAPE ? HVGA_LANDSCAPE_WIDTH
                                       : HVGA_PORTRAIT_WIDTH;