I resolve exception, but I don't know if my code is right. When I try to drag
first column - all ok. But when second or greater - I see black rectangle
and it location is more to the right as my column header and the place where
I've clicked.
And when I drag first column - the cursor of mouse is at the top right
corner of image! Can you tell me where I've done a mistake, look at my code
please:
@Override
public Visual getRepresentation() {
Picture picture = null;
if (selectedIndex!=-1){
Bounds headerBounds = getHeaderBounds(selectedIndex);
BufferedImage bImg = new
BufferedImage(headerBounds.width,
headerBounds.height, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = bImg.createGraphics();
graphics.clipRect(headerBounds.x, headerBounds.y,
headerBounds.width,
headerBounds.height);
paint(graphics);
graphics.drawImage(bImg, headerBounds.x, 0, null);
picture = new Picture(bImg);
}
return picture;
}
@Override
public Point getOffset() {
Bounds headerBounds = getHeaderBounds(selectedIndex);
Point point = new Point(headerBounds.x/2, headerBounds.y/2);
return point;
}
What line of code should I change?
-----
Thank you!
--
View this message in context:
http://apache-pivot-users.399431.n3.nabble.com/Replace-column-in-table-view-tp3375080p3382331.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.