public Cell(Properties attributes) { this(); String value; if ((value = (String)attributes.remove(ElementTags.HORIZONTALALIGN)) != null) { setHorizontalAlignment(value); } if ((value = (String)attributes.remove(ElementTags.VERTICALALIGN)) != null) { setVerticalAlignment(value); } if ((value = (String)attributes.remove(ElementTags.WIDTH)) != null) { setWidth(value); } if ((value = (String)attributes.remove(ElementTags.COLSPAN)) != null) { setColspan(Integer.parseInt(value)); } if ((value = (String)attributes.remove(ElementTags.ROWSPAN)) != null) { setRowspan(Integer.parseInt(value)); } if ((value = (String)attributes.remove(ElementTags.LEADING)) != null) { setLeading(Float.valueOf(value + "f").floatValue()); } else { setLeading(16); } if ((value = (String)attributes.remove(ElementTags.HEADER)) != null) { setHeader(new Boolean(value).booleanValue()); } if ((value = (String)attributes.remove(ElementTags.NOWRAP)) != null) { setNoWrap(new Boolean(value).booleanValue()); } if ((value = (String)attributes.remove(ElementTags.BORDERWIDTH)) != null) { setBorderWidth(Float.valueOf(value + "f").floatValue()); } int border = 0; if ((value = (String)attributes.remove(ElementTags.LEFT)) != null) { if (new Boolean(value).booleanValue()) border |= Rectangle.LEFT; } if ((value = (String)attributes.remove(ElementTags.RIGHT)) != null) { if (new Boolean(value).booleanValue()) border |= Rectangle.RIGHT; } if ((value = (String)attributes.remove(ElementTags.TOP)) != null) { if (new Boolean(value).booleanValue()) border |= Rectangle.TOP; } if ((value = (String)attributes.remove(ElementTags.BOTTOM)) != null) { if (new Boolean(value).booleanValue()) border |= Rectangle.BOTTOM; } setBorder(border); String r = null; String g = null; String b = null; if ((r = (String)attributes.remove(ElementTags.RED)) != null || (g = (String)attributes.remove(ElementTags.GREEN)) != null || (b = (String)attributes.remove(ElementTags.BLUE)) != null) { int red = 0; int green = 0; int blue = 0; if (r != null) red = Integer.parseInt(r); if (g != null) green = Integer.parseInt(g); if (b != null) blue = Integer.parseInt(b); setBorderColor(new Color(red, green, blue)); } else if ((value = (String)attributes.remove(ElementTags.BORDERCOLOR)) != null) { setBorderColor(ElementTags.decodeColor(value)); } if ((r = (String)attributes.remove(ElementTags.BGRED)) != null || (g = (String)attributes.remove(ElementTags.BGGREEN)) != null || (b = (String)attributes.remove(ElementTags.BGBLUE)) != null) { int red = 0; int green = 0; int blue = 0; if (r != null) red = Integer.parseInt(r); if (g != null) green = Integer.parseInt(g); if (b != null) blue = Integer.parseInt(b); setBackgroundColor(new Color(red, green, blue)); } else if ((value = (String)attributes.remove(ElementTags.BACKGROUNDCOLOR)) != null) { setBackgroundColor(ElementTags.decodeColor(value)); } if ((value = (String)attributes.remove(ElementTags.GRAYFILL)) != null) { setGrayFill(Float.valueOf(value + "f").floatValue()); } if (attributes.size() > 0) setMarkupAttributes(attributes);
public Cell() {  super(0, 0, 0, 0); setBorder(BOX); setBorderWidth(0.5f);   arrayList = new ArrayList();
    public Cell(Properties attributes) {        this();        String value;        if ((value = (String)attributes.remove(ElementTags.HORIZONTALALIGN)) != null) {            setHorizontalAlignment(value);        }        if ((value = (String)attributes.remove(ElementTags.VERTICALALIGN)) != null) {            setVerticalAlignment(value);        }        if ((value = (String)attributes.remove(ElementTags.WIDTH)) != null) {            setWidth(value);        }        if ((value = (String)attributes.remove(ElementTags.COLSPAN)) != null) {            setColspan(Integer.parseInt(value));        }        if ((value = (String)attributes.remove(ElementTags.ROWSPAN)) != null) {            setRowspan(Integer.parseInt(value));        }        if ((value = (String)attributes.remove(ElementTags.LEADING)) != null) {            setLeading(Float.valueOf(value + "f").floatValue());        }        else {            setLeading(16);        }        if ((value = (String)attributes.remove(ElementTags.HEADER)) != null) {            setHeader(new Boolean(value).booleanValue());        }        if ((value = (String)attributes.remove(ElementTags.NOWRAP)) != null) {            setNoWrap(new Boolean(value).booleanValue());        }        if ((value = (String)attributes.remove(ElementTags.BORDERWIDTH)) != null) {            setBorderWidth(Float.valueOf(value + "f").floatValue());        }        int border = 0;        if ((value = (String)attributes.remove(ElementTags.LEFT)) != null) {            if (new Boolean(value).booleanValue()) border |= Rectangle.LEFT;        }        if ((value = (String)attributes.remove(ElementTags.RIGHT)) != null) {            if (new Boolean(value).booleanValue()) border |= Rectangle.RIGHT;        }        if ((value = (String)attributes.remove(ElementTags.TOP)) != null) {            if (new Boolean(value).booleanValue()) border |= Rectangle.TOP;        }        if ((value = (String)attributes.remove(ElementTags.BOTTOM)) != null) {            if (new Boolean(value).booleanValue()) border |= Rectangle.BOTTOM;        }        setBorder(border);        String r = null;        String g = null;        String b = null;        if ((r = (String)attributes.remove(ElementTags.RED)) != null ||        (g = (String)attributes.remove(ElementTags.GREEN)) != null ||        (b = (String)attributes.remove(ElementTags.BLUE)) != null) {            int red = 0;            int green = 0;            int blue = 0;            if (r != null) red = Integer.parseInt(r);            if (g != null) green = Integer.parseInt(g);            if (b != null) blue = Integer.parseInt(b);            setBorderColor(new Color(red, green, blue));        }        else if ((value = (String)attributes.remove(ElementTags.BORDERCOLOR)) != null) {            setBorderColor(ElementTags.decodeColor(value));        }        if ((r = (String)attributes.remove(ElementTags.BGRED)) != null ||        (g = (String)attributes.remove(ElementTags.BGGREEN)) != null ||        (b = (String)attributes.remove(ElementTags.BGBLUE)) != null) {            int red = 0;            int green = 0;            int blue = 0;            if (r != null) red = Integer.parseInt(r);            if (g != null) green = Integer.parseInt(g);            if (b != null) blue = Integer.parseInt(b);            setBackgroundColor(new Color(red, green, blue));        }        else if ((value = (String)attributes.remove(ElementTags.BACKGROUNDCOLOR)) != null) {            setBackgroundColor(ElementTags.decodeColor(value));        }        if ((value = (String)attributes.remove(ElementTags.GRAYFILL)) != null) {            setGrayFill(Float.valueOf(value + "f").floatValue());        }        if (attributes.size() > 0) setMarkupAttributes(attributes);    }