private void createField(RenderingContext c,
ITextOutputDevice outputDevice, PdfContentByte cb,
PdfWriter writer, PdfFormField group,
RadioButtonFormField fieldElem, RadioButtonFormField checked) {
Box box = fieldElem.getBox();
Element e = box.getElement();
String onValue = getValue(e);
float width = outputDevice.getDeviceLength(fieldElem.getWidth());
float height = outputDevice.getDeviceLength(fieldElem.getHeight());
PdfFormField field = PdfFormField.createEmpty(writer);
FSColor color = box.getStyle().getColor();
FSColor darker = box.getEffBackgroundColor(c).darkenColor();
createAppearances(cb, field, onValue, width, height, true, color, darker);
createAppearances(cb, field, onValue, width, height, false, color, darker);
field.setWidget(
outputDevice.createTargetArea(c, box),
PdfAnnotation.HIGHLIGHT_INVERT);
// XXX createTargetArea already looks up the page, but hopefully a document
// won't have enough radio buttons to matter
Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c);
PageBox page = c.getRootLayer().getPage(c, bounds.y);
field.setPlaceInPage(page.getPageNo()+1);
field.setBorderStyle(new PdfBorderDictionary(0.0f, 0));