/bundles/plugins-trunk/SideKick/sidekick/enhanced/SourceAsset.java
Java | 92 lines | 64 code | 20 blank | 8 comment | 1 complexity | b155d868326a37ea738f3e834f39e438 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- package sidekick.enhanced;
- import javax.swing.text.*;
- import javax.swing.Icon;
- import javax.swing.ImageIcon;
- import sidekick.Asset;
- /**
- * SourceAsset: extends sidekick.Asset, provides the nodes for a structure tree
- *
- * @author Martin Raspe
- * @created Oct 15, 2005
- * @modified $Id: SourceAsset.java 890 2006-03-21 20:30:35Z hertzhaft $
- * @version $Revision: 890 $
- */
- public class SourceAsset extends Asset {
- private String shortDesc;
- private String longDesc;
- private Icon _icon;
- private int _lineNo;
- private int _type;
- public SourceAsset() {
- super("SourceAsset");
- }
- public SourceAsset(String name, int lineNo, Position start) {
- super(name);
- this.start = start;
- this.end = start;
- this.shortDesc = name;
- this.longDesc = "";
- if (lineNo > 0)
- this.longDesc = "Line: " + lineNo;
- _lineNo = lineNo;
- }
- public int getLineNo() {
- return _lineNo;
- }
-
- public Icon getIcon() {
- return _icon;
- }
-
- public void setIcon(ImageIcon icon) {
- _icon = icon;
- }
-
- public int get_type() {
- return _type;
- }
- public String getShortString() {
- return shortDesc;
- }
- public String getLongString() {
- return longDesc;
- }
- public String getShortDescription() {
- return shortDesc;
- }
- public String getLongDescription() {
- return longDesc;
- }
- public void setShort(String shortDesc) {
- this.shortDesc = shortDesc;
- }
- public void setLong(String longDesc) {
- this.longDesc = longDesc;
- }
- public void setShortDescription(String shortDesc) {
- this.shortDesc = shortDesc;
- }
- public void setLongDescription(String longDesc) {
- this.longDesc = longDesc;
- }
- public String toString() {
- return shortDesc + " " + longDesc;
- }
- }