From f14898ea4d26cdee386b688f97136b15e21dfe98 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 22 Jan 2011 17:26:30 +0000 Subject: [PATCH] adding mode, breaking things out of editor etc --- .../processing/mode/android/AndroidBuild.java | 2 +- .../mode/android/AndroidEditor.java | 19 ++------ .../processing/mode/android/AndroidMode.java | 45 +++++++++++++++++++ 3 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 app/src/processing/mode/android/AndroidMode.java diff --git a/app/src/processing/mode/android/AndroidBuild.java b/app/src/processing/mode/android/AndroidBuild.java index 64c929cb6..474565575 100644 --- a/app/src/processing/mode/android/AndroidBuild.java +++ b/app/src/processing/mode/android/AndroidBuild.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2009-10 Ben Fry and Casey Reas + Copyright (c) 2009-11 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 diff --git a/app/src/processing/mode/android/AndroidEditor.java b/app/src/processing/mode/android/AndroidEditor.java index 07588f631..9ec9b5fdf 100644 --- a/app/src/processing/mode/android/AndroidEditor.java +++ b/app/src/processing/mode/android/AndroidEditor.java @@ -72,23 +72,12 @@ public class AndroidEditor extends JavaEditor implements DeviceListener { // } JCheckBoxMenuItem toggleItem; + AndroidMode amode; - public AndroidEditor(Base base, File folder) { - super(base, folder); - } - - - @Override - public Editor createEditor(Base base, String path, int[] location) { - // TODO Auto-generated method stub - return null; - } - - - @Override - public String getTitle() { - return "Android"; + protected AndroidEditor(Base base, String path, int[] location, Mode mode) { + super(base, path, location, mode); + amode = (AndroidMode) mode; } diff --git a/app/src/processing/mode/android/AndroidMode.java b/app/src/processing/mode/android/AndroidMode.java new file mode 100644 index 000000000..fc3dabf1e --- /dev/null +++ b/app/src/processing/mode/android/AndroidMode.java @@ -0,0 +1,45 @@ +/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ + +/* + Part of the Processing project - http://processing.org + + Copyright (c) 2011 Ben Fry and Casey Reas + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package processing.mode.android; + +import java.io.File; + +import processing.app.*; +import processing.mode.java.JavaMode; + + +public class AndroidMode extends JavaMode { + + public AndroidMode(Base base, File folder) { + super(base, folder); + } + + @Override + public Editor createEditor(Base base, String path, int[] location) { + return new AndroidEditor(base, path, location, this); + } + + @Override + public String getTitle() { + return "Android"; + } +} \ No newline at end of file