Mercurial > hg > accesspd
comparison java/src/uk/ac/qmul/eecs/ccmi/simpletemplate/SimpleTemplateEditor.java @ 0:78b7fc5391a2
first import, outcome of NIME 2014 hackaton
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Tue, 08 Jul 2014 16:28:59 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78b7fc5391a2 |
---|---|
1 /* | |
2 CCmI Editor - A Collaborative Cross-Modal Diagram Editing Tool | |
3 | |
4 Copyright (C) 2011 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/) | |
5 | |
6 This program is free software: you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation, either version 3 of the License, or | |
9 (at your option) any later version. | |
10 | |
11 This program is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 */ | |
19 | |
20 package uk.ac.qmul.eecs.ccmi.simpletemplate; | |
21 | |
22 import java.awt.Frame; | |
23 import java.util.Collection; | |
24 import java.util.ResourceBundle; | |
25 | |
26 import uk.ac.qmul.eecs.ccmi.gui.Diagram; | |
27 import uk.ac.qmul.eecs.ccmi.gui.TemplateEditor; | |
28 | |
29 /** | |
30 * | |
31 * The implementation of the TemplateEditor interface which uses a Wizard | |
32 * to allow the user to define the templates to be created. | |
33 * | |
34 */ | |
35 public class SimpleTemplateEditor implements TemplateEditor { | |
36 | |
37 @Override | |
38 public Diagram createNew(Frame frame, Collection<String> existingTemplates) { | |
39 Wizard wizard = new Wizard(frame,existingTemplates); | |
40 return wizard.execute(); | |
41 } | |
42 | |
43 @Override | |
44 public Diagram edit(Frame frame, Collection<String> existingTemplates, | |
45 Diagram diagram) { | |
46 Wizard wizard = new Wizard(frame,existingTemplates,diagram); | |
47 return wizard.execute(); | |
48 } | |
49 | |
50 @Override | |
51 public String getLabelForNew(){ | |
52 return ResourceBundle.getBundle(SpeechWizardDialog.class.getName()).getString("wizard_new_label"); | |
53 } | |
54 | |
55 @Override | |
56 public String getLabelForEdit(){ | |
57 return ResourceBundle.getBundle(SpeechWizardDialog.class.getName()).getString("wizard_edit_label"); | |
58 } | |
59 } |