Float l = (Float) attributes.getAttribute(StyleConstants.LeftIndent); short left = 0; if (l != null) left = l.shortValue(); Float r = (Float) attributes.getAttribute(StyleConstants.RightIndent); short right = 0; if (r != null) right = r.shortValue(); Float t = (Float) attributes.getAttribute(StyleConstants.SpaceAbove); short top = 0; if (t != null) top = t.shortValue(); Float b = (Float) attributes.getAttribute(StyleConstants.SpaceBelow); short bottom = 0; if (b != null) bottom = b.shortValue(); setInsets(top, left, bottom, right);
top = (short) StyleConstants.getSpaceAbove(attributes); bottom = (short) StyleConstants.getSpaceBelow(attributes); left = (short) StyleConstants.getLeftIndent(attributes); right = (short) StyleConstants.getRightIndent(attributes);
  protected void setParagraphInsets(AttributeSet attributes)  {    Float l = (Float) attributes.getAttribute(StyleConstants.LeftIndent);    short left = 0;    if (l != null)      left = l.shortValue();    Float r = (Float) attributes.getAttribute(StyleConstants.RightIndent);    short right = 0;    if (r != null)      right = r.shortValue();    Float t = (Float) attributes.getAttribute(StyleConstants.SpaceAbove);    short top = 0;    if (t != null)      top = t.shortValue();    Float b = (Float) attributes.getAttribute(StyleConstants.SpaceBelow);    short bottom = 0;    if (b != null)      bottom = b.shortValue();    setInsets(top, left, bottom, right);  }