当前位置: 首页>>代码示例>>Java>>正文


Java DataRow.get方法代码示例

本文整理汇总了Java中org.pentaho.reporting.engine.classic.core.DataRow.get方法的典型用法代码示例。如果您正苦于以下问题:Java DataRow.get方法的具体用法?Java DataRow.get怎么用?Java DataRow.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.reporting.engine.classic.core.DataRow的用法示例。


在下文中一共展示了DataRow.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: itemsAdvanced

import org.pentaho.reporting.engine.classic.core.DataRow; //导入方法依赖的package包/类
/**
 * Receives notification that a row of data is being processed. Reads the data from the field defined for this function and hides the field if the value is equal to the last value and the this is not the first row of the item group.
 * 
 * @param event
 *          Information about the event.
 */
public void itemsAdvanced(final ReportEvent event) {
  DataRow dataRow = event.getDataRow();
  final Object fieldValue = dataRow.get(getField());
  // is visible when last and current object are not equal
  // first element in group is always visible
  if (firstInGroup == true) {
    visible = true;
    firstInGroup = false;
  } else {
    visible = (ObjectUtilities.equal(lastObject, fieldValue) == false);
  }
  lastObject = fieldValue;
  final Element e = event.getReport().getItemBand().getElement(getElement());
  if (e != null) {
    e.setVisible(visible);
  }
}
 
开发者ID:pentaho,项目名称:pentaho-reportwizard-core,代码行数:24,代码来源:ItemHideFunction.java

示例2: getValue

import org.pentaho.reporting.engine.classic.core.DataRow; //导入方法依赖的package包/类
public Object getValue(final ExpressionRuntime runtime, final ReportElement element)
{
  // Elements can get their value from attributes directly, or can query a field and/or value via
  // the helper methods on the ElementTypeUtils class.
  final String message = ElementTypeUtils.getStringAttribute
      (element, SampleElementModule.NAMESPACE, TEMPLATE_STRING, "Hello, {0}");

  // The data-row grants access to all currently computed values. Use this to access fields from
  // the data-source or calculated measures from the named expressions and functions.
  final DataRow dataRow = runtime.getDataRow();
  final Object userName = dataRow.get("env::username");
  return MessageFormat.format(message, userName);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:14,代码来源:SampleTextElementType.java

示例3: getValue

import org.pentaho.reporting.engine.classic.core.DataRow; //导入方法依赖的package包/类
public Object getValue(final ExpressionRuntime runtime, final ReportElement element)
{
  // Elements can get their value from attributes directly, or can query a field and/or value via
  // the helper methods on the ElementTypeUtils class.
  final String message = ElementTypeUtils.getStringAttribute
      (element, SampleElementModule.NAMESPACE, TEMPLATE_STRING, "Hello, {0}");

  // The data-row grants access to all currently computed values. Use this to access fields from
  // the data-source or calculated measures from the named expressions and functions.
  final DataRow dataRow = runtime.getDataRow();
  final Object userName = dataRow.get("env::username");
  final String textToPrint = MessageFormat.format(message, userName);

  final Object backgroundImageRaw = element.getAttribute(SampleElementModule.NAMESPACE, BACKGROUND_IMAGE);
  final Object image = filter(runtime, element, backgroundImageRaw);
  if (image instanceof DefaultImageReference)
  {
    return new SampleGraphicsDrawable(textToPrint, (DefaultImageReference) image);
  }
  else if (image instanceof DrawableWrapper)
  {
    return new SampleGraphicsDrawable(textToPrint, (DrawableWrapper) image);
  }
  else
  {
    return new SampleGraphicsDrawable(textToPrint);
  }
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:29,代码来源:SampleGraphicsElementType.java


注:本文中的org.pentaho.reporting.engine.classic.core.DataRow.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。