labelElementFactory.setText( labelText ); labelElementFactory.setAbsolutePosition( new Point( 0, pagePosition ) ); labelElementFactory.setMinimumWidth( (float) labelWidth );
/** * Done parsing. * * @throws org.xml.sax.SAXException * if there is a parsing error. */ protected void doneParsing() throws SAXException { stringReadHandler.doneParsing(); final String text = stringReadHandler.getResult(); labelElementFactory.setText( text ); super.doneParsing(); }
public Element createLabelElement( final String label, final Rectangle2D bounds ) { final LabelElementFactory labelFactory = new LabelElementFactory(); labelFactory.setName( "LabelElement-" + label ); labelFactory.setText( label ); labelFactory.setFontName( "Serif" ); labelFactory.setFontSize( new Integer( 10 ) ); labelFactory.setBold( Boolean.FALSE ); labelFactory.setHeight( new Float( bounds.getHeight() ) ); labelFactory.setWidth( new Float( bounds.getWidth() ) ); labelFactory.setWrap( TextWrap.WRAP ); labelFactory.setAbsolutePosition( new Point2D.Double( bounds.getX(), bounds.getY() ) ); labelFactory.setHorizontalAlignment( ElementAlignment.LEFT ); labelFactory.setVerticalAlignment( ElementAlignment.TOP ); final Element labelElement = labelFactory.createElement(); return labelElement; }
private Element createLabel() { final LabelElementFactory labelFactory = new LabelElementFactory(); labelFactory.setText( "Large label" ); labelFactory.setFontName( "SansSerif" ); labelFactory.setFontSize( new Integer( 10 ) ); labelFactory.setBold( Boolean.TRUE ); labelFactory.setAbsolutePosition( new Point2D.Double( 0, 0.0 ) ); labelFactory.setMinimumSize( new FloatDimension( 4000, 10.0f ) ); labelFactory.setHorizontalAlignment( ElementAlignment.LEFT ); return labelFactory.createElement(); }
factory.setEmbedFont( ElementFactory.getBooleanValue( font.isEmbeddedFont() ) ); factory.setText( labeltext ); return factory.createElement();
protected void startParsing( final PropertyAttributes atts ) throws SAXException { super.startParsing( atts ); factory.setName( atts.getValue( getUri(), "id" ) ); factory.setText( atts.getValue( getUri(), "id" ) ); } }