(Graphics g)
| 152 | } |
| 153 | |
| 154 | public void draw(Graphics g) { |
| 155 | |
| 156 | if (size == 0) return; |
| 157 | |
| 158 | yTranslate=g.getTranslateY(); |
| 159 | |
| 160 | drawHeight=g.getClipHeight(); |
| 161 | int drawWidth=g.getClipWidth(); |
| 162 | |
| 163 | scrollerX=drawWidth-scrollWidth; |
| 164 | |
| 165 | g.translate(scrollerX, 0); |
| 166 | |
| 167 | g.setColor(colorTop); |
| 168 | g.fillRect(1, 0, scrollWidth-2, drawHeight-1); |
| 169 | |
| 170 | g.setColor(colorBorder); |
| 171 | g.drawLine(0, 0, 0, drawHeight-1); |
| 172 | g.drawLine(scrollWidth-1, 0, scrollWidth-1, drawHeight-1); |
| 173 | |
| 174 | drawHeight-=minimumHeight; |
| 175 | |
| 176 | |
| 177 | scrollerSize = (drawHeight*windowSize)/size+minimumHeight; |
| 178 | |
| 179 | scrollerPos = (drawHeight*position)/size; |
| 180 | scrollerX-=scrollWidth; |
| 181 | g.setColor(colorBar); |
| 182 | g.fillRect(1, scrollerPos, scrollWidth-2, scrollerSize); |
| 183 | g.setColor(colorBorder); |
| 184 | g.drawLine(0, scrollerPos, scrollWidth-1, scrollerPos); |
| 185 | g.drawLine(0, scrollerPos+scrollerSize, scrollWidth-1, scrollerPos+scrollerSize); |
| 186 | } |
| 187 | } |
nothing calls this directly
no test coverage detected