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 ValueBoxAttribute {
025:
026: private int startOffset;
027: private int endOffset;
028: private int javaOffsetStart;
029: private int javaOffsetEnd;
030:
031: private int red;
032: private int green;
033: private int blue;
034:
035: public RGB getRGBColor() {
036: return new RGB(getRed(), getGreen(), getBlue());
037: }
038:
039: /**
040: * @return
041: */
042: public int getBlue() {
043: return blue;
044: }
045:
046: /**
047: * @return
048: */
049: public int getEndOffset() {
050: return endOffset;
051: }
052:
053: /**
054: * @return
055: */
056: public int getGreen() {
057: return green;
058: }
059:
060: /**
061: * @return
062: */
063: public int getRed() {
064: return red;
065: }
066:
067: /**
068: * @return
069: */
070: public int getStartOffset() {
071: return startOffset;
072: }
073:
074: /**
075: * @param i
076: */
077: public void setBlue(int i) {
078: blue = i;
079: }
080:
081: /**
082: * @param i
083: */
084: public void setEndOffset(int i) {
085: endOffset = i;
086: }
087:
088: /**
089: * @param i
090: */
091: public void setGreen(int i) {
092: green = i;
093: }
094:
095: /**
096: * @param i
097: */
098: public void setRed(int i) {
099: red = i;
100: }
101:
102: /**
103: * @param i
104: */
105: public void setStartOffset(int i) {
106: startOffset = i;
107: }
108:
109: /**
110: * @return
111: */
112: public int getJavaOffsetEnd() {
113: return javaOffsetEnd;
114: }
115:
116: /**
117: * @return
118: */
119: public int getJavaOffsetStart() {
120: return javaOffsetStart;
121: }
122:
123: /**
124: * @param i
125: */
126: public void setJavaOffsetEnd(int i) {
127: javaOffsetEnd = i;
128: }
129:
130: /**
131: * @param i
132: */
133: public void setJavaOffsetStart(int i) {
134: javaOffsetStart = i;
135: }
136:
137: }
|