You'll want to paint the header into the offscreen image, but make sure you translate/clip so you only get the header cell you want to drag. Then you can wrap that in a Picture and return it from getRepresentation().
On Sep 30, 2011, at 7:58 AM, prophe wrote: > How can I paint the header cell or column into a buffered image? > I try: > > Bounds headerBounds = getHeaderBounds(selectedIndex); > BufferedImage bImg = new > BufferedImage(headerBounds.width, > headerBounds.height, BufferedImage.TYPE_INT_RGB); > > Graphics2D graphics = bImg.createGraphics(); > paint(graphics); > > graphics.drawImage(bImg, 0, 0, null); > > picture = new Picture(bImg); > Is it wrong? > > ----- > Thank you! > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/Replace-column-in-table-view-tp3375080p3382124.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
