-/**\r
- * Copyright (C) 2009, 2010 SC 4ViewSoft SRL\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
package net.sf.openrocket.android.simulation;\r
\r
import net.sf.openrocket.R;\r
import net.sf.openrocket.android.ActivityHelpers;\r
-import net.sf.openrocket.android.Application;\r
+import net.sf.openrocket.android.CurrentRocketHolder;\r
import net.sf.openrocket.document.OpenRocketDocument;\r
import net.sf.openrocket.document.Simulation;\r
import android.os.Bundle;\r
import android.support.v4.app.Fragment;\r
-import android.support.v4.app.FragmentActivity;\r
import android.support.v4.app.FragmentTransaction;\r
-import android.view.Menu;\r
-import android.view.MenuItem;\r
+\r
+import com.actionbarsherlock.app.SherlockFragmentActivity;\r
+import com.actionbarsherlock.view.Menu;\r
+import com.actionbarsherlock.view.MenuItem;\r
\r
/**\r
* An activity that encapsulates a graphical view of the chart.\r
*/\r
-public class SimulationViewActivity extends FragmentActivity {\r
+public class SimulationViewActivity extends SherlockFragmentActivity {\r
\r
@Override\r
protected void onCreate(Bundle savedInstanceState) {\r
//setContentView(R.layout.simulation_graph_activity);\r
int simulationNumber = getIntent().getIntExtra("Simulation", 0);\r
\r
- final OpenRocketDocument rocketDocument = ((Application)getApplication()).getRocketDocument();\r
+ final OpenRocketDocument rocketDocument = CurrentRocketHolder.getCurrentRocket().getRocketDocument();\r
\r
Simulation sim = rocketDocument.getSimulation(simulationNumber);\r
\r
chart.setSeries1(sim.getSimulatedData().getBranch(0).getTypes()[1]);\r
chart.setSeries2(sim.getSimulatedData().getBranch(0).getTypes()[2]);\r
\r
- Fragment graph = SimulationFragment.newInstance(chart);\r
+ Fragment graph = SimulationViewFragment.newInstance(chart);\r
\r
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\r
ft.replace(android.R.id.content, graph);\r