Skip to content

Commit

Permalink
Merge pull request #1 from douglascraigschmidt/master
Browse files Browse the repository at this point in the history
Update from original
  • Loading branch information
KeesR committed Oct 17, 2015
2 parents 1675110 + d50b8b4 commit 800128f
Show file tree
Hide file tree
Showing 91 changed files with 3,728 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public interface ProvidedModelOps
/**
* Create a resource manager that contains the designated
* number of Palantir with random gaze times between 1 and 5
* milliseconds "Fair" semantics should be used to instantiate
* seconds "Fair" semantics should be used to instantiate
* the Semaphore.
*
* @param palantiriCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void onDestroy(boolean isChangingConfigurations) {

/**
* Create a PalantiriManager that contains the designated number
* of Palantir with random gaze times between 1 and 5 milliseconds
* of Palantir with random gaze times between 1 and 5 seconds
*
* @param palantiriCount
* The number of Palantiri to add to the PalantiriManager.
Expand Down
1 change: 1 addition & 0 deletions assignments/assignment2/A2-Android-App/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.classpath
33 changes: 33 additions & 0 deletions assignments/assignment2/A2-Android-App/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>A2-Android-App</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
39 changes: 39 additions & 0 deletions assignments/assignment2/A2-Android-App/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.vandy"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="22" />

<application
android:allowBackup="true"
android:icon="@drawable/palantir">
<activity
android:name=".view.PalantiriActivity"
android:label="@string/palantiri_configuration">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".view.GazingSimulationActivity"
android:label="@string/palantiri_simulation">
<intent-filter>
<action android:name="android.intent.action.GAZING_SIMULATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>


<service
android:name=".model.service.PalantiriService"
android:process=":palantirService">
</service>
</application>

</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions assignments/assignment2/A2-Android-App/proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
14 changes: 14 additions & 0 deletions assignments/assignment2/A2-Android-App/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/being" />

<ImageView
android:id="@+id/dot"
android:layout_width="14dp"
android:layout_height="14dp"
android:src="@drawable/yellow_dot" />

</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<Button
android:id="@+id/button_simulation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="simulationButtonPressed"/>
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ListView
android:id="@+id/list_view_beings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />

<ListView
android:id="@+id/list_view_palantiri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/palantir" />

<ImageView
android:id="@+id/dot"
android:layout_width="14dp"
android:layout_height="14dp"
android:src="@drawable/green_dot" />

</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_number_of_palantiri"/>
<EditText
android:id="@+id/edittext_number_of_palantiri"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/edittext_hint_palantiri"/>
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_number_of_beings"/>
<EditText
android:id="@+id/edittext_number_of_beings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/edittext_hint_beings"/>
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_gazing_iterations"/>
<EditText
android:id="@+id/edittext_gazing_iterations"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/edittext_hint_iterations"/>
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<Button
android:id="@+id/button_simulation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_start_simulation"
android:onClick="simulationButtonPressed"/>
</LinearLayout>
</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<resources>

<!--
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
-->
<dimen name="activity_horizontal_margin">64dp</dimen>

</resources>
5 changes: 5 additions & 0 deletions assignments/assignment2/A2-Android-App/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
18 changes: 18 additions & 0 deletions assignments/assignment2/A2-Android-App/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="palantiri_configuration">Palantiri Configuration</string>
<string name="palantiri_simulation">Palantiri Simulation</string>
<string name="label_number_of_palantiri"># of Palantiri</string>
<string name="edittext_hint_palantiri">1 - 6 (4 default)</string>
<string name="label_number_of_beings"># of Beings</string>
<string name="edittext_hint_beings">1 - 10 (6 default)</string>
<string name="label_lease_duration">Lease Duration</string>
<string name="edittext_hint_duration">1000 to 5000 (5000 default)</string>
<string name="label_gazing_iterations">Gazing Iterations</string>
<string name="edittext_hint_iterations">1 to 100 (5 default)</string>
<string name="label_semaphore">Semaphore</string>
<string name="edittext_hint_semaphore">"java" or "simple" ("java" default)</string>
<string name="button_start_simulation">Start Simulation</string>
<string name="label_fair">Fair?</string>
<string name="action_settings">Settings</string>
</resources>
Loading

0 comments on commit 800128f

Please sign in to comment.