Package org.pentaho.reporting.engine.classic.core.metadata

Examples of org.pentaho.reporting.engine.classic.core.metadata.ElementType


                   final ElementMetaData elementMetaData,
                   final String fieldName)
  {
    try
    {
      final ElementType type = elementMetaData.create();
      final Element visualElement = new Element();
      visualElement.setElementType(type);

      final ElementStyleSheet styleSheet = visualElement.getStyle();
      final Point2D point = dragContext.normalize(event.getLocation());
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);

      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());
      if (elementMetaData.getAttributeDescription(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD) != null)
      {
        visualElement.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, fieldName);
      }
View Full Code Here


                   final ElementMetaData elementMetaData,
                   final String fieldName)
  {
    try
    {
      final ElementType type = elementMetaData.create();
      final Element visualElement = new Band();
      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());

      final ElementStyleSheet styleSheet = visualElement.getStyle();
      final Point2D point = dragContext.normalize(event.getLocation());
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);
View Full Code Here

      visualElement.setElementType(targetElementType);

      // -------------------- manipulate the value and field attributes so that we preserve as much as possible ---------------------  
      // get the source and destination types
      final ElementType srcType = (ElementType) oldAttributes.getAttribute(CORE_NAMESPACE, ELEMENT_TYPE_ATTRIBUE);
      // Check if the source-type is a message field. In that case, we have to map the pattern into a field and
      // format definition
      if (srcType instanceof MessageType)
      {
        final String message = (String) oldAttributes.getAttribute(CORE_NAMESPACE, VALUE_ATTRIBUTE);
View Full Code Here

      return;
    }

    try
    {
      final ElementType type = metaData.create();
      final Element visualElement;
      if (metaData.isContainerElement())
      {
        if ("band".equals(metaData.getName())) // NON-NLS
        {
          visualElement = new Band();
        }
        else if ("sub-report".equals(metaData.getName())) // NON-NLS
        {
          final Element rootBand = findRootBand(band);
          if (rootBand == null ||
              rootBand instanceof PageHeader ||
              rootBand instanceof PageFooter ||
              rootBand instanceof DetailsHeader ||
              rootBand instanceof DetailsFooter ||
              rootBand instanceof Watermark)
          {
            return;
          }

          visualElement = new SubReport();
        }
        else
        {
          return;
        }
      }
      else
      {
        visualElement = new Element();
        visualElement.setElementType(type);
      }

      final ElementStyleSheet styleSheet = visualElement.getStyle();
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);

      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());


      final ReportRenderContext context = getActiveContext();
      final UndoManager undo = context.getUndo();
      undo.addChange(ActionMessages.getString("InsertElementAction.UndoName"),
View Full Code Here

      return;
    }

    try
    {
      final ElementType type = elementMetaData.create();
      final SubReport visualElement = new SubReport();
      visualElement.getRootGroup().getHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE,Boolean.TRUE);
      visualElement.getRootGroup().getFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE,Boolean.TRUE);
      visualElement.getDetailsFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE,Boolean.TRUE);
      visualElement.getDetailsHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
      visualElement.getNoDataBand().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
      visualElement.getWatermark().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE,Boolean.TRUE);
      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());

      final ElementStyleSheet styleSheet = visualElement.getStyle();
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);
View Full Code Here

    final DataAttributeContext dataAttributeContext = new DefaultDataAttributeContext();
    if (attributes == null)
    {
      return null;
    }
    final ElementType type = AutoGeneratorUtility.createFieldType(attributes, dataAttributeContext);
    if (type == null)
    {
      return null;
    }
    return type.getMetaData();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.metadata.ElementType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.