Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / documents / AbstractDocumentAction.java @ 44644

History | View | Annotate | Download (2.03 KB)

1 40558 jjdelcerro
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (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, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24 40435 jjdelcerro
package org.gvsig.app.project.documents;
25
26
import java.util.Arrays;
27
28
import org.gvsig.app.project.ProjectManager;
29
30
31
public abstract class AbstractDocumentAction implements DocumentAction {
32
33
        private String id;
34
        protected DocumentActionGroup group;
35
        protected String title;
36
        protected String description;
37
        protected int order;
38
39
        public AbstractDocumentAction(String id) {
40
                this.group = ProjectManager.getInstance().addDocumentActionGroup("default","Default action group", null, 1000);
41
                this.id = id;
42
                this.title= id;
43
                this.description = null;
44
                this.order = 1000;
45
        }
46
47
        public AbstractDocumentAction(DocumentActionGroup group, String id, String title, String description, int order) {
48
                this(id);
49
                if( group!= null ) {
50
                        this.group = group;
51
                }
52
                this.title= title;
53
                this.description = description;
54
                this.order = order;
55
        }
56
57
        public String getDescription() {
58
                return this.description;
59
        }
60
61
        public DocumentActionGroup getGroup() {
62
                return this.group;
63
        }
64
65
        public String getId() {
66
                return this.id;
67
        }
68
69
        public int getOrder() {
70
                return this.order;
71
        }
72
73
        public String getTitle() {
74
                return this.title;
75
        }
76
77
}