ypos=extpad+fm.getHeight();  if(r.y < (ypos+cellSize+extpad)) { g.drawString("Plot Matrix", xpos, ypos); xpos += 100; for(int i=0; i<m_selectedAttribs.length; i++) { if( xpos+cellSize < r.x) { xpos += cellSize+extpad; continue; } else if(xpos > r.x+r.width) { break; } else { attribWidth = fm.stringWidth(m_data.attribute(m_selectedAttribs[i]).name()); g.drawString(m_data.attribute(m_selectedAttribs[i]).name(), (attribWidth<cellSize) ? (xpos + (cellSize/2 - attribWidth/2)):xpos, ypos); } xpos += cellSize+extpad; } } xpos = extpad; ypos += fm.getHeight();
ypos=extpad;
    public void paintME(Graphics g) {      r = g.getClipBounds();      g.setColor( this.getBackground() );      g.fillRect(r.x, r.y, r.width, r.height);      g.setColor( fontColor );      int xpos = 0, ypos = 0, attribWidth=0;	        xpos = extpad;      ypos=extpad+fm.getHeight();	        if(r.y < (ypos+cellSize+extpad)) {	g.drawString("Plot Matrix", xpos, ypos);	xpos += 100;	for(int i=0; i<m_selectedAttribs.length; i++) {	  if( xpos+cellSize < r.x)	    { xpos += cellSize+extpad; continue; }	  else if(xpos > r.x+r.width)	    { break; }	  else {	    attribWidth = fm.stringWidth(m_data.attribute(m_selectedAttribs[i]).name());	    g.drawString(m_data.attribute(m_selectedAttribs[i]).name(), 			 (attribWidth<cellSize) ? (xpos + (cellSize/2 - attribWidth/2)):xpos, 			 ypos);	  }	  xpos += cellSize+extpad;	}      }      xpos = extpad; ypos += fm.getHeight();	        for(int j=m_selectedAttribs.length-1; j>=0; j--) {	if( ypos+cellSize < r.y )	  { ypos += cellSize+extpad;  continue; }	else if( ypos > r.y+r.height )	  break;	else {	  if(r.x < (xpos+cellSize+extpad))	    {g.drawString(m_data.attribute(m_selectedAttribs[j]).name(), xpos+extpad, ypos+cellSize/2); }	  xpos += 100;	  for(int i=0; i<m_selectedAttribs.length; i++) {	    if( xpos+cellSize < r.x) {	      xpos += cellSize+extpad; continue; }	    else if(xpos > r.x+r.width)	      break;	    else	      paintGraph(g, m_selectedAttribs[i], m_selectedAttribs[j], xpos, ypos);	    xpos += cellSize+extpad;	  }	}	xpos = extpad;	ypos += cellSize+extpad;      }    }