package usda.weru.weps.location.mode;

import usda.weru.weps.RunFileBean;
import usda.weru.weps.RunFileBean.StationType;
import usda.weru.weps.location.chooser.StationChooser;
import usda.weru.weps.location.mode.FileHandler.FileBeanState;
import usda.weru.weps.location.mode.AbstractStationModeHandler.BeanState;

/**
 *
 * @author Joseph Levin <joelevin@weru.ksu.edu>
 */
public class FileHandler extends AbstractStationModeHandler<FileBeanState> {

    /**
     *
     * @param chooser
     */
    @Override
    protected void setView(StationChooser chooser) {
        chooser.setView(StationChooser.View.File);
    }

    /**
     *
     * @param bean
     * @param type
     * @return
     */
    @Override
    protected FileBeanState createBeanState(RunFileBean bean, StationType type) {
        return new FileBeanState(bean, type);
    }

//
//    @Override
//    public void handleSelectedStationChanged(StationChooser chooser, Station station) {
//        if(!(station instanceof FileStation)){
//            chooser.setSelectedStation(null);
//        }
//    }
    @Override
    @Deprecated
    public int getId() {
        return 1;
    }

    /**
     *
     * @return
     */
    @Override
    public String getDisplayName() {
        return "File";
    }

    @Override
    public String getName() {
        return "file";
    }

    /**
     *
     */
    protected class FileBeanState extends AbstractStationModeHandler<?>.BeanState {

        /**
         *
         * @param bean
         * @param type
         */
        public FileBeanState(RunFileBean bean, RunFileBean.StationType type) {
            super(bean, type);
        }

    }
}
