/*
 * $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.recurvebowsight;

import android.app.Activity;
import android.app.Dialog;

import ch.spherIC.recurvebowsight.dialog.ChooseArcherySetupDlg;


/**
 * Dialog factory class.
 */
public final class DialogFactory {


    /**
     * Static main method to initialize classes
     *
     * @param   dlgCode  Code of dialog to instantiate. See {@link EasyBracketMain}
     * @param   parent   Parent {@link Activity}
     *
     * @return  Instantiated dialog.
     */
    public static Dialog createDialog(final int dlgCode, final Activity parent) {

        Dialog dlg;

        switch (dlgCode) {

        case RBSMainActivity.DLG_CHOOSE_ARCHERYSETUP:
            dlg = createChooseArcherySetupDialog(parent);
            break;

        default:
            dlg = null;
            break;
        }

        return dlg;
    }

    private static Dialog createChooseArcherySetupDialog(final Activity parent) {
        final ChooseArcherySetupDlg dialog = new ChooseArcherySetupDlg(parent);
        return dialog;
    }

}
