You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Robinson, Brian L. (Mission Systems)" <Br...@ngc.com> on 2008/06/16 18:46:00 UTC

Bullets indented at different levels

Any idea how I can create text box that uses bullets indented at
different leves (with each level having it's own style and bullet
character)?

I've been trying to make it work with rich text runs but havevn't had
any luck.

			final TextBox shape = new TextBox();
			final TextRun tr = shape.getTextRun();
			shape.setText("");
			{
				RichTextRun rt =
tr.appendText("January\r\n");
				System.out.println("rt=" + rt);
				rt.setFontSize(42);
				rt.setBullet(true);
				rt.setBold(true);
				rt.setBulletOffset(0); // bullet offset
				rt.setTextOffset(50); // text offset
(should be greater than
	
// bullet offset)
				rt.setBulletChar('\u263A'); // bullet
character
			}
			{
				RichTextRun rt =
tr.appendText("February\r\n\n");
				System.out.println("rt=" + rt);
				rt.setItalic(true);
				rt.setFontSize(24);
				rt.setBullet(true);
				rt.setBulletOffset(1); // bullet offset
				rt.setTextOffset(55); // text offset
(should be greater than
	
// bullet offset)
				rt.setBulletChar('\u263A'); // bullet
character
			}
			slide.addShape(shape);