本文整理汇总了Java中org.pentaho.reporting.engine.classic.core.elementfactory.LabelElementFactory.setText方法的典型用法代码示例。如果您正苦于以下问题:Java LabelElementFactory.setText方法的具体用法?Java LabelElementFactory.setText怎么用?Java LabelElementFactory.setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.reporting.engine.classic.core.elementfactory.LabelElementFactory
的用法示例。
在下文中一共展示了LabelElementFactory.setText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTextField
import org.pentaho.reporting.engine.classic.core.elementfactory.LabelElementFactory; //导入方法依赖的package包/类
private static int createTextField( ItemBand details,
String labelText, String fieldName,
int labelWidth, int textWidth,
int pagePosition, float fontHeight,
boolean labelUnderline, boolean labelBold, boolean labelItalic ) {
ItemBand rowBand = new ItemBand();
rowBand.setLayout( BandStyleKeys.LAYOUT_ROW );
LabelElementFactory labelElementFactory = new LabelElementFactory();
labelElementFactory.setText( labelText );
labelElementFactory.setAbsolutePosition( new Point( 0, pagePosition ) );
labelElementFactory.setMinimumWidth( (float) labelWidth );
labelElementFactory.setMinimumHeight( fontHeight );
labelElementFactory.setUnderline( labelUnderline );
labelElementFactory.setBold( labelBold );
labelElementFactory.setItalic( labelItalic );
labelElementFactory.setDynamicHeight( true );
Element label = labelElementFactory.createElement();
rowBand.addElement( label );
TextFieldElementFactory textFactory = new TextFieldElementFactory();
textFactory.setFieldname( fieldName );
textFactory.setAbsolutePosition( new Point( labelWidth, pagePosition ) );
textFactory.setMinimumWidth( (float) textWidth );
textFactory.setMinimumHeight( fontHeight );
textFactory.setOverflowY( false );
textFactory.setDynamicHeight( true );
Element element = textFactory.createElement();
element.setDynamicContent( true );
rowBand.addElement( element );
details.addElement( rowBand );
return (int) ( pagePosition + fontHeight );
}