• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java OrientationEnum类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.sf.jasperreports.engine.type.OrientationEnum的典型用法代码示例。如果您正苦于以下问题:Java OrientationEnum类的具体用法?Java OrientationEnum怎么用?Java OrientationEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OrientationEnum类属于net.sf.jasperreports.engine.type包,在下文中一共展示了OrientationEnum类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: readObject

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
	in.defaultReadObject();

	styleResolver = StyleResolver.getInstance();

	if (detail != null)
	{
		detailSection = new JRBaseSection(detail);
		detail = null;
	}
	
	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
	{
		whenNoDataTypeValue = WhenNoDataTypeEnum.getByValue(whenNoDataType);
		printOrderValue = PrintOrderEnum.getByValue(printOrder);
		orientationValue = OrientationEnum.getByValue(orientation);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRBaseReport.java


示例2: addBookmark

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
protected void addBookmark(int level, String title, int x, int y)
{
	Bookmark parent = bookmarkStack.peek();
	// searching for parent
	while(parent.level >= level)
	{
		bookmarkStack.pop();
		parent = bookmarkStack.peek();
	}

	if (!getCurrentItemConfiguration().isCollapseMissingBookmarkLevels())
	{
		// creating empty bookmarks in order to preserve the bookmark level
		for (int i = parent.level + 1; i < level; ++i)
		{
			Bookmark emptyBookmark = new Bookmark(parent, parent.pdfOutline.getPdfDestination(), EMPTY_BOOKMARK_TITLE);
			bookmarkStack.push(emptyBookmark);
			parent = emptyBookmark;
		}
	}
	int height = OrientationEnum.PORTRAIT.equals(pageFormat.getOrientation()) 
			? pageFormat.getPageHeight() - y 
			: y;
	Bookmark bookmark = new Bookmark(parent, x, height, title);
	bookmarkStack.push(bookmark);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRPdfExporter.java


示例3: setAnchor

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
protected void setAnchor(Chunk chunk, JRPrintAnchor anchor, JRPrintElement element)
{
	String anchorName = anchor.getAnchorName();
	if (anchorName != null)
	{
		chunk.setLocalDestination(anchorName);

		if (anchor.getBookmarkLevel() != JRAnchor.NO_BOOKMARK)
		{
			int x = OrientationEnum.PORTRAIT.equals(pageFormat.getOrientation()) 
					? getOffsetX() + element.getX() 
					: getOffsetY() + element.getY();
			int y = OrientationEnum.PORTRAIT.equals(pageFormat.getOrientation()) 
					? getOffsetY() + element.getY() 
					: getOffsetX() + element.getX();
			addBookmark(anchor.getBookmarkLevel(), anchor.getAnchorName(), x, y);
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:JRPdfExporter.java


示例4: exportPart

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
/**
 *
 */
protected void exportPart(Integer pageIndex, PrintPart part) throws JRException, IOException
{
	xmlWriter.startElement(JRXmlConstants.ELEMENT_part);

	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_pageIndex, pageIndex);
	xmlWriter.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, part.getName());
	PrintPageFormat pageFormat = part.getPageFormat();
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_pageWidth, pageFormat.getPageWidth());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_pageHeight, pageFormat.getPageHeight());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_topMargin, pageFormat.getTopMargin());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_leftMargin, pageFormat.getLeftMargin());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_bottomMargin, pageFormat.getBottomMargin());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_rightMargin, pageFormat.getRightMargin());
	xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_orientation, pageFormat.getOrientation(), OrientationEnum.PORTRAIT);

	xmlWriter.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRXmlExporter.java


示例5: setJasperDesign

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
public void setJasperDesign(JasperDesign jd)
{
    this.jasperDesign = jd;
    boolean old = setUpdating(true);
    jSpinnerColumns.setValue(jd.getColumnCount());
    multiUnitNumberEditorWidth.setValue( jd.getPageWidth() );
    multiUnitNumberEditorHeight.setValue(jd.getPageHeight());
    multiUnitNumberEditorMarginaTop.setValue(jd.getTopMargin());
    multiUnitNumberEditorMarginBottom.setValue(jd.getBottomMargin());
    multiUnitNumberEditorMarginLeft.setValue(jd.getLeftMargin());
    multiUnitNumberEditorMarginRight.setValue(jd.getRightMargin());
    multiUnitNumberEditorColumnWidth.setValue( jd.getColumnWidth() );
    multiUnitNumberEditorcolumnSpace.setValue(jd.getColumnSpacing());

    jRadioLandscape.setSelected(  jd.getOrientationValue() == OrientationEnum.LANDSCAPE );
    jRadioPortrait.setSelected(  jd.getOrientationValue() == OrientationEnum.PORTRAIT );

    Misc.setComboboxSelectedTagValue(jComboBoxFormat, PageSize.deductPageFormat(jd.getPageWidth(), jd.getPageHeight()));
    setUpdating(old);
    updatePreview();

}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:23,代码来源:PageFormatPanel.java


示例6: createEmpty

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
static JasperDesign createEmpty(String tablename, int pageWidth, int pageHeight, boolean margins) {
	JasperDesign ret = new JasperDesign();
	ret.setName(Strings.removeExportIllegalChars(AppConstants.ORG_NAME + " - " + tablename));
	ret.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
	ret.setWhenResourceMissingType(WhenResourceMissingTypeEnum.EMPTY);
	ret.setOrientation(OrientationEnum.LANDSCAPE);
	ret.setPageWidth(pageWidth);
	ret.setPageHeight(pageHeight);

	if (!margins) {
		ret.setLeftMargin(0);
		ret.setRightMargin(0);
		ret.setTopMargin(0);
		ret.setBottomMargin(0);
	}

	ret.setColumnWidth(Math.min(getAvailableWidth(ret), ret.getColumnWidth()));

	return ret;
}
 
开发者ID:PGWelch,项目名称:com.opendoorlogistics,代码行数:21,代码来源:ReportBuilderUtils.java


示例7: test

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@Override
public void test() {
	super.test();

	numberOfPagesTest(1);
	columnTitleCountTest(column1, 0);
	columnDetailCountTest(column1, 0);

	elementCountTest("title.textField1", 3);
	elementValueTest("title.textField1", "bundleKey3", "bundleKey3", "bundleValue");

	FontUtil fontUtil = FontUtil.getInstance(DefaultJasperReportsContext.getInstance());
	Assert.assertFalse("fonts", fontUtil.getFontFamilyNames().isEmpty());

	JasperPrint jasperPrint = getJasperPrint();
	Assert.assertEquals("Report", jasperPrint.getName());
	Assert.assertEquals(OrientationEnum.LANDSCAPE, jasperPrint.getOrientationValue());
	Assert.assertEquals(1190, jasperPrint.getPageWidth());
	Assert.assertEquals(842, jasperPrint.getPageHeight());

	Assert.assertEquals(50, scriptlet.count);
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:23,代码来源:Report1Test.java


示例8: readObject

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的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)
	{
		orientationValue = OrientationEnum.getByValue(orientation);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JasperPrint.java


示例9: setOrientation

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
/**
 * Sets the report orientation.
 * @see net.sf.jasperreports.engine.JRReport ORIENTATION_PORTRAIT,
 * @see net.sf.jasperreports.engine.JRReport ORIENTATION_LANDSCAPE
 */
public void setOrientation(OrientationEnum orientationValue)
{
	Object old = this.orientationValue;
	this.orientationValue = orientationValue;
	getEventSupport().firePropertyChange(PROPERTY_ORIENTATION, old, this.orientationValue);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:JasperDesign.java


示例10: setJasperDesign

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
private void setJasperDesign(JasperDesign jd) {
	ignoreEvents = true;
	pheigh.setValue(jd.getPageHeight());
	pwidth.setValue(jd.getPageWidth());
	String format = PageSize.deductPageFormat(jd.getPageWidth(), jd.getPageHeight());
	pformat.select(PageSize.getFormatIndx(format));

	tmargin.setValue(jd.getTopMargin());
	bmargin.setValue(jd.getBottomMargin());
	lmargin.setValue(jd.getLeftMargin());
	rmargin.setValue(jd.getRightMargin());

	cwidth.setValue(jd.getColumnWidth());
	space.setValue(jd.getColumnSpacing());
	cols.setSelection(jd.getColumnCount());

	landscape.setSelection(false);
	portrait.setSelection(false);
	if (jd.getOrientationValue().equals(OrientationEnum.LANDSCAPE))
		landscape.setSelection(true);
	else if (jd.getOrientationValue().equals(OrientationEnum.PORTRAIT))
		portrait.setSelection(true);
	ignoreEvents = false;

	String defunit = MReport.getMeasureUnit(jConfig, jd);
	uw.setUnit(defunit);

	pheigh.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_PAGE_HEIGHT, defunit));
	pwidth.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_PAGE_WIDTH, defunit));

	tmargin.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_TOP_MARGIN, defunit));
	bmargin.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_BOTTOM_MARGIN, defunit));
	lmargin.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_LEFT_MARGIN, defunit));
	rmargin.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_RIGHT_MARGIN, defunit));

	cwidth.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_COLUMN_WIDTH, defunit));
	space.setUnit(PHolderUtil.getUnit(jd, JasperDesign.PROPERTY_COLUMN_SPACING, defunit));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:39,代码来源:PageFormatDialog.java


示例11: performAction

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
protected void performAction(Node[] activatedNodes) {
        JasperDesign jd = activatedNodes[0].getLookup().lookup(JasperDesign.class);
        jd.setName("test name");
        jd.setPageWidth(700);
        jd.setPageHeight(400);
        jd.setOrientation( OrientationEnum.LANDSCAPE);
        jd.setTopMargin(10);
        jd.setBottomMargin(20);
        jd.setLeftMargin(35);
        jd.setRightMargin(5);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:12,代码来源:ReportNode.java


示例12: OrientationProperty

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public OrientationProperty(JasperDesign jd)
{
    super(OrientationEnum.class, jd);
    this.jasperDesign = jd;
    setValue("suppressCustomEditor", Boolean.TRUE);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:8,代码来源:ReportNode.java


示例13: getTagList

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@Override
public List getTagList()
{
    List tags = new java.util.ArrayList();
    tags.add(new Tag(OrientationEnum.PORTRAIT, I18n.getString("ReportNode.Orientation.Portrait")));
    tags.add(new Tag(OrientationEnum.LANDSCAPE, I18n.getString("ReportNode.Orientation.Landscape")));
    return tags;
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:9,代码来源:ReportNode.java


示例14: applyChanges

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
public void applyChanges(JasperDesign jd) {

        int cols =  ((Number)jSpinnerColumns.getValue()).intValue();

        jd.setPageWidth(multiUnitNumberEditorWidth.getValue());
        jd.setPageHeight(multiUnitNumberEditorHeight.getValue());
        jd.setBottomMargin(multiUnitNumberEditorMarginBottom.getValue());
        jd.setLeftMargin(multiUnitNumberEditorMarginLeft.getValue());
        jd.setRightMargin(multiUnitNumberEditorMarginRight.getValue());
        jd.setTopMargin(multiUnitNumberEditorMarginaTop.getValue());
        jd.setColumnCount(cols);
        jd.setColumnSpacing(multiUnitNumberEditorcolumnSpace.getValue());
        jd.setColumnWidth(multiUnitNumberEditorColumnWidth.getValue());
        jd.setOrientation( jRadioLandscape.isSelected() ? OrientationEnum.LANDSCAPE : OrientationEnum.PORTRAIT  );
    }
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:16,代码来源:PageFormatPanel.java


示例15: getOrientation

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
public OrientationEnum getOrientation(){
	switch(getSelectedIndex()){
	case 0:
		return OrientationEnum.PORTRAIT;
		
	case 1:
		return OrientationEnum.LANDSCAPE;
		
	default:
		return null;
	}
}
 
开发者ID:PGWelch,项目名称:com.opendoorlogistics,代码行数:13,代码来源:OrientationSelectorDialog.java


示例16: createEmptyA4

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
static JasperDesign createEmptyA4(String tablename, OrientationEnum orientation, boolean margins, int horizontalReduction) {

		switch (orientation) {
		case LANDSCAPE:
			return createEmpty(tablename, 842 - horizontalReduction, 595, margins);

		case PORTRAIT:
			return createEmpty(tablename, 595 - horizontalReduction, 842, margins);

		default:
			throw new RuntimeException();
		}

	}
 
开发者ID:PGWelch,项目名称:com.opendoorlogistics,代码行数:15,代码来源:ReportBuilderUtils.java


示例17: pageOrientation

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
protected static OrientationEnum pageOrientation(PageOrientation orientation) {
	switch (orientation) {
	case PORTRAIT:
		return OrientationEnum.PORTRAIT;
	case LANDSCAPE:
		return OrientationEnum.LANDSCAPE;
	default:
		throw new JasperDesignException("Page orientation " + orientation.name() + " not supported");
	}
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:11,代码来源:ConstantTransform.java


示例18: test

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@Override
public void test() {
	super.test();
	
	numberOfPagesTest(1);
	
	JasperPrint jasperPrint = getJasperPrint();
	Assert.assertEquals(OrientationEnum.PORTRAIT, jasperPrint.getOrientationValue());
	Assert.assertEquals(595, jasperPrint.getPageWidth());
	Assert.assertEquals(1636, jasperPrint.getPageHeight());
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:12,代码来源:IgnorePaginationTest.java


示例19: getOrientationValue

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@Override
public OrientationEnum getOrientationValue()
{
	return orientationValue;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:JRBaseReport.java


示例20: getOrientation

import net.sf.jasperreports.engine.type.OrientationEnum; //导入依赖的package包/类
@Override
public OrientationEnum getOrientation() {
	return JasperPrint.this.getOrientationValue();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:5,代码来源:JasperPrint.java



注:本文中的net.sf.jasperreports.engine.type.OrientationEnum类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IDMapperException类代码示例发布时间:2022-05-22
下一篇:
Java Spacing类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap