question: private void drawHorizontalScale ( final boolean top , final int scale , final int pixelperscale , final int offset , final Long colorNaming , final Long colorScale , final String name ) { final int y = ( top ) ? this . topborder : this . height - this . bottomborder ; int x = this . leftborder ; int s = offset ; while ( x < this . width - this . rightborder ) { if ( ( colorScale != null ) && ( x > this . leftborder ) && ( x < ( this . width - this . rightborder ) ) ) { setColor ( colorScale ) ; line ( x , this . topborder , x , this . height - this . bottomborder , 100 ) ; } setColor ( colorNaming ) ; line ( x , y - 3 , x , y + 3 , 100 ) ; PrintTool . print ( this , x , ( top ) ? y - 3 : y + 9 , 0 , Integer . toString ( s ) , - 1 , false , 80 ) ; x += pixelperscale ; s += scale ; } setColor ( colorNaming ) ; PrintTool . print ( this , this . width - this . rightborder , ( top ) ? y - 9 : y + 15 , 0 , name , 1 , false , 80 ) ; line ( this . leftborder - 4 , y , this . width - this . rightborder + 4 , y , 100 ) ; }
target:  draw a horizontal scale border