public void itemStateChanged(ItemEvent e) {
   ValueLabelItem item = (ValueLabelItem) e.getItem();
   if (e.getStateChange() == ItemEvent.SELECTED) {
     if (e.getSource() == lineThicknessBox) {
       annotation.getBorderStyle().setStrokeWidth((Float) item.getValue());
     } else if (e.getSource() == lineStyleBox) {
       annotation.getBorderStyle().setBorderStyle((Name) item.getValue());
     }
     // save the action state back to the document structure.
     updateCurrentAnnotation();
     currentAnnotationComponent.resetAppearanceShapes();
     currentAnnotationComponent.repaint();
   }
 }