public void drawScale(Graphics gg, int startx, int endx, int scaleWidth)\r
{\r
\r
- double charWidth = av.getCharWidth();\r
+ int charWidth = av.getCharWidth();\r
\r
gg.setFont(av.getFont());\r
\r
\r
//Fill the selected columns\r
ColumnSelection cs = av.getColumnSelection();\r
- int width = (int)charWidth;\r
+ int width = charWidth;\r
if (width == 0)\r
width = 1;\r
\r
// System.out.println("Selection = " + sel);\r
if ( sel >= startx && sel <= endx) {\r
\r
- gg.fillRect((int)((sel-startx)*charWidth),0,width,getHeight());\r
+ gg.fillRect((sel-startx)*charWidth,0,width,getHeight());\r
}\r
}\r
\r
\r
String string = String.valueOf(i);\r
\r
- gg.drawString(string,(int)((i-startx-1)*charWidth),15);\r
+ gg.drawString(string,(i-startx-1)*charWidth,15);\r
gg.drawLine( (int)((i-startx-1)*charWidth +charWidth/2), 17, (int)((i-startx-1)*charWidth +charWidth/2), 24);\r
\r
}\r
\r
public void doMousePressed(MouseEvent evt) {\r
int x = evt.getX();\r
- int res = x/(int)av.getCharWidth() + av.getStartRes();\r
+ int res = x/av.getCharWidth() + av.getStartRes();\r
\r
if (! av.getColumnSelection().contains(res))\r
av.getColumnSelection().addElement(res);\r