// Path: app/src/main/java/org/noorganization/instalist/view/touchlistener/IOnShoppingListClickListenerEvents.java
// public interface IOnShoppingListClickListenerEvents {
// 
//     /**
//      * Called when a ShoppingList was clicked.
//      * @param _ShoppingList the ShoppingList object that was clicked.
//      */
//     void onShoppingListClicked(ShoppingList _ShoppingList);
// }
// 
// Path: app/src/main/java/org/noorganization/instalist/view/touchlistener/OnShoppingListClickListener.java
// public class OnShoppingListClickListener implements View.OnClickListener {
// 
//     private ShoppingList mShoppingList;
//     private IOnShoppingListClickListenerEvents mOnShoppingListClickEvent;
// 
//     /**
//      * Constructor of OnShoppingListClickListener.
//      * @param _IOnShoppingListClickEvent The interface for handling ShoppingList clicks.
//      * @param _ShoppingList The ShoppingList that is handled when a click on it occurs.
//      */
//     public OnShoppingListClickListener(IOnShoppingListClickListenerEvents _IOnShoppingListClickEvent, ShoppingList _ShoppingList){
//         mShoppingList = _ShoppingList;
//         mOnShoppingListClickEvent = _IOnShoppingListClickEvent;
//     }
// 
//     @Override
//     public void onClick(View v) {
//         mOnShoppingListClickEvent.onShoppingListClicked(mShoppingList);
//         //EventBus.getDefault().post(new ShoppingListSelectedMessage(mShoppingList));
//     }
// }
// 
// Path: app/src/main/java/org/noorganization/instalist/view/interfaces/IShoppingListAdapter.java
// public interface IShoppingListAdapter {
//     /**
//      * Adds the given ShoppingList to the adapter.
//      * @param _ShoppingList the ShoppingList to be added.
//      */
//     void addList(ShoppingList _ShoppingList);
// 
//     /**
//      * Updates the given ShoppingList in Adapter.
//      * @param _ShoppingList the ShoppingList to be updated.
//      */
//     void updateList(ShoppingList _ShoppingList);
// 
//     /**
//      * Removes the given ShoppingList from the adapter.
//      * @param _ShoppingList The ShoppingList to remove.
//      */
//     void removeList(ShoppingList _ShoppingList);
// }


import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import org.noorganization.instalist.R;
import org.noorganization.instalist.presenter.IListController;
import org.noorganization.instalist.presenter.implementation.ControllerFactory;
import org.noorganization.instalist.model.ShoppingList;
import org.noorganization.instalist.view.touchlistener.IOnShoppingListClickListenerEvents;
import org.noorganization.instalist.view.touchlistener.OnShoppingListClickListener;
import org.noorganization.instalist.view.interfaces.IShoppingListAdapter;
/*
 * Copyright 2016 Tino Siegmund, Michael Wodniok
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.noorganization.instalist.view.listadapter;




/**
 * The adapter handles the display of a single list of shoppinglists in the sidebar.
 * Should only be used when there is no Category.
 * Created by TS on 25.04.2015.
 */


public class PlainShoppingListOverviewAdapter extends ArrayAdapter<ShoppingList> implements IShoppingListAdapter{


    private static String LOG_TAG = PlainShoppingListOverviewAdapter.class.getName();

    private final List<ShoppingList> mShoppingLists;

    private final Context                            mContext;
// Path: app/src/main/java/org/noorganization/instalist/view/touchlistener/IOnShoppingListClickListenerEvents.java
// public interface IOnShoppingListClickListenerEvents {
// 
//     /**
//      * Called when a ShoppingList was clicked.
//      * @param _ShoppingList the ShoppingList object that was clicked.
//      */
//     void onShoppingListClicked(ShoppingList _ShoppingList);
// }
// 
// Path: app/src/main/java/org/noorganization/instalist/view/touchlistener/OnShoppingListClickListener.java
// public class OnShoppingListClickListener implements View.OnClickListener {
// 
//     private ShoppingList mShoppingList;
//     private IOnShoppingListClickListenerEvents mOnShoppingListClickEvent;
// 
//     /**
//      * Constructor of OnShoppingListClickListener.
//      * @param _IOnShoppingListClickEvent The interface for handling ShoppingList clicks.
//      * @param _ShoppingList The ShoppingList that is handled when a click on it occurs.
//      */
//     public OnShoppingListClickListener(IOnShoppingListClickListenerEvents _IOnShoppingListClickEvent, ShoppingList _ShoppingList){
//         mShoppingList = _ShoppingList;
//         mOnShoppingListClickEvent = _IOnShoppingListClickEvent;
//     }
// 
//     @Override
//     public void onClick(View v) {
//         mOnShoppingListClickEvent.onShoppingListClicked(mShoppingList);
//         //EventBus.getDefault().post(new ShoppingListSelectedMessage(mShoppingList));
//     }
// }
// 
// Path: app/src/main/java/org/noorganization/instalist/view/interfaces/IShoppingListAdapter.java
// public interface IShoppingListAdapter {
//     /**
//      * Adds the given ShoppingList to the adapter.
//      * @param _ShoppingList the ShoppingList to be added.
//      */
//     void addList(ShoppingList _ShoppingList);
// 
//     /**
//      * Updates the given ShoppingList in Adapter.
//      * @param _ShoppingList the ShoppingList to be updated.
//      */
//     void updateList(ShoppingList _ShoppingList);
// 
//     /**
//      * Removes the given ShoppingList from the adapter.
//      * @param _ShoppingList The ShoppingList to remove.
//      */
//     void removeList(ShoppingList _ShoppingList);
// }


// Path: app/src/main/java/org/noorganization/instalist/view/listadapter/PlainShoppingListOverviewAdapter.java
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import org.noorganization.instalist.R;
import org.noorganization.instalist.presenter.IListController;
import org.noorganization.instalist.presenter.implementation.ControllerFactory;
import org.noorganization.instalist.model.ShoppingList;
import org.noorganization.instalist.view.touchlistener.IOnShoppingListClickListenerEvents;
import org.noorganization.instalist.view.touchlistener.OnShoppingListClickListener;
import org.noorganization.instalist.view.interfaces.IShoppingListAdapter;

/*
 * Copyright 2016 Tino Siegmund, Michael Wodniok
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.noorganization.instalist.view.listadapter;




/**
 * The adapter handles the display of a single list of shoppinglists in the sidebar.
 * Should only be used when there is no Category.
 * Created by TS on 25.04.2015.
 */


public class PlainShoppingListOverviewAdapter extends ArrayAdapter<ShoppingList> implements IShoppingListAdapter{


    private static String LOG_TAG = PlainShoppingListOverviewAdapter.class.getName();

    private final List<ShoppingList> mShoppingLists;

    private final Context                            mContext;
    private       IOnShoppingListClickListenerEvents mIOnShoppingListClickEvents;