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

Examples of org.pentaho.reporting.engine.classic.core.Band


  }

  public void undo(final ReportDocumentContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.removeGuideLine(guideLine);
  }
View Full Code Here


  }

  public void redo(final ReportDocumentContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.addGuidLine(guideLine);
  }
View Full Code Here

  }

  public void undo(final ReportDocumentContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.addGuidLine(guideLine);
  }
View Full Code Here

  }

  public void redo(final ReportDocumentContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.removeGuideLine(guideLine);
  }
View Full Code Here

      {
        event.dropComplete(false);
        return;
      }

      final Band band = getInsertionBand(event, dragContext, point);
      if (band == null)
      {
        event.dropComplete(false);
        return;
      }
View Full Code Here

  protected Band getInsertionBand(final DropTargetDropEvent event,
                                  final ReportElementEditorContext dragContext,
                                  final Point2D point)
  {
    final Element elementForLocation = dragContext.getElementForLocation(point, false);
    Band band;
    if (elementForLocation instanceof Band)
    {
      band = (Band) elementForLocation;
    }
    else if (elementForLocation != null)
View Full Code Here

      return true;
    }

    if (section instanceof Band)
    {
      final Band b = (Band) section;
      final Object o = b.getStyle().getStyleProperty(BandStyleKeys.LAYOUT);
      if (o == null || "canvas".equals(o)) // NON-NLS
      {
        return false;
      }
      return true;
View Full Code Here

    }
    if (target instanceof Band)
    {
      if (data instanceof AbstractReportDefinition)
      {
        Band b = (Band) target;
        while (b != null)
        {
          if (b instanceof PageHeader || b instanceof PageFooter ||
              b instanceof DetailsHeader || b instanceof DetailsFooter ||
              b instanceof Watermark)
          {
            return false;
          }
          b = b.getParent();
        }
      }
      else if (data instanceof Group || data instanceof GroupBody)
      {
        // exclude groups and group-body, they cannot be a child of bands.
View Full Code Here

      return null;
    }

    final RootBandRenderComponent rootBandRenderComponent = (RootBandRenderComponent) owner;
    final Band rootBand = rootBandRenderComponent.getRootBand();

    final DocumentContextSelectionModel selectionModel = renderContext.getSelectionModel();
    for (final Element element : selectionModel.getSelectedElementsOfType(Element.class))
    {
      if (element instanceof Band && ModelUtility.isDescendant(rootBand, element))
View Full Code Here

      return false;
    }

    if (rawLeadSelection instanceof Band)
    {
      final Band target = (Band) rawLeadSelection;
      if (target == insert)
      {
        return false;
      }
      if (ModelUtility.isDescendant(target, insert))
      {
        return false;
      }
      if (insert.getParent() != null)
      {
        // this should not happen. We should only see clones here ..
        throw new IllegalStateException();
      }

      try
      {
        final Element element = normalizeForInsert(insert);
        if (element == null)
        {
          return false;
        }

        if (element instanceof SubReport)
        {
          final Object subreportHint = insert.getAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, SUBREPORT_BANDED_HINT);
          if (Boolean.TRUE.equals(subreportHint))
          {
            if (target instanceof AbstractRootLevelBand)
            {
              final AbstractRootLevelBand rlb = (AbstractRootLevelBand) target;
              rlb.addSubReport((SubReport) element);
              return element;
            }
            else
            {
              return false;
            }
          }
        }

        target.addElement(element);
        return element;
      }
      catch (CloneNotSupportedException e1)
      {
        UncaughtExceptionsModel.getInstance().addException(e1);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.Band

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.