Hi,
I made a screenshot of the table:
<cannot post link to imageshack, why?>
I drew a cross on the transparent images for debugging. As you can
see, there is always a vertical space between the images.
I post my current code below.
Thanks for help
Magnus
---
private void init ()
{
normalize (grd);
setPixelSize (bs+55,bs+55); // enlarged for debugging
this.addStyleName ("pnl-g"); // green border
grd.setPixelSize (bs,bs);
grd.setSize (bs+"px",bs+"px");
grd.setBorderWidth (0);
grd.setCellPadding (0);
grd.setCellSpacing (0);
grd.addStyleName ("pnl-r");
addImages (grd);
CellFormatter cf = grd.getCellFormatter ();
for (int x = 1;x < 9;x++)
{
cf.addStyleName (x,0,"ics-Board-Annotation-V");
cf.addStyleName (x,9,"ics-Board-Annotation-V");
}
for (int y = 1;y < 9;y++)
{
cf.addStyleName (0,y,"ics-Board-Annotation-H");
cf.addStyleName (9,y,"ics-Board-Annotation-H");
}
grd.setPixelSize (bs,bs);
grd.setSize (bs+"px",bs+"px");
}
private void addImages (Grid grd)
{
CellFormatter f = grd.getCellFormatter ();
for (int x = 1;x < 9;x++)
{
Image i;
i = new Image (Resources.instance.nlv ());
grd.setWidget (0,x,i);
i = new Image (Resources.instance.nlv ());
grd.setWidget (9,x,i);
}
for (int y = 1;y < 9;y++)
{
Image i;
i= new Image (Resources.instance.nlh ());
grd.setWidget (y,0,i);
i = new Image (Resources.instance.nlh ());
grd.setWidget (y,9,i);
}
}
private void normalize (Grid grd)
{
for (int y = 0;y < 10;y++)
for (int x = 0;x < 10;x++)
{
CellFormatter f = grd.getCellFormatter ();
Element e = f.getElement (y,x);
f.removeStyleName (y,x,"td");
f.removeStyleName (y,x,"tr");
String tc = e.getClassName ();
// tried almost everything:
Style stl = e.getStyle ();
stl.clearBorderStyle ();
stl.clearBorderWidth ();
stl.clearBottom ();
stl.clearHeight ();
stl.clearLeft ();
stl.clearMargin ();
stl.clearPadding ();
stl.clearPosition ();
stl.clearRight ();
stl.clearTextDecoration ();
stl.clearTop ();
stl.clearWidth ();
stl.clearZIndex ();
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.