PageRenderTime 71ms CodeModel.GetById 65ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/Asset.java

#
Java | 98 lines | 35 code | 11 blank | 52 comment | 0 complexity | 2a3a53d3806c702568a87c0edf371fc8 MD5 | raw file
 1/*
 2 * Asset.java
 3 * :tabSize=8:indentSize=8:noTabs=false:
 4 * :folding=explicit:collapseFolds=1:
 5 *
 6 * Copyright (C) 2000, 2005 Slava Pestov
 7 *
 8 * This program is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 */
22
23package sidekick;
24
25import javax.swing.text.Position;
26
27/**
28 * A block of code within a file.  Assets correspond to nodes in the 
29 * Structure Browser and folds in the SideKick folding mode.
30 */
31public abstract class Asset implements IAsset
32{
33        //{{{ Instance variables
34        protected String name;
35        protected Position start, end;
36        //}}}
37
38        //{{{ Asset constructor
39        public Asset(String name)
40        {
41                this.name = name;
42        } //}}}
43
44        //{{{ getName() method
45        /**
46         * Returns the name of the Asset.
47         */
48        public String getName()
49        {
50                return name;
51        } //}}}
52
53        //{{{ getStart() method
54        /**
55         * Returns the starting position.
56         */
57        public Position getStart()
58        {
59                return start;
60        } //}}}
61
62        //{{{ getEnd() method
63        /**
64         * Returns the end position.
65         */
66        public Position getEnd()
67        {
68                return end;
69        } //}}}
70	
71
72        //{{{ setName() method
73        /**
74         * Set the name of the asset
75         */
76        public void setName(String name)
77        {
78                this.name = name;
79        } //}}}
80        
81        //{{{ setStart() method
82        /**
83         * Set the start position
84         */
85        public void setStart(Position start)
86        {
87                this.start = start;
88        } //}}}
89        
90        //{{{ setEnd() method
91        /**
92         * Set the end position
93         */
94        public void setEnd(Position end)
95        {
96                this.end = end;
97        } //}}}
98}