001: /* Soot - a J*va Optimization Framework
002: * Copyright (C) 2003 Jennifer Lhotak
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the
016: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
017: * Boston, MA 02111-1307, USA.
018: */
019:
020: package ca.mcgill.sable.soot.attributes;
021:
022: import org.eclipse.swt.graphics.RGB;
023:
024: public class PosColAttribute {
025:
026: private int startOffset;
027: private int endOffset;
028: private int sourceStartOffset;
029: private int sourceEndOffset;
030:
031: private int red;
032: private int green;
033: private int blue;
034: private int fg;
035:
036: public RGB getRGBColor() {
037: return new RGB(getRed(), getGreen(), getBlue());
038: }
039:
040: /**
041: * @return
042: */
043: public int getBlue() {
044: return blue;
045: }
046:
047: /**
048: * @return
049: */
050: public int getEndOffset() {
051: return endOffset;
052: }
053:
054: /**
055: * @return
056: */
057: public int getGreen() {
058: return green;
059: }
060:
061: /**
062: * @return
063: */
064: public int getRed() {
065: return red;
066: }
067:
068: /**
069: * @return
070: */
071: public int getStartOffset() {
072: return startOffset;
073: }
074:
075: /**
076: * @param i
077: */
078: public void setBlue(int i) {
079: blue = i;
080: }
081:
082: /**
083: * @param i
084: */
085: public void setEndOffset(int i) {
086: endOffset = i;
087: }
088:
089: /**
090: * @param i
091: */
092: public void setGreen(int i) {
093: green = i;
094: }
095:
096: /**
097: * @param i
098: */
099: public void setRed(int i) {
100: red = i;
101: }
102:
103: /**
104: * @param i
105: */
106: public void setStartOffset(int i) {
107: startOffset = i;
108: }
109:
110: /**
111: * @return
112: */
113: public int getSourceEndOffset() {
114: return sourceEndOffset;
115: }
116:
117: /**
118: * @return
119: */
120: public int getSourceStartOffset() {
121: return sourceStartOffset;
122: }
123:
124: /**
125: * @param i
126: */
127: public void setSourceEndOffset(int i) {
128: sourceEndOffset = i;
129: }
130:
131: /**
132: * @param i
133: */
134: public void setSourceStartOffset(int i) {
135: sourceStartOffset = i;
136: }
137:
138: /**
139: * @return
140: */
141: public int getFg() {
142: return fg;
143: }
144:
145: /**
146: * @param i
147: */
148: public void setFg(int i) {
149: fg = i;
150: }
151:
152: }
|