Package org.pentaho.reporting.designer.core

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


  }

  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.setActiveContext(rrc);
        return null;
      }
    }

    final IndexElement report = (IndexElement) value;
    try
    {
      context.addSubReport(rootBandRenderComponent.getRenderContext(), 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 context = getReportDesignerContext();
    final int contextCount = context.getReportRenderContextCount();
    final ReportRenderContext[] contextArray = new ReportRenderContext[contextCount];
    for (int i = 0; i < contextCount; i++)
    {
      contextArray[i] = context.getReportRenderContext(i);
    }

    final ReportRenderContext[] filteredArray =
        CloseReportAction.filterSubreports(getReportDesignerContext(), contextArray);

View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext context = getReportDesignerContext();
    final int index = context.findActiveContextIndex();
    if (index != -1 && index != context.getReportRenderContextCount() - 1)
    {
      context.setActiveContext(context.getReportRenderContext(index + 1));
    }
  }
View Full Code Here

    putValue(Action.SMALL_ICON, IconLoader.getInstance().getGroupIcon());
  }

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

    final JPopupMenu menu = reportDesignerContext1.getPopupMenu("popup-Groups");// $NON-NLS$
    final Object source = e.getSource();
    if (source instanceof Component)
    {
      final Component c = (Component) source;
      menu.show(c, 0, c.getHeight());
    }
    else
    {
      final Component parent = reportDesignerContext1.getParent();
      menu.show(parent, 0, 0);
    }
  }
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext reportDesignerContext1 = getReportDesignerContext();
    if (tabIndex == -1)
    {
      final ReportRenderContext 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

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportDesignerContext designerContext = getReportDesignerContext();
    if (designerContext == null)
    {
      return;
    }
    if (tabIndex >= designerContext.getReportRenderContextCount())
    {
      return;
    }
    designerContext.setActiveContext(designerContext.getReportRenderContext(tabIndex));
  }
View Full Code Here


    private void createPopupMenu(final MouseEvent e)
    {
      final JTree tree = getTree();
      final ReportDesignerContext context = getReportDesignerContext();
      if (context.getActiveContext() == null)
      {
        return;
      }

      final TreePath path = tree.getPathForLocation(e.getX(), e.getY());
View Full Code Here

    return editor;
  }

  public void setReportDesignerContext(final ReportDesignerContext newContext)
  {
    final ReportDesignerContext oldContext = arrayCellEditor.getReportDesignerContext();
    if (oldContext != null)
    {
      oldContext.removePropertyChangeListener(this.changeHandler);
      final ReportRenderContext oldActiveContext = getReportRenderContext();
      updateActiveContext(oldActiveContext, null);
    }

    arrayCellEditor.setReportDesignerContext(newContext);
View Full Code Here

    return arrayCellEditor.getReportDesignerContext();
  }

  public ReportRenderContext getReportRenderContext()
  {
    final ReportDesignerContext reportDesignerContext = getReportDesignerContext();
    if (reportDesignerContext == null)
    {
      return null;
    }
    return reportDesignerContext.getActiveContext();
  }
View Full Code Here

    {
    }

    public void nodeChanged(final ReportModelEvent event)
    {
      final ReportDesignerContext designerContext = getReportDesignerContext();
      final ReportRenderContext activeContext = designerContext.getActiveContext();
      if (activeContext == null)
      {
        return;
      }
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.