Mercurial > projects > dwt-addons
comparison dwtx/jface/text/source/ImageUtilities.d @ 192:c3583c6ec027
Added missing default cases for switch statements
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 03 Nov 2008 22:52:26 +0100 |
parents | 02cd5f1224d3 |
children |
comparison
equal
deleted
inserted
replaced
191:1ef729510ed6 | 192:c3583c6ec027 |
---|---|
119 x= (r.width - bounds.width) / 2; | 119 x= (r.width - bounds.width) / 2; |
120 break; | 120 break; |
121 case DWT.RIGHT: | 121 case DWT.RIGHT: |
122 x= r.width - bounds.width; | 122 x= r.width - bounds.width; |
123 break; | 123 break; |
124 default: | |
124 } | 125 } |
125 | 126 |
126 int y= 0; | 127 int y= 0; |
127 switch (valign) { | 128 switch (valign) { |
128 case DWT.TOP: { | 129 case DWT.TOP: { |
136 case DWT.BOTTOM: { | 137 case DWT.BOTTOM: { |
137 FontMetrics fontMetrics= gc.getFontMetrics(); | 138 FontMetrics fontMetrics= gc.getFontMetrics(); |
138 y= r.height - (fontMetrics.getHeight() + bounds.height)/2; | 139 y= r.height - (fontMetrics.getHeight() + bounds.height)/2; |
139 break; | 140 break; |
140 } | 141 } |
142 default: | |
141 } | 143 } |
142 | 144 |
143 gc.drawImage(image, r.x+x, r.y+y); | 145 gc.drawImage(image, r.x+x, r.y+y); |
144 } | 146 } |
145 } | 147 } |