السبت، 22 يونيو 2013

How to create rotated Text using birt api

Today i will introduce you how to create rotated Text using birt api

1 - download this JARs
from http://code.google.com/a/eclipselabs.org/p/birt-controls-lib/?redir=1
2 - add these jars into the "java build path"
3 - use the ExtendedItemHandle class as follow

{code}

                ExtendedItemHandle es=designFactory.newExtendedItem("ex1", "RotatedText");
                es.setProperty("rotationAngle", "90");
                es.setProperty("text", "\"HELLO\"");
                es.setProperty("wrapPoint", "0in");
                
{code}

4 - add the es object to any container that you want to have the rotated text


{code}
     LabelHandle label1s = designFactory.newLabel( "MultiLineHeader");
                    label1s.setText("Multi Line Header");
                    CellHandle cell1 = (CellHandle) tableheader0.getCells( ).get(0);
                    tableheader0.getCells( ).get(1).drop();
                    tableheader0.getCells( ).get(2).drop();
                    cell1.setColumnSpan(3);
                  
                    cell1.getContent( ).add( es );

{code}

My First Java Topic

My First Java Topic
Hello Java Fans
This is My Java blog,I will try to share my java knowledge with you
hope everyone doing well
thanks