// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java
// public abstract class DialogController
// extends DialogFragment
// {
//     private Dialog tempDialog;
// 
// 	/**
// 	 * Helper
// 	 */
// 	protected final ControllerHelper View = new ControllerHelper(this)
// 	{
//         @Override
//         protected void invalidateMenu()
//         {
//             if (getDialog() != null)
//                 getDialog().invalidateOptionsMenu();
//         }
// 
//         @Override
//         public void setMenuLayout(int id)
//         {
//             setHasOptionsMenu(id > 0);
//             super.setMenuLayout(id);
//         }
//     };
// 
//     @Override
//     public Dialog onCreateDialog(Bundle savedInstanceState)
//     {
//         tempDialog = new Dialog(getActivity(), getTheme())
//         {
//             @Override
//             public boolean onCreateOptionsMenu(Menu menu)
//             {
//                 return View.onCreateOptionsMenu(menu);
//             }
//         };
// 
//         View.invalidateMenu();
//         return tempDialog;
//     }
// 
//     @Override
//     public Dialog getDialog()
//     {
//         Dialog d = super.getDialog();
//         if (d != null)
//             tempDialog = null;
// 
//         return (d == null) ? tempDialog : d;
//     }
// 
// 	@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, true);
//         IViewBinding vb = ViewFactory.getViewBinding(v);
//         if (vb != null) {
//             View.ensureMenuInflator(vb.getBindingInventory());
//         }
//         return v;
// 	}
// 		
// 	@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());
//     }
// }
// 
// 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/DialogModel.java
// public interface DialogModel
// {
//     String getSomeText();
//     void setSomeText(String t);
// 
//     Command getClose();
//     Command getOpen();
// }


import android.os.Bundle;
import traction.mvc.controllers.DialogController;
import traction.mvc.implementations.CommandArgument;
import traction.mvc.interfaces.IOnExecuteListener;
import ni3po42.android.tractiondemo.R;
import ni3po42.android.tractiondemo.models.DialogModel;
/* 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 ActualDialogController extends DialogController
{
// Path: traction/src/main/java/traction/mvc/controllers/DialogController.java
// public abstract class DialogController
// extends DialogFragment
// {
//     private Dialog tempDialog;
// 
// 	/**
// 	 * Helper
// 	 */
// 	protected final ControllerHelper View = new ControllerHelper(this)
// 	{
//         @Override
//         protected void invalidateMenu()
//         {
//             if (getDialog() != null)
//                 getDialog().invalidateOptionsMenu();
//         }
// 
//         @Override
//         public void setMenuLayout(int id)
//         {
//             setHasOptionsMenu(id > 0);
//             super.setMenuLayout(id);
//         }
//     };
// 
//     @Override
//     public Dialog onCreateDialog(Bundle savedInstanceState)
//     {
//         tempDialog = new Dialog(getActivity(), getTheme())
//         {
//             @Override
//             public boolean onCreateOptionsMenu(Menu menu)
//             {
//                 return View.onCreateOptionsMenu(menu);
//             }
//         };
// 
//         View.invalidateMenu();
//         return tempDialog;
//     }
// 
//     @Override
//     public Dialog getDialog()
//     {
//         Dialog d = super.getDialog();
//         if (d != null)
//             tempDialog = null;
// 
//         return (d == null) ? tempDialog : d;
//     }
// 
// 	@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, true);
//         IViewBinding vb = ViewFactory.getViewBinding(v);
//         if (vb != null) {
//             View.ensureMenuInflator(vb.getBindingInventory());
//         }
//         return v;
// 	}
// 		
// 	@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());
//     }
// }
// 
// 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/DialogModel.java
// public interface DialogModel
// {
//     String getSomeText();
//     void setSomeText(String t);
// 
//     Command getClose();
//     Command getOpen();
// }


// Path: Demo/src/main/java/ni3po42/android/tractiondemo/controllers/ActualDialogController.java
import android.os.Bundle;
import traction.mvc.controllers.DialogController;
import traction.mvc.implementations.CommandArgument;
import traction.mvc.interfaces.IOnExecuteListener;
import ni3po42.android.tractiondemo.R;
import ni3po42.android.tractiondemo.models.DialogModel;

/* 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 ActualDialogController extends DialogController
{
	@Override