l.setColor(9);
l.setColor(8);
    public void process(DXFDocument doc, Map context) {        //set all blocks to color gray        Iterator i = doc.getDXFBlockIterator();        while (i.hasNext()) {            DXFBlock b = (DXFBlock) i.next();            Iterator ie = b.getDXFEntitiesIterator();            while (ie.hasNext()) {                DXFEntity entity = (DXFEntity) ie.next();                //set to gray                entity.setColor(9);            }        }        DXFEntity left = null;        DXFEntity top = null;        DXFEntity right = null;        DXFEntity bottom = null;        Bounds b = doc.getBounds();        double x = b.getMinimumX() + (b.getWidth() / 2);        double y = b.getMinimumY() + (b.getHeight() / 2);        //starting at the center point of the draft        Bounds lBounds = new Bounds(x, x, y, y);        Bounds rBounds = new Bounds(x, x, y, y);        Bounds tBounds = new Bounds(x, x, y, y);        Bounds bBounds = new Bounds(x, x, y, y);        i = doc.getDXFLayerIterator();        while (i.hasNext()) {            DXFLayer l = (DXFLayer) i.next();            //set color to gray            l.setColor(9);            Iterator ti = l.getDXFEntityTypeIterator();            while (ti.hasNext()) {                String type = (String) ti.next();                Iterator ei = l.getDXFEntities(type).iterator();                while (ei.hasNext()) {                    DXFEntity entity = (DXFEntity) ei.next();                    //set to gray                    entity.setColor(9);                    Bounds currentBounds = entity.getBounds();                    if (currentBounds.isValid()) {                        if (currentBounds.getMinimumX() <= lBounds.getMinimumX()) {                            lBounds = currentBounds;                            left = entity;                        }                        if (currentBounds.getMinimumY() <= bBounds.getMinimumY()) {                            bBounds = currentBounds;                            bottom = entity;                        }                        if (currentBounds.getMaximumX() >= rBounds.getMaximumX()) {                            rBounds = currentBounds;                            right = entity;                        }                        if (currentBounds.getMaximumY() >= tBounds.getMaximumY()) {                            tBounds = currentBounds;                            top = entity;                        }                    }                }            }        }        //left -> red        left.setColor(1);        addBounds(lBounds, doc, 1, left);        //right -> green        right.setColor(3);        addBounds(rBounds, doc, 3, right);        //bottom blue        bottom.setColor(5);        addBounds(bBounds, doc, 5, bottom);        //top color -> magenta        top.setColor(6);        addBounds(tBounds, doc, 6, top);    }