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

Java JRDesignImage类代码示例

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

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



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

示例1: trasnferProperties

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@Override
public void trasnferProperties(JRElement target){
	super.trasnferProperties(target);
	
	JRDesignImage jrSource = (JRDesignImage) getValue();
	if (jrSource != null){
		JRDesignImage jrTarget = (JRDesignImage)target;
		jrTarget.setFill(jrSource.getOwnFillValue());
		jrTarget.setScaleImage(jrSource.getOwnScaleImageValue());
		jrTarget.setHorizontalAlignment(jrSource.getOwnHorizontalAlignmentValue());
		jrTarget.setVerticalAlignment(jrSource.getOwnVerticalAlignmentValue());
		jrTarget.setOnErrorType(jrSource.getOnErrorTypeValue());
		jrTarget.setUsingCache(jrSource.getUsingCache());
		jrTarget.setLazy(jrSource.isLazy());
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:MImage.java


示例2: setImageExpression

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
public static void setImageExpression(MImage imageModel){
	if (imageModel != null){
		ImageSelectionDialog d=new ImageSelectionDialog(UIUtils.getShell());
		d.configureDialog(imageModel.getJasperConfiguration());
		if(d.open()==Window.OK) {
			JRDesignExpression imageExpression = d.getImageExpression();
			if(imageExpression==null){
				// No image selected => remove property
				imageModel.setPropertyValue(JRDesignImage.PROPERTY_EXPRESSION, "");
			}
			else {
				imageModel.setPropertyValue(JRDesignImage.PROPERTY_EXPRESSION, imageExpression.getText());
			}
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:ChangeImageExpression.java


示例3: fixElementsExpressions

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
public static void fixElementsExpressions(JRDesignElementGroup group, String oldName, String newName, byte chunckType, String newClassName) {
    
    List list = group.getChildren();
    for (int i=0; i<list.size(); ++i)
    {
        Object obj = list.get(i);
        if (obj == null) continue;
        if (obj instanceof JRDesignElementGroup)
        {
            fixElementsExpressions((JRDesignElementGroup)obj,oldName,newName,chunckType,newClassName);
        }
        else if (obj instanceof JRDesignTextField)
        {
            fixElementExpressionText((JRDesignTextField)obj,oldName,newName,chunckType,newClassName);
        }
        else if (obj instanceof JRDesignImage)
        {
            fixElementExpressionImage((JRDesignImage)obj,oldName,newName,chunckType,newClassName);
        }
        
        
    }
    
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:25,代码来源:ModelUtils.java


示例4: publishJrxml

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
private void publishJrxml(AMJrxmlContainer mres, IProgressMonitor monitor, JasperDesign jasper, Set<String> fileset, IFile file) throws Exception {
	if (monitor.isCanceled())
		return;
	MReportUnit mrunit = null;
	if (mres instanceof MReportUnit)
		mrunit = (MReportUnit) mres;
	else if (mres.getParent() instanceof MReportUnit)
		mrunit = (MReportUnit) mres.getParent();

	if (mrunit != null) {
		List<JRDesignElement> elements = ModelUtils.getAllElements(jasper);
		for (JRDesignElement ele : elements) {
			if (ele instanceof JRDesignImage)
				publishImage(mrunit, monitor, jasper, fileset, file, ele, version);
			else if (ele instanceof JRDesignSubreport) {
				publishSubreport(mrunit, monitor, jasper, fileset, file, ele, version);
			} else {
				publishElement(mrunit, monitor, jasper, fileset, file, ele, version);
			}
		}
		publishDataAdapters(mrunit, monitor, jasper, fileset, file, version);
		publishBundles(mrunit, monitor, jasper, fileset, file, version);
		publishTemplates(mrunit, monitor, jasper, fileset, file, version);
	}
	// here extend and give possibility to contribute to plugins
	Activator.getExtManager().publishJrxml(mres, monitor, jasper, fileset, file, version);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:28,代码来源:JrxmlPublishContributor.java


示例5: createControls

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
 */
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
	super.createControls(parent, tabbedPropertySheetPage);

	parent.setLayout(new GridLayout(2, false));

	ASPropertyWidget w = createWidget4Property(parent, JRDesignImage.PROPERTY_EXPRESSION);
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 1;
	w.getControl().setLayoutData(gd);

	IPropertyDescriptor pd = getPropertyDesriptor(JRDesignImage.PROPERTY_EVALUATION_TIME);
	IPropertyDescriptor gpd = getPropertyDesriptor(JRDesignImage.PROPERTY_EVALUATION_GROUP);
	getWidgetFactory().createCLabel(parent, pd.getDisplayName());
	widgets.put(pd.getId(), new SPEvaluationTime(parent, this, pd, gpd));

	gd = new GridData();
	gd.horizontalSpan = 2;
	createWidget4Property(parent, JRBaseImage.PROPERTY_LAZY, false).getControl().setLayoutData(gd);
	createWidget4Property(parent, JRBaseImage.PROPERTY_USING_CACHE);

	createWidget4Property(parent, JRBaseStyle.PROPERTY_FILL);
	createWidget4Property(parent, JRBaseStyle.PROPERTY_SCALE_IMAGE);

	createWidget4Property(parent, JRBaseImage.PROPERTY_ON_ERROR_TYPE);

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:31,代码来源:ImageFieldSection.java


示例6: initializeProvidedProperties

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
protected void initializeProvidedProperties() {
	super.initializeProvidedProperties();
	addProvidedProperties(JRDesignImage.PROPERTY_EXPRESSION, Messages.common_expression);
	addProvidedProperties(JRDesignImage.PROPERTY_EVALUATION_TIME, Messages.MImage_evaluation_type);
	addProvidedProperties(JRBaseImage.PROPERTY_LAZY, Messages.MImage_lazy);
	addProvidedProperties(JRBaseImage.PROPERTY_USING_CACHE, Messages.common_using_cache);
	addProvidedProperties(JRBaseStyle.PROPERTY_FILL, Messages.common_fill);
	addProvidedProperties(JRBaseStyle.PROPERTY_SCALE_IMAGE, Messages.MImage_scale_image);
	addProvidedProperties(JRBaseImage.PROPERTY_ON_ERROR_TYPE, Messages.MImage_on_error_type);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:ImageFieldSection.java


示例7: createJRElement

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@Override
public JRDesignElement createJRElement(JasperDesign jasperDesign) {
	JRDesignElement jrDesignElement = new JRDesignImage(jasperDesign);
	
	DefaultManager.INSTANCE.applyDefault(this.getClass(), jrDesignElement);

	jrDesignElement.setWidth(getDefaultWidth());
	jrDesignElement.setHeight(getDefaultHeight());
	return jrDesignElement;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:MImage.java


示例8: getToolTip

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@Override
public String getToolTip() {
	JRDesignImage value = getValue();
	if (value != null) {
		String tip = "";
		if (value.getExpression() != null)
			tip += value.getExpression().getText();
		return tip;
	}
	return getIconDescriptor().getToolTip();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:MImage.java


示例9: generateGraphicalProperties

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
/**
 * Return the graphical properties for an MImage
 */
public HashSet<String> generateGraphicalProperties(){
	HashSet<String> result = super.generateGraphicalProperties();
	result.add(JRBaseStyle.PROPERTY_FILL);
	result.add(JRBaseStyle.PROPERTY_SCALE_IMAGE);
	result.add(JRBaseStyle.PROPERTY_HORIZONTAL_ALIGNMENT);
	result.add(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT);
	result.add(JRDesignImage.PROPERTY_EXPRESSION);
	return result;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:MImage.java


示例10: addPages

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@Override
public void addPages() {

	mimage = new MImage(null, new JRDesignImage(jasperDesign), -1);

	page5 = new WizardImagePage();
	addPage(page5);
	page5.setMImage(mimage);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:ImageWizard.java


示例11: copyInheritedImageAttributes

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
private static void copyInheritedImageAttributes(JRDesignElement target, JRStyle style){
	JRDesignImage jrTarget = (JRDesignImage)target;
	if (jrTarget.getOwnFillValue() == null) jrTarget.setFill(style.getFillValue());
	if (jrTarget.getOwnScaleImageValue() == null) jrTarget.setScaleImage(style.getScaleImageValue());
	if (jrTarget.getOwnHorizontalAlignmentValue() == null) jrTarget.setHorizontalAlignment(style.getHorizontalAlignmentValue());
	if (jrTarget.getOwnVerticalAlignmentValue() == null) jrTarget.setVerticalAlignment(style.getVerticalAlignmentValue());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:CustomStyleResolver.java


示例12: refreshImageInfo

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
/**
 * Start the thread to refresh a specific image. when the thread has cached a new image then the model and the editor 
 * are notified to ask a refresh
 * 
 * @param info The timed container of the image requested (where it will be placed)
 * @param modelElement the model of the element where the image will be placed
 * @param expr the expression to get the image
 * @param jrContext the context to get the image
 * @param key the key of the image in the cache map.
 */
private void refreshImageInfo(final TimedCache info,  final MGraphicElement modelElement, final JRExpression expr, final JasperReportsContext jrContext, final KeyValue<JasperReportsContext, String> key){
	if (!pendingRequests.contains(modelElement)){
		pendingRequests.add(modelElement);
		Job job = new Job("load image") {
			protected IStatus run(IProgressMonitor monitor) {
				try {
					String location = evaluatedExpression((JasperReportsConfiguration) jrContext, modelElement, expr); 
					if (location != null){
						Renderable r = RenderableUtil.getInstance(jrContext).getRenderable(location, OnErrorTypeEnum.ERROR, false);
						info.update(r);
						if (modelElement != null) {
							modelElement.setChangedProperty(true);
						}	
						
						//The editor refresh must be executed inside the graphic threads
						Display.getDefault().asyncExec(new Runnable() {
							@Override
							public void run() {
								PropertyChangeEvent event = new PropertyChangeEvent(modelElement.getValue(), JRDesignImage.PROPERTY_EXPRESSION, null,  expr);
								modelElement.setChangedProperty(true);
								AMultiEditor.refreshElement(jrContext, event);
							}
						});
					}
				} catch (Throwable e) {
					e.printStackTrace();
				}
				pendingRequests.remove(modelElement);
				return Status.OK_STATUS;
			}
		};
		job.setSystem(true);
		job.setPriority(Job.SHORT);
		job.schedule();
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:47,代码来源:LazyImageConverter.java


示例13: transformElement

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
public JRDesignElement transformElement(JRDesignElement element)
{
    if (!(element instanceof JRDesignImage)) return element;
    if (!Misc.getExpressionText( ((JRDesignImage)element).getExpression() ).startsWith("it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(")) return element;

    return transformImageToBarcode((JRDesignImage)element);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:8,代码来源:BarcodeTransformer.java


示例14: enable

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@Override
protected boolean enable(Node[] activatedNodes) {
    if (activatedNodes == null || activatedNodes.length == 0) return false;
    for (Node node : activatedNodes)
    {
        if (! (node instanceof ElementNode)) return false;
        JRDesignElement element = ((ElementNode)node).getElement();
        if (!(element instanceof JRDesignImage)) return false;
        if (!Misc.getExpressionText( ((JRDesignImage)element).getExpression() ).startsWith("it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(")) return false;
    }

    return true;
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:14,代码来源:TransformToBarcodeComponentAction.java


示例15: fixElementExpressionImage

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
public static void fixElementExpressionImage(JRDesignImage imageelement, String oldName, String newName, byte chunckType, String newClassName) {
    
    JRDesignExpression exp = (JRDesignExpression)imageelement.getExpression();
    replaceChunkText( exp, oldName, newName, chunckType, newClassName);
    if (exp != null)
    {
        imageelement.getEventSupport().firePropertyChange( JRDesignTextField.PROPERTY_EXPRESSION, null, exp);
    }
    
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:11,代码来源:ModelUtils.java


示例16: ImageExpressionClassNameProperty

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ImageExpressionClassNameProperty(JRDesignImage element)
{
    super(JRDesignExpression.PROPERTY_VALUE_CLASS_NAME, String.class,
          "Expression Class",
          "Expression Class");
    this.element = element;

    setValue("canEditAsText", true);
    setValue("oneline", true);
    setValue("suppressCustomEditor", false);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:13,代码来源:ImageExpressionClassNameProperty.java


示例17: EvaluationGroupProperty

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public EvaluationGroupProperty(JRDesignImage element, JRDesignDataset dataset)
{
    // TODO: Replace WhenNoDataType with the right constant
    super( JRDesignImage.PROPERTY_EVALUATION_GROUP,JRGroup.class, "Evaluation group", "Evaluate the image expression when the specified group changes", true, true);
    this.element = element;
    this.dataset = dataset;
    setValue("suppressCustomEditor", Boolean.TRUE);
    
    dataset.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, dataset.getEventSupport()));
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:12,代码来源:EvaluationGroupProperty.java


示例18: ImageExpressionFileResolver

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
public ImageExpressionFileResolver(JRDesignImage imageElement,
                                   String reportFolder,
                                   JasperDesign jd)
{
    this.imageElement = imageElement;
    this.imageExpression = (JRDesignExpression) imageElement.getExpression();
    this.reportFolder = reportFolder;
    this.jasperDesign = jd;
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:10,代码来源:ImageExpressionFileResolver.java


示例19: setImageElement

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
/**
 * @param imageElement the imageElement to set
 */
public void setImageElement(JRDesignImage imageElement) {
    if (this.imageElement != imageElement ||
        this.imageExpression != imageElement.getExpression())
    {
        this.imageElement = imageElement;
        this.imageExpression = (JRDesignExpression) imageElement.getExpression();
        this.file = null;
        resolveFile = true;
    }
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:14,代码来源:ImageExpressionFileResolver.java


示例20: ImageEvaluationTimeProperty

import net.sf.jasperreports.engine.design.JRDesignImage; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ImageEvaluationTimeProperty(JRDesignImage element, JRDesignDataset dataset)
{
    super(EvaluationTimeEnum.class, element);
    this.element = element;
    this.dataset = dataset;
    setValue("suppressCustomEditor", Boolean.TRUE);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:9,代码来源:ImageEvaluationTimeProperty.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java JXC类代码示例发布时间:2022-05-22
下一篇:
Java MapBinder类代码示例发布时间: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