PageRenderTime 33ms CodeModel.GetById 27ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/enhanced/SourceAsset.java

#
Java | 92 lines | 64 code | 20 blank | 8 comment | 1 complexity | b155d868326a37ea738f3e834f39e438 MD5 | raw file
 1package sidekick.enhanced;
 2
 3import javax.swing.text.*;
 4import javax.swing.Icon;
 5import javax.swing.ImageIcon;
 6
 7import sidekick.Asset;
 8
 9
10/**
11 * SourceAsset: extends sidekick.Asset, provides the nodes for a structure tree
12 *
13 * @author     Martin Raspe
14 * @created    Oct 15, 2005
15 * @modified   $Id: SourceAsset.java 890 2006-03-21 20:30:35Z hertzhaft $
16 * @version    $Revision: 890 $
17 */
18public class SourceAsset extends Asset {
19	private String shortDesc;
20	private String longDesc;
21	private Icon _icon;
22	private int _lineNo;
23	private int _type;
24
25	public SourceAsset() {
26		super("SourceAsset");
27		}
28
29	public SourceAsset(String name, int lineNo, Position start) {
30		super(name);
31		this.start = start;
32		this.end = start;
33		this.shortDesc = name;
34		this.longDesc = "";
35		if (lineNo > 0) 
36			this.longDesc = "Line: " + lineNo;
37		_lineNo = lineNo;
38		}
39
40	public int getLineNo() {
41		return _lineNo;
42		}
43	
44	public Icon getIcon() {
45		return _icon;
46		}
47	
48	public void setIcon(ImageIcon icon) {
49		_icon = icon;
50		}
51	
52	public int get_type() {
53		return _type;
54		}
55
56	public String getShortString() {
57		return shortDesc;
58		}
59
60	public String getLongString() {
61		return longDesc;
62		}
63
64	public String getShortDescription() {
65		return shortDesc;
66		}
67
68	public String getLongDescription() {
69		return longDesc;
70		}
71
72	public void setShort(String shortDesc) {
73		this.shortDesc = shortDesc;
74		}
75
76	public void setLong(String longDesc) {
77		this.longDesc = longDesc;
78		}
79
80	public void setShortDescription(String shortDesc) {
81		this.shortDesc = shortDesc;
82		}
83
84	public void setLongDescription(String longDesc) {
85		this.longDesc = longDesc;
86		}
87
88	public String toString() {
89		return shortDesc + " " + longDesc;
90		}
91
92}