You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "stefan.chonov" <s....@arbix.eu> on 2012/10/26 11:10:35 UTC

Is there some way to control "send to front" / "send to back" of object?

Hi,

Someone knows if there's a way to control the "send to front" / "send to
back" of objects added in a sheet via XSSF? I have two shapes. The second
shape overlap the first shape. I would like to make the first shape
overlapping the second shape. Is there any way to make this?

Regards,
Stefan



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Is-there-some-way-to-control-send-to-front-send-to-back-of-object-tp5711304.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Is there some way to control "send to front" / "send to back" of object?

Posted by "stefan.chonov" <s....@arbix.eu>.
Thank you Yegor. Your answer helped me a lot. I solved my problem :) 



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Is-there-some-way-to-control-Bring-to-front-Send-to-back-of-object-tp5711304p5711318.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Is there some way to control "send to front" / "send to back" of object?

Posted by "stefan.chonov" <s....@arbix.eu>.
Thank you very much Yegor. 

P.S. : I'll make a deep research before I give you a stupid reply again. Now
I have more gained experience with POI and I hope I will stop with stupid
questions.

Regards,
Stefan Chonov



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Is-there-some-way-to-control-Bring-to-front-Send-to-back-of-object-tp5711304p5711314.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Is there some way to control "send to front" / "send to back" of object?

Posted by Yegor Kozlov <ye...@dinom.ru>.
There is no easy way to change z-order of shapes in XSSF. The only way
to do it is via manipulating low-level xml.

z-order is defined by shape index in the drawing. To change it you
need to re-order xml beans in the collection of shapes:


        XSSFDrawing drawing = ...;
        CTDrawing ctDrawing = drawing.getCTDrawing();
        // changing entries in the list will change z-order of shapes
on the drawing
        List<CTTwoCellAnchor> list = ctDrawing.getTwoCellAnchorList();

Yegor

On Fri, Oct 26, 2012 at 1:10 PM, stefan.chonov <s....@arbix.eu> wrote:
> Hi,
>
> Someone knows if there's a way to control the "send to front" / "send to
> back" of objects added in a sheet via XSSF? I have two shapes. The second
> shape overlap the first shape. I would like to make the first shape
> overlapping the second shape. Is there any way to make this?
>
> Regards,
> Stefan
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/Is-there-some-way-to-control-send-to-front-send-to-back-of-object-tp5711304.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org