Package org.pentaho.reporting.designer.core

Examples of org.pentaho.reporting.designer.core.ReportDesignerContext


    putValue(Action.SELECTED_KEY, selected);
  }

  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext activeContext = getReportDesignerContext();
    if (activeContext == null)
    {
      return;
    }

    activeContext.setSelectionWaiting(activeContext.isSelectionWaiting() == false);
  }
View Full Code Here


  {
  }

  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext designerContext = getReportDesignerContext();
    if (designerContext == null)
    {
      return;
    }

    final ReportDocumentContext activeReportContext = getActiveContext();
    if (activeReportContext == null)
    {
      return;
    }

    final DocumentContextSelectionModel selectionModel1 = getSelectionModel();
    if (selectionModel1 == null)
    {
      return;
    }
    final Object leadSelection = selectionModel1.getLeadSelection();
    if (leadSelection instanceof Element == false)
    {
      return;
    }

    final Element element = (Element) leadSelection;
    if (element instanceof SubReport)
    {
      final int contextCount = designerContext.getReportRenderContextCount();
      for (int i = 0; i < contextCount; i++)
      {
        final ReportRenderContext rrc = designerContext.getReportRenderContext(i);
        if (rrc.getReportDefinition() == element)
        {
          designerContext.setActiveDocument(rrc);
          return;
        }
      }

      final SubReport report = (SubReport) element;
      try
      {
        designerContext.addSubReport(activeReportContext, report);
      }
      catch (ReportDataFactoryException e1)
      {
        UncaughtExceptionsModel.getInstance().addException(e1);
      }
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext reportDesignerContext1 = getReportDesignerContext();
    if (tabIndex == -1)
    {
      final ReportDocumentContext activeContext = getActiveContext();
      if (activeContext == null)
      {
        return;
      }

      performCloseReport(reportDesignerContext1, activeContext);
    }
    else
    {
      if (tabIndex >= 0 && tabIndex < reportDesignerContext1.getReportRenderContextCount())
      {
        final ReportRenderContext context = reportDesignerContext1.getReportRenderContext(tabIndex);
        performCloseReport(reportDesignerContext1, context);
      }
    }
  }
View Full Code Here

      if (getSelectionModel().getSelectionCount() > 0)
      {
        selectedElement = getSelectionModel().getSelectedElement(0);
      }

      final ReportDesignerContext context = getReportDesignerContext();
      final Component parent = context.getView().getParent();
      final Window window = LibSwingUtil.getWindowAncestor(parent);
      final CreateCrosstabDialog dialog;
      if (window instanceof JDialog)
      {
        dialog = new CreateCrosstabDialog((JDialog) window);
View Full Code Here

    putValue(Action.ACCELERATOR_KEY, ActionMessages.getOptionalKeyStroke("ShowWelcomePaneAction.Accelerator"));
  }

  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext context = getReportDesignerContext();
    context.getView().setWelcomeVisible(true);
  }
View Full Code Here

    context.getView().setWelcomeVisible(true);
  }

  protected boolean recomputeEnabled()
  {
    final ReportDesignerContext context = getReportDesignerContext();
    if (context == null)
    {
      return false;
    }
    return true;
View Full Code Here

    {
    }

    public void dataModelChanged(final ReportDocumentContext context)
    {
      final ReportDesignerContext designerContext = getReportDesignerContext();
      final ReportDocumentContext activeContext = designerContext.getActiveContext();
      if (activeContext == null)
      {
        return;
      }
View Full Code Here

      dataModel.setDataSchema(computeColumns(activeContext));
    }

    public void settingsChanged()
    {
      final ReportDesignerContext designerContext = getReportDesignerContext();
      final ReportDocumentContext activeContext = designerContext.getActiveContext();
      if (activeContext == null)
      {
        return;
      }
      dataModel.setDataSchema(computeColumns(activeContext));
View Full Code Here

  }

  public Component getElementCellEditorComponent(final ReportElementEditorContext rootBandRenderComponent,
                                                 final ReportElement value)
  {
    final ReportDesignerContext context = rootBandRenderComponent.getDesignerContext();
    final int contextCount = context.getReportRenderContextCount();
    for (int i = 0; i < contextCount; i++)
    {
      final ReportRenderContext rrc = context.getReportRenderContext(i);
      if (rrc.getReportDefinition() == value)
      {
        context.setActiveDocument(rrc);
        return null;
      }
    }

    final SubReport report = (SubReport)value;

    // If this is a crosstab sub-report, increase zoom factor.
    if (value instanceof CrosstabElement)
    {
      report.getReportDefinition().setAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, ReportDesignerBoot.ZOOM, 1.5f);
    }

    try
    {
      context.addSubReport(rootBandRenderComponent.getRenderContext(), report);
    }
    catch (ReportDataFactoryException e1)
    {
      UncaughtExceptionsModel.getInstance().addException(e1);
    }
View Full Code Here

    putValue(Action.SELECTED_KEY, WorkspaceSettings.getInstance().isShowGrid());
  }

  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext reportDesignerContext1 = getReportDesignerContext();
    if (reportDesignerContext1 == null)
    {
      return;
    }
    reportDesignerContext1.getView().setStructureVisible(
        reportDesignerContext1.getView().isStructureVisible() == false);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.ReportDesignerContext

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.