public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) {
   super.changedUpdate(changes, a, f);
   int pos = changes.getOffset();
   if (pos <= getStartOffset() && (pos + changes.getLength()) >= getEndOffset()) {
     setPropertiesFromAttributes();
   }
 }
 /**
  * Establishes the parent view for this view. This is guaranteed to be called before any other
  * methods if the parent view is functioning properly.
  *
  * <p>This is implemented to forward to the superclass as well as call the {@link
  * #setPropertiesFromAttributes()} method to set the paragraph properties from the css attributes.
  * The call is made at this time to ensure the ability to resolve upward through the parents view
  * attributes.
  *
  * @param parent the new parent, or null if the view is being removed from a parent it was
  *     previously added to
  */
 public void setParent(View parent) {
   super.setParent(parent);
   if (parent != null) {
     setPropertiesFromAttributes();
   }
 }
 /**
  * Renders using the given rendering surface and area on that surface. This is implemented to
  * delegate to the css box painter to paint the border and background prior to the interior.
  *
  * @param g the rendering surface to use
  * @param allocation the allocated region to render into
  * @see View#paint
  */
 public void paint(Graphics g, Shape allocation) {
   Rectangle a = (Rectangle) allocation;
   painter.paint(g, a.x, a.y, a.width, a.height, this);
   super.paint(g, a);
 }