本文整理汇总了Java中net.sf.jasperreports.engine.type.RunDirectionEnum类的典型用法代码示例。如果您正苦于以下问题:Java RunDirectionEnum类的具体用法?Java RunDirectionEnum怎么用?Java RunDirectionEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RunDirectionEnum类属于net.sf.jasperreports.engine.type包,在下文中一共展示了RunDirectionEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPropertyValue
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void setPropertyValue(Object id, Object value) {
JRDesignCrosstab jrElement = (JRDesignCrosstab) getValue();
if (id.equals(JRDesignCrosstab.PROPERTY_REPEAT_COLUMN_HEADERS))
jrElement.setRepeatColumnHeaders((Boolean) value);
else if (id.equals(JRDesignCrosstab.PROPERTY_REPEAT_ROW_HEADERS))
jrElement.setRepeatRowHeaders((Boolean) value);
else if (id.equals(JRBaseCrosstab.PROPERTY_HORIZONTAL_POSITION))
jrElement.setHorizontalPosition(HorizontalPositionUtil.getTextPosition4Pos((Integer) value));
else if (id.equals(JRDesignCrosstab.PROPERTY_IGNORE_WIDTH))
jrElement.setIgnoreWidth((Boolean) value);
else if (id.equals(JRDesignCrosstab.PROPERTY_COLUMN_BREAK_OFFSET))
jrElement.setColumnBreakOffset((Integer) value);
if (id.equals(JRBaseCrosstab.PROPERTY_RUN_DIRECTION)) {
jrElement.setRunDirection((RunDirectionEnum) runDirectionD.getEnumValue(value));
getCrosstabManager().refresh();
getPropertyChangeSupport().firePropertyChange(new PropertyChangeEvent(this, JRBaseCrosstab.PROPERTY_RUN_DIRECTION, null, value));
} else if (id.equals(JRDesignCrosstab.PROPERTY_PARAMETERS_MAP_EXPRESSION))
jrElement.setParametersMapExpression(ExprUtil.setValues(jrElement.getParametersMapExpression(), value));
else
super.setPropertyValue(id, value);
}
示例2: addBand
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
/**
*
*/
private void addBand(JRBand band, boolean isColumnBand)
{
if (band != null)
{
JRBasePrintFrame frame = new JRBasePrintFrame(null);
frame.setX(
isColumnBand && report.getColumnDirection() == RunDirectionEnum.RTL
? report.getPageWidth() - report.getRightMargin() - report.getColumnWidth()
: report.getLeftMargin()
);
frame.setY(offsetY);
frame.setWidth(
isColumnBand
? report.getColumnWidth()
: report.getPageWidth() - report.getLeftMargin() - report.getRightMargin()
);
frame.setHeight(band.getHeight());
band.visit(new ConvertVisitor(this, frame));
pageElements.add(frame);
offsetY += band.getHeight();
addBandSeparator(offsetY);
}
}
示例3: setColumnDirection
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
/**
* Sets the column direction.
*/
public void setColumnDirection(RunDirectionEnum columnDirection)
{
Object old = this.columnDirection;
this.columnDirection = columnDirection;
getEventSupport().firePropertyChange(PROPERTY_COLUMN_DIRECTION, old, this.columnDirection);
}
示例4: render
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void render()
{
ColumnText colText = new ColumnText(pdfContentByte);
colText.setSimpleColumn(
getPhrase(styledText, text),
x + leftPadding,
pdfExporter.getCurrentPageFormat().getPageHeight()
- y
- topPadding
- verticalAlignOffset
- text.getLeadingOffset(),
//+ text.getLineSpacingFactor() * text.getFont().getSize(),
x + width - rightPadding,
pdfExporter.getCurrentPageFormat().getPageHeight()
- y
- height
+ bottomPadding,
0,//text.getLineSpacingFactor(),// * text.getFont().getSize(),
horizontalAlignment == Element.ALIGN_JUSTIFIED_ALL ? Element.ALIGN_JUSTIFIED : horizontalAlignment
);
colText.setLeading(0, text.getLineSpacingFactor());// * text.getFont().getSize());
colText.setRunDirection(
text.getRunDirectionValue() == RunDirectionEnum.LTR
? PdfWriter.RUN_DIRECTION_LTR : PdfWriter.RUN_DIRECTION_RTL
);
try
{
colText.go();
}
catch (DocumentException e)
{
throw new JRRuntimeException(e);
}
}
示例5: concreteHorizontalPosition
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
protected HorizontalPosition concreteHorizontalPosition()
{
HorizontalPosition position = getHorizontalPosition();
if (position == null)
{
position = getRunDirectionValue() == RunDirectionEnum.RTL
? HorizontalPosition.RIGHT : HorizontalPosition.LEFT;
}
return position;
}
示例6: setOffsetX
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
/**
*
*/
private void setOffsetX()
{
if (columnDirection == RunDirectionEnum.RTL)
{
offsetX = pageWidth - rightMargin - columnWidth - columnIndex * (columnSpacing + columnWidth);
}
else
{
offsetX = leftMargin + columnIndex * (columnSpacing + columnWidth);
}
}
示例7: readObject
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
in.defaultReadObject();
if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
{
runDirectionValue = RunDirectionEnum.getByValue(runDirection);
}
}
示例8: setRunDirection
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void setRunDirection(RunDirectionEnum runDirectionValue)
{
RunDirectionEnum old = this.runDirectionValue;
this.runDirectionValue = runDirectionValue;
getEventSupport().firePropertyChange(PROPERTY_RUN_DIRECTION, old, this.runDirectionValue);
}
示例9: setRunDirection
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void setRunDirection(RunDirectionEnum runDirectionValue)
{
RunDirectionEnum old = this.runDirectionValue;
this.runDirectionValue = runDirectionValue;
getEventSupport().firePropertyChange(JRBaseCrosstab.PROPERTY_RUN_DIRECTION, old, this.runDirectionValue);
}
示例10: ColumnDirectionProperty
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ColumnDirectionProperty(JasperDesign jd)
{
super(RunDirectionEnum.class,jd);
this.jd = jd;
setValue("suppressCustomEditor", Boolean.TRUE);
}
示例11: getTagList
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
public List getTagList()
{
List tags = new java.util.ArrayList();
tags.add(new Tag(RunDirectionEnum.LTR, I18n.getString("Global.Property.ColumnDirection.LTR")));
tags.add(new Tag(RunDirectionEnum.RTL, I18n.getString("Global.Property.ColumnDirection.RTL")));
return tags;
}
示例12: setPropertyValue
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void setPropertyValue(Object value) {
if (value != null && value instanceof RunDirectionEnum)
{
jd.setColumnDirection( (RunDirectionEnum)value);
}
}
示例13: RunDirectionProperty
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public RunDirectionProperty(JRDesignCrosstab crosstab)
{
super(RunDirectionEnum.class, crosstab);
this.crosstab = crosstab;
setValue("suppressCustomEditor", Boolean.TRUE);
}
示例14: getTagList
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
public List getTagList() {
List list = new ArrayList();
list.add(new Tag(RunDirectionEnum.LTR, "Left to Right"));
list.add(new Tag(RunDirectionEnum.RTL, "Right to Left"));
return list;
}
示例15: test
import net.sf.jasperreports.engine.type.RunDirectionEnum; //导入依赖的package包/类
@Override
public void test() {
super.test();
JRBaseCrosstab crosstab = (JRBaseCrosstab) getJasperReport().getSummary().getElementByKey("summary.crosstab1");
Assert.assertFalse("Crosstab repeatColumnHeaders", crosstab.isRepeatColumnHeaders());
Assert.assertFalse("Crosstab repeatRowHeaders", crosstab.isRepeatRowHeaders());
Assert.assertEquals("Crosstab columnBreakOffset", 100, crosstab.getColumnBreakOffset());
Assert.assertTrue("Crosstab ignoreWidth", crosstab.getIgnoreWidth());
Assert.assertEquals("Crosstab runDirection", RunDirectionEnum.RTL, crosstab.getRunDirectionValue());
Assert.assertEquals("Crosstab row group position", CrosstabRowPositionEnum.STRETCH, crosstab.getRowGroups()[0].getPositionValue());
Assert.assertEquals("Crosstab column group position", CrosstabColumnPositionEnum.STRETCH, crosstab.getColumnGroups()[0].getPositionValue());
}