/[svn]/jsampler/trunk/src/org/jsampler/android/view/classic/ViewConfig.java
ViewVC logotype

Contents of /jsampler/trunk/src/org/jsampler/android/view/classic/ViewConfig.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2302 - (show annotations) (download)
Thu Dec 15 23:13:30 2011 UTC (12 years, 4 months ago) by iliev
File size: 2870 byte(s)
* Initial support for Android platforms (only sampler channel
  manipulation for now - see the screenshots on the website)

1 /*
2 * JSampler - a java front-end for LinuxSampler
3 *
4 * Copyright (C) 2011 Grigor Iliev <grigor@grigoriliev.com>
5 *
6 * This file is part of JSampler.
7 *
8 * JSampler is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * JSampler is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with JSampler; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 package org.jsampler.android.view.classic;
24
25 import org.jsampler.JSPrefs;
26 import org.jsampler.view.BasicIconSet;
27 import org.jsampler.view.InstrumentsDbTableView;
28 import org.jsampler.view.InstrumentsDbTreeView;
29 import org.jsampler.view.SamplerBrowserView;
30
31 import android.graphics.drawable.Drawable;
32 import android.util.Log;
33
34 public class ViewConfig extends org.jsampler.android.view.ViewConfig {
35 @Override
36 public JSPrefs
37 preferences() { return ClassicPrefs.preferences(); }
38
39 /**
40 * Provides UI information for instruments database trees.
41 */
42 public InstrumentsDbTreeView<Drawable>
43 getInstrumentsDbTreeView() { return null; }
44
45 /**
46 * Provides UI information for instruments database tables.
47 */
48 public InstrumentsDbTableView<Drawable>
49 getInstrumentsDbTableView() { return null; }
50
51 public SamplerBrowserView<Drawable>
52 getSamplerBrowserView() { return null; }
53
54 public BasicIconSet<Drawable>
55 getBasicIconSet() { return null; }
56
57 public void initInstrumentsDbTreeModel() { }
58
59 public void resetInstrumentsDbTreeModel() { }
60
61 /**
62 * Shows a dialog with the specified error message.
63 * @param msg The error message to be shown.
64 */
65 public void showErrorMessage(String msg) { Log.w("showErrorMessage", msg); }
66
67 /**
68 * Shows a dialog with error message.
69 * @param e The <code>Exception</code> from which the error message is obtained.
70 */
71 public void showErrorMessage(Exception e) {
72 Log.w("showErrorMessage", e.getMessage());
73 e.printStackTrace();
74 }
75
76 /**
77 * Shows a dialog with error message.
78 * @param e The <code>Exception</code> from which the error message is obtained.
79 * @param prefix The prefix to be added to the error message.
80 */
81 public void showErrorMessage(Exception e, String prefix) {
82 Log.w("showErrorMessage", prefix + ": " + e.getMessage());
83 e.printStackTrace();
84 }
85
86 /**
87 * Sets the default font to be used in the GUI.
88 * @param fontName The name of the font to be used as default.
89 */
90 public void setUIDefaultFont(String fontName) {}
91
92 public int getDefaultModKey() { return 0; }
93 }

  ViewVC Help
Powered by ViewVC