/*
 * $URL$
 * $Revision$
 * $LastChangedBy$
 * $LastChangedDate$
 *
 * Copyright (c) 2005 syseca AG, Switzerland
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of syseca AG. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you
 * entered into with syseca AG.
 */
package ch.spherIC.components;

import android.content.Context;
import android.util.AttributeSet;


/**
 * Aperture Spinner
 */
public class ApertureSpinner extends XSpinner {

    /**
     * Creates a new ApertureSpinner object.
     *
     * @param  context {@link Context}
     */
    public ApertureSpinner(Context context) {
        super(context);
    }

    /**
     * Creates a new ApertureSpinner object.
     *
     * @param  context {@link Context}
     * @param  attrs {@link AttributeSet}
     */
    public ApertureSpinner(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    /**
     * Creates a new ApertureSpinner object.
     *
     * @param  context {@link Context}
     * @param  attrs {@link AttributeSet}
     * @param  defStyle  int
     */
    public ApertureSpinner(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    /**
     * Retrieves floating value of the selected aperture item.
     *
     * @return  Selected aperture as {@link Double}
     */
    public double getSelectedAperture() {
        String valStr = getSelectedItem().toString().substring(2);
        return new Double(valStr).doubleValue();
    }

}
