(Graphics graph)
| 266 | } |
| 267 | */ |
| 268 | public void paintCustom(Graphics graph) { |
| 269 | if(size()<1) |
| 270 | return; |
| 271 | scrollable=(startLine>0)?SCROLLABLE_UP:SCROLLABLE_NONE; |
| 272 | |
| 273 | maxWdth=getMaxWidth(); |
| 274 | |
| 275 | popUpWidth=(maxWdth>(width-border))?width-border:maxWdth+padding; |
| 276 | widthBorder=(maxWdth>popUpWidth)?border/2:(width-popUpWidth)/2; |
| 277 | |
| 278 | int stringsHeight=getHeight(); |
| 279 | |
| 280 | if (stringsHeight>height) { |
| 281 | scrollable=(startLine>0)?SCROLLABLE_BOTH:SCROLLABLE_DOWN; |
| 282 | |
| 283 | heightBorder=0; |
| 284 | popUpHeight=height; |
| 285 | } else { |
| 286 | popUpHeight=stringsHeight+padding; |
| 287 | heightBorder=(height-popUpHeight)/2; |
| 288 | } |
| 289 | |
| 290 | //graph.translate(widthBorder, heightBorder); |
| 291 | |
| 292 | //graph.setClip(0,0,popUpWidth+1,popUpHeight+1); |
| 293 | |
| 294 | /* int alpha = 200; |
| 295 | |
| 296 | if (alpha<255) { |
| 297 | fillSemiTransRect(graph, getColorBgnd(), alpha, widthBorder+1, heightBorder+1, popUpWidth-1, popUpHeight-1); |
| 298 | } else {*/ |
| 299 | |
| 300 | graph.setColor(getColorBgnd()); |
| 301 | graph.fillRect(widthBorder+1,heightBorder+1,popUpWidth-1,popUpHeight-1); //fill |
| 302 | //} |
| 303 | |
| 304 | graph.setColor(getColorInk()); |
| 305 | graph.drawRect(widthBorder,heightBorder,popUpWidth,popUpHeight); //border |
| 306 | |
| 307 | graph.setFont(font); |
| 308 | switch (scrollable) { |
| 309 | case SCROLLABLE_UP: |
| 310 | ri.drawImage(graph, RosterIcons.ICON_SCROLLABLE_UP, widthBorder+maxWdth-ri.getWidth(), heightBorder+popUpHeight-ri.getHeight()); |
| 311 | break; |
| 312 | case SCROLLABLE_BOTH: |
| 313 | ri.drawImage(graph, RosterIcons.ICON_SCROLLABLE_BOTH, widthBorder+maxWdth-ri.getWidth(), heightBorder+popUpHeight-ri.getHeight()); |
| 314 | break; |
| 315 | case SCROLLABLE_DOWN: |
| 316 | ri.drawImage(graph, RosterIcons.ICON_SCROLLABLE_DOWN, widthBorder+maxWdth-ri.getWidth(), heightBorder+popUpHeight-ri.getHeight()); |
| 317 | break; |
| 318 | } |
| 319 | |
| 320 | drawAllStrings(graph, widthBorder+2, heightBorder+3); |
| 321 | |
| 322 | //graph.translate(-widthBorder, -heightBorder); |
| 323 | //graph.setClip(0,0,width,height); |
| 324 | } |
| 325 |
no test coverage detected