Mercurial > projects > dwt-addons
comparison dwtx/jface/text/projection/Segment.d @ 158:25f1f92fa3df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 26 Aug 2008 02:46:34 +0200 |
parents | 7d818bd32d63 |
children |
comparison
equal
deleted
inserted
replaced
157:7f75eaa8103a | 158:25f1f92fa3df |
---|---|
43 public class Segment : Position { | 43 public class Segment : Position { |
44 | 44 |
45 /** The corresponding fragment for this segment. */ | 45 /** The corresponding fragment for this segment. */ |
46 public Fragment fragment; | 46 public Fragment fragment; |
47 /** A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries. */ | 47 /** A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries. */ |
48 public bool isMarkedForStretch; | 48 public bool isMarkedForStretch_; |
49 /** A flag indicating that the segment updater should shift this segment when a change happens at its boundaries. */ | 49 /** A flag indicating that the segment updater should shift this segment when a change happens at its boundaries. */ |
50 public bool isMarkedForShift; | 50 public bool isMarkedForShift_; |
51 | 51 |
52 /** | 52 /** |
53 * Creates a new segment covering the given range. | 53 * Creates a new segment covering the given range. |
54 * | 54 * |
55 * @param offset the offset of the segment | 55 * @param offset the offset of the segment |
61 | 61 |
62 /** | 62 /** |
63 * Sets the stretching flag. | 63 * Sets the stretching flag. |
64 */ | 64 */ |
65 public void markForStretch() { | 65 public void markForStretch() { |
66 isMarkedForStretch= true; | 66 isMarkedForStretch_= true; |
67 } | 67 } |
68 | 68 |
69 /** | 69 /** |
70 * Returns <code>true</code> if the stretching flag is set, <code>false</code> otherwise. | 70 * Returns <code>true</code> if the stretching flag is set, <code>false</code> otherwise. |
71 * @return <code>true</code> if the stretching flag is set, <code>false</code> otherwise | 71 * @return <code>true</code> if the stretching flag is set, <code>false</code> otherwise |
72 */ | 72 */ |
73 public bool isMarkedForStretch() { | 73 public bool isMarkedForStretch() { |
74 return isMarkedForStretch; | 74 return isMarkedForStretch_; |
75 } | |
76 public bool isMarkedForStretch(bool v) { | |
77 isMarkedForStretch_ = v; | |
78 return isMarkedForStretch(); | |
75 } | 79 } |
76 | 80 |
77 /** | 81 /** |
78 * Sets the shifting flag. | 82 * Sets the shifting flag. |
79 */ | 83 */ |
80 public void markForShift() { | 84 public void markForShift() { |
81 isMarkedForShift= true; | 85 isMarkedForShift_= true; |
82 } | 86 } |
83 | 87 |
84 /** | 88 /** |
85 * Returns <code>true</code> if the shifting flag is set, <code>false</code> otherwise. | 89 * Returns <code>true</code> if the shifting flag is set, <code>false</code> otherwise. |
86 * @return <code>true</code> if the shifting flag is set, <code>false</code> otherwise | 90 * @return <code>true</code> if the shifting flag is set, <code>false</code> otherwise |
87 */ | 91 */ |
88 public bool isMarkedForShift() { | 92 public bool isMarkedForShift() { |
89 return isMarkedForShift; | 93 return isMarkedForShift_; |
94 } | |
95 public bool isMarkedForShift(bool v) { | |
96 isMarkedForShift_ = v; | |
97 return isMarkedForShift(); | |
90 } | 98 } |
91 | 99 |
92 /** | 100 /** |
93 * Clears the shifting and the stretching flag. | 101 * Clears the shifting and the stretching flag. |
94 */ | 102 */ |
95 public void clearMark() { | 103 public void clearMark() { |
96 isMarkedForStretch= false; | 104 isMarkedForStretch_= false; |
97 isMarkedForShift= false; | 105 isMarkedForShift_= false; |
98 } | 106 } |
99 } | 107 } |