// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java
// public class FragmentController
// extends Fragment
// {
// 	/**
// 	 * Helper to implement Controller logic.
// 	 */
// 	protected final ControllerHelper View = new ControllerHelper(this);
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState)
// 	{	
// 		super.onCreate(savedInstanceState);
// 		setRetainInstance(true);
// 	}
// 	
// 	@Override
// 	public View onCreateView(LayoutInflater notUsed, ViewGroup container, Bundle savedInstanceState) 
// 	{
// 		View v = View.inflateView(View.getContentView(), container, container != null);
//         IViewBinding vb = ViewFactory.getViewBinding(v);
//         if (vb != null) {
//             View.ensureMenuInflator(vb.getBindingInventory());
//         }
//         return v;
// 	}
// 	
// 	@Override
// 	public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
// 	{
//         View.onCreateOptionsMenu(menu);
// 	}
// 
// 	@Override
// 	public void onDestroyView() 
// 	{		
// 		super.onDestroyView();	
// 		ViewFactory.DetachContext(getView());
// 	}
// 
//     @Override
//     public void onAttach(Activity activity)
//     {
//         super.onAttach(activity);
//         View.registerFragmentToActivity(this, activity);
//     }
// 
//     @Override
//     public void onDetach()
//     {
//         super.onDetach();
//         View.unregisterFragmentFromActivity(this, getActivity());
//     }
// 
//     @Override
//     public void onStart()
//     {
//         super.onStart();
//         View.connectFragmentViewToParentView(this);
//     }
// }
// 
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java
// public class CommandArgument
// {
//     private String commandName;
//     private boolean eventCancelled;
//     private JSONObject tagProperties;
// 
//     public boolean isEventCancelled()
//     {
//         return eventCancelled;
//     }
// 
//     public void setEventCancelled(boolean isCancelled)
//     {
//         eventCancelled = isCancelled;
//     }
// 
//     public CommandArgument(String commandName)
//     {
//         this(commandName, null);
//     }
// 
//     public CommandArgument(String commandName, JSONObject tagProperties)
//     {
//         this.commandName = commandName;
//         this.eventCancelled = false;
//         this.tagProperties = tagProperties;
//     }
// 
//     public JSONObject getEventData()
//     {
//         return tagProperties;
//     }
// 
//     public String getCommandName()
//     {
//         return commandName;
//     }
// }
// 
// Path: traction/src/main/java/traction/mvc/interfaces/IOnExecuteListener.java
// public interface IOnExecuteListener
// {
//     void onExecuted(CommandArgument arg);
// }
// 
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/models/IUIWireModel.java
// public interface IUIWireModel
//     extends IProxyObservableObject
// {
//     int getImage();
//     void setImage(int image);
// 
//     boolean isMainFlagOn();
//     void setMainFlagOn(boolean mainFlag);
// 
//     int getUpperBound();
//     void setUpperBound(int upperBound);
// 
//     int getCurrentInteger();
//     void setCurrentInteger(int currentInteger);
// 
//     Command getMyEvent();
// 
//     String getMyString();
//     void setMyString(String str);
// 
//     int getMyInt();
//     void setMyInt(int myInt);
// 
//     int getSmallest();
//     void setSmallest(int i);
// 
//     int getLargest();
//     void setLargest(int i);
// }
// 
// Path: traction/src/main/java/traction/mvc/observables/OnPropertyChangedEvent.java
// public abstract class OnPropertyChangedEvent
//     implements IObjectListener
// {
//     @Override
//     public void onEvent(String propagationId) {
//         //eh, nothing
//     }
// 
//     protected abstract void onChange(String propertyName, Object oldValue, Object newValue);
// }


import android.os.Bundle;
import android.widget.Toast;
import traction.mvc.controllers.FragmentController;
import traction.mvc.implementations.CommandArgument;
import traction.mvc.interfaces.IOnExecuteListener;
import ni3po42.android.tractiondemo.R;
import ni3po42.android.tractiondemo.models.IUIWireModel;
import traction.mvc.observables.OnPropertyChangedEvent;
/* Copyright 2013 Tim Stratton

   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 ni3po42.android.tractiondemo.controllers;



public class UIWiringController extends FragmentController
{
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
// Path: traction/src/main/java/traction/mvc/controllers/FragmentController.java
// public class FragmentController
// extends Fragment
// {
// 	/**
// 	 * Helper to implement Controller logic.
// 	 */
// 	protected final ControllerHelper View = new ControllerHelper(this);
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState)
// 	{	
// 		super.onCreate(savedInstanceState);
// 		setRetainInstance(true);
// 	}
// 	
// 	@Override
// 	public View onCreateView(LayoutInflater notUsed, ViewGroup container, Bundle savedInstanceState) 
// 	{
// 		View v = View.inflateView(View.getContentView(), container, container != null);
//         IViewBinding vb = ViewFactory.getViewBinding(v);
//         if (vb != null) {
//             View.ensureMenuInflator(vb.getBindingInventory());
//         }
//         return v;
// 	}
// 	
// 	@Override
// 	public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
// 	{
//         View.onCreateOptionsMenu(menu);
// 	}
// 
// 	@Override
// 	public void onDestroyView() 
// 	{		
// 		super.onDestroyView();	
// 		ViewFactory.DetachContext(getView());
// 	}
// 
//     @Override
//     public void onAttach(Activity activity)
//     {
//         super.onAttach(activity);
//         View.registerFragmentToActivity(this, activity);
//     }
// 
//     @Override
//     public void onDetach()
//     {
//         super.onDetach();
//         View.unregisterFragmentFromActivity(this, getActivity());
//     }
// 
//     @Override
//     public void onStart()
//     {
//         super.onStart();
//         View.connectFragmentViewToParentView(this);
//     }
// }
// 
// Path: traction/src/main/java/traction/mvc/implementations/CommandArgument.java
// public class CommandArgument
// {
//     private String commandName;
//     private boolean eventCancelled;
//     private JSONObject tagProperties;
// 
//     public boolean isEventCancelled()
//     {
//         return eventCancelled;
//     }
// 
//     public void setEventCancelled(boolean isCancelled)
//     {
//         eventCancelled = isCancelled;
//     }
// 
//     public CommandArgument(String commandName)
//     {
//         this(commandName, null);
//     }
// 
//     public CommandArgument(String commandName, JSONObject tagProperties)
//     {
//         this.commandName = commandName;
//         this.eventCancelled = false;
//         this.tagProperties = tagProperties;
//     }
// 
//     public JSONObject getEventData()
//     {
//         return tagProperties;
//     }
// 
//     public String getCommandName()
//     {
//         return commandName;
//     }
// }
// 
// Path: traction/src/main/java/traction/mvc/interfaces/IOnExecuteListener.java
// public interface IOnExecuteListener
// {
//     void onExecuted(CommandArgument arg);
// }
// 
// Path: Demo/src/main/java/ni3po42/android/tractiondemo/models/IUIWireModel.java
// public interface IUIWireModel
//     extends IProxyObservableObject
// {
//     int getImage();
//     void setImage(int image);
// 
//     boolean isMainFlagOn();
//     void setMainFlagOn(boolean mainFlag);
// 
//     int getUpperBound();
//     void setUpperBound(int upperBound);
// 
//     int getCurrentInteger();
//     void setCurrentInteger(int currentInteger);
// 
//     Command getMyEvent();
// 
//     String getMyString();
//     void setMyString(String str);
// 
//     int getMyInt();
//     void setMyInt(int myInt);
// 
//     int getSmallest();
//     void setSmallest(int i);
// 
//     int getLargest();
//     void setLargest(int i);
// }
// 
// Path: traction/src/main/java/traction/mvc/observables/OnPropertyChangedEvent.java
// public abstract class OnPropertyChangedEvent
//     implements IObjectListener
// {
//     @Override
//     public void onEvent(String propagationId) {
//         //eh, nothing
//     }
// 
//     protected abstract void onChange(String propertyName, Object oldValue, Object newValue);
// }


// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/UIWiringController.java
import android.os.Bundle;
import android.widget.Toast;
import traction.mvc.controllers.FragmentController;
import traction.mvc.implementations.CommandArgument;
import traction.mvc.interfaces.IOnExecuteListener;
import ni3po42.android.tractiondemo.R;
import ni3po42.android.tractiondemo.models.IUIWireModel;
import traction.mvc.observables.OnPropertyChangedEvent;

/* Copyright 2013 Tim Stratton

   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 ni3po42.android.tractiondemo.controllers;



public class UIWiringController extends FragmentController
{
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
        View.setContentView(R.layout.uiwiring);