Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 17 files changed
  • 0 commit comments
  • 1 contributor
View
9 .badaprj
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<bada>
+ <type>6</type>
+ <sdk>C:\bada\2.0.2</sdk>
+ <model>WaveHVGA</model>
+ <apiversioncheck>true</apiversioncheck>
+ <priviligecheck>false</priviligecheck>
+ <properties/>
+</bada>
View
18 .project
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TubeStatus</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.osp.jsdt.ide.badaJsBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.osp.jsdt.ide.badaJsNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
View
5 .settings/.jsdtscope
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
View
3 .settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Nov 10 13:45:50 GMT 2011
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
View
1 .settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.JRE_CONTAINER
View
1 .settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Global
View
BIN Icons/Splash_type2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icons/Splash_type3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icons/Splash_type4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icons/TubeStatus_type2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icons/TubeStatus_type3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icons/TubeStatus_type4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
30 Res/TubeStatus.css
@@ -0,0 +1,30 @@
+
+.bakerloo {color: #FFF; background: #AE6118;}
+.central {color: #FFF; background: #E41F1F;}
+.circle {color: #113B92; background: #F8D42D;}
+.district {color: #FFF; background: #00A575;}
+.eastlondon {color: #113B92; background: #F2AD41;}
+.hammersmithcity {color: #113B92; background: #E899A8;}
+.jubilee {color: #FFF; background: #8F989E;}
+.metropolitan {color: #FFF; background: #893267;}
+.northern {color: #FFF; background: #000000;}
+.piccadilly {color: #FFF; background: #0450A1;}
+.victoria {color: #FFF; background: #009FE0;}
+.waterloocity {color: #113B92; background: #70C3CE;}
+.docklands {color: #FFF; background: #00BBB4;}
+.overground {color: #FFF; background: #F86C00;}
+
+a.bakerloo:hover {color: #FFF; background: #AE6118; text-decoration: underline}
+a.central:hover {color: #FFF; background: #E41F1F; text-decoration: underline}
+a.circle:hover {color: #113B92; background: #F8D42D; text-decoration: underline}
+a.district:hover {color: #FFF; background: #00A575; text-decoration: underline}
+a.eastlondon:hover {color: #113B92; background: #F2AD41; text-decoration: underline}
+a.hammersmithcity:hover {color: #113B92; background: #E899A8; text-decoration: underline}
+a.jubilee:hover {color: #FFF; background: #8F989E; text-decoration: underline}
+a.metropolitan:hover {color: #FFF; background: #893267; text-decoration: underline}
+a.northern:hover {color: #FFF; background: #000000; text-decoration: underline}
+a.piccadilly:hover {color: #FFF; background: #0450A1; text-decoration: underline}
+a.victoria:hover {color: #FFF; background: #009FE0; text-decoration: underline}
+a.waterloocity:hover {color: #113B92; background: #70C3CE; text-decoration: underline}
+a.docklands:hover {color: #FFF; background: #00BBB4; text-decoration: underline}
+a.overground:hover {color: #FFF; background: #F86C00; text-decoration: underline}
View
23 Res/index.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="viewport" content="target-densitydpi=high-dpi, user-scalable=no" />
+<title>Class1</title>
+<link href="osp://webapp/css/style.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript" src="osp://webapp/js/webapp_core.js"> </script>
+<script type="text/javascript" src="osp://webapp/js/webapp_ui.js"> </script>
+<script type="text/javascript" src="./js/TubeStatus.js"> </script>
+<script>
+ Osp.App.Application.addEventListener("initializing", function()
+ {
+ Osp.Ui.init();
+ appObj = new TubeStatus();
+ appObj.launch();
+ }, this);
+</script>
+</head>
+<body>
+<p>Hello world</p><h1>foo</h1>
+</body>
+</html>
View
195 Res/js/TubeStatus.js
@@ -0,0 +1,195 @@
+//Defining a class TubeStatus
+
+/*
+ * TODO: fix font style, size
+ * TODO: pull in tube status data
+ * TODO: dynamically create each tube line label
+ * TODO: link to map
+ * TODO: link to route planner
+ */
+Osp.Core.Class.define("TubeStatus",
+{
+ extend : Osp.Core.Object,
+
+ members :
+ {
+ form : null,
+
+ //This method is called from index.html
+ launch : function()
+ {
+ // Form, frame
+ this.form = new Osp.Ui.Controls.Form({ style : Osp.Ui.Controls.FormStyle.INDICATOR | Osp.Ui.Controls.FormStyle.HEADER });
+ this.form.setBackgroundColor('gray');
+ Osp.Ui.Controls.Frame.getInstance().addControl(this.form);
+ Osp.Ui.Controls.Frame.getInstance().setCurrentForm(this.form);
+ // Header
+ headerObj = this.form.getHeader();
+ headerObj.setHeaderStyle(Osp.Ui.Controls.HeaderStyle.TITLE);
+ headerObj.setTitleText("Tube Status");
+ headerObj.setTitleTextColor("white");
+
+ statusRequest = Osp.Core.Ajax({
+ 'url': 'http://api.tubeupdates.com/',
+ 'async': false,
+ 'method': 'GET',
+ 'parameters': {'method': 'get.status', 'lines':'all', 'format':'json'},
+ 'context': this,
+ 'responseType': 'application/json',
+ 'requestHeaders': {'Content-Type': 'application/json'}
+ });
+
+ statusRequest.send();
+ statusResult = statusRequest.returnStatusText();
+
+
+ /*
+ // What can you do with blankSlate?!
+ var blankSlateObj = new Osp.Ui.Controls.BlankSlate({bounds: {x:10,y:10,width:100,height:100}, mode: Osp.Ui.Controls.BlankSlateMode.MARKUP});
+ this.form.addControl(blankSlateObj);
+ var divElement = blankSlateObj.getDivNode();
+
+ labelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:0, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Test',
+ multiLine: false
+ });
+ labelObj.setBackgroundColor('white');
+ labelObj.setTextColor('black');
+ */
+
+ var labelHeight = this.form.getClientAreaBounds().height/14 // screen height by number of lines
+
+ bakerlooLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:0, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Bakerloo',
+ multiLine: false
+ });
+ bakerlooLabelObj.setBackgroundColor('#AE6118');
+ bakerlooLabelObj.setTextColor('white');
+
+ centralLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Central',
+ multiLine: false
+ });
+ centralLabelObj.setBackgroundColor('#E41F1F');
+ centralLabelObj.setTextColor('white');
+
+ circleLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*2, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Circle',
+ multiLine: false
+ });
+ circleLabelObj.setBackgroundColor('#F8D42D');
+ circleLabelObj.setTextColor('black');
+
+ districtLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*3, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'District',
+ multiLine: false
+ });
+ districtLabelObj.setBackgroundColor('#00A575');
+ districtLabelObj.setTextColor('white');
+
+ eastlondonLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*4, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'East London',
+ multiLine: false
+ });
+ eastlondonLabelObj.setBackgroundColor('#F2AD41');
+ eastlondonLabelObj.setTextColor('white');
+
+ hammersmithLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*5, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Hammersmith & City',
+ multiLine: false
+ });
+ hammersmithLabelObj.setBackgroundColor('#E899A8');
+ hammersmithLabelObj.setTextColor('white');
+
+ jubileeLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*6, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Jubilee',
+ multiLine: false
+ });
+ jubileeLabelObj.setBackgroundColor('#8F989E');
+ jubileeLabelObj.setTextColor('white');
+
+ metropolitanLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*7, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Metropolitan',
+ multiLine: false
+ });
+ metropolitanLabelObj.setBackgroundColor('#893267');
+ metropolitanLabelObj.setTextColor('white');
+
+ northernLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*8, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Northern',
+ multiLine: false
+ });
+ northernLabelObj.setBackgroundColor('#000000');
+ northernLabelObj.setTextColor('white');
+
+ piccadillyLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*9, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Piccadilly',
+ multiLine: false
+ });
+ piccadillyLabelObj.setBackgroundColor('#0450A1');
+ piccadillyLabelObj.setTextColor('white');
+
+ victoriaLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*10, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Victoria',
+ multiLine: false
+ });
+ victoriaLabelObj.setBackgroundColor('#009FE0');
+ victoriaLabelObj.setTextColor('white');
+
+ waterlooLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*11, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Waterloo & City',
+ multiLine: false
+ });
+ waterlooLabelObj.setBackgroundColor('#70C3CE');
+ waterlooLabelObj.setTextColor('white');
+
+ docklandsLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*12, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Docklands Light Railway',
+ multiLine: false
+ });
+ docklandsLabelObj.setBackgroundColor('#00BBB4');
+ docklandsLabelObj.setTextColor('white');
+
+ overgroundLabelObj = new Osp.Ui.Controls.Label({
+ bounds: { x: 0, y:labelHeight*13, width: this.form.getClientAreaBounds().width, height: labelHeight},
+ text: 'Overground',
+ multiLine: false
+ });
+ overgroundLabelObj.setBackgroundColor('#F86C00');
+ overgroundLabelObj.setTextColor('white');
+
+
+ this.form.addControl(bakerlooLabelObj);
+ this.form.addControl(centralLabelObj);
+ this.form.addControl(circleLabelObj);
+ this.form.addControl(districtLabelObj);
+ this.form.addControl(eastlondonLabelObj);
+ this.form.addControl(hammersmithLabelObj);
+ this.form.addControl(jubileeLabelObj);
+ this.form.addControl(metropolitanLabelObj);
+ this.form.addControl(northernLabelObj);
+ this.form.addControl(piccadillyLabelObj);
+ this.form.addControl(victoriaLabelObj);
+ this.form.addControl(waterlooLabelObj);
+ this.form.addControl(docklandsLabelObj);
+ this.form.addControl(overgroundLabelObj);
+
+ alert('Test ' + statusResult);
+
+ }
+ }
+});
View
28 application.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Application>
+ <Entry>TubeStatus</Entry>
+ <Name>
+ <English>TubeStatus</English>
+ <eng-GB>TubeStatus</eng-GB>
+ </Name>
+ <Vendor>com.andrewsavory.bada</Vendor>
+ <Description>Tube Status</Description>
+ <Icons>
+ <MainMenu>TubeStatus_type4.png<Type1/>
+ <Type2>TubeStatus_type2.png</Type2>
+ <Type3>TubeStatus_type3.png</Type3>
+ <Type4>TubeStatus_type4.png</Type4>
+ </MainMenu>
+ <Setting/>
+ <Ticker/>
+ <QuickPanel/>
+ <LaunchImage>Splash_type4.png<Type1/>
+ <Type2>Splash_type2.png</Type2>
+ <Type3>Splash_type3.png</Type3>
+ <Type4>Splash_type4.png</Type4>
+ </LaunchImage>
+ </Icons>
+ <AutoScaling>
+ <Enabled>false</Enabled>
+ </AutoScaling>
+</Application>
View
16 manifest.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' ?>
+<Manifest>
+ <Id>b87tz0mm5v</Id>
+ <Secret>E9C518E193D0B45AB641899566E49C9B</Secret>
+ <AppVersion>1.0.0</AppVersion>
+ <ManifestVersion>1.2</ManifestVersion>
+ <AppType>WebApp</AppType>
+ <Privileges>
+ <Privilege>
+ <Name>WEB_SERVICE</Name>
+ </Privilege>
+ </Privileges>
+ <DeviceProfile>
+ <APIVersion>2.0</APIVersion>
+ </DeviceProfile>
+</Manifest>

No commit comments for this range

Something went wrong with that request. Please try again.