Package org.pentaho.reporting.designer.core

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


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

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


    return ReportDesignerView.PREVIEW_VISIBLE_PROPERTY;
  }

  protected boolean recomputeEnabled()
  {
    final ReportDesignerContext reportDesignerContext = getReportDesignerContext();
    if (reportDesignerContext == null)
    {
      setSelected(false);
      return false;
    }
    setSelected(reportDesignerContext.getView().isPreviewVisible());
    return true;
  }
View Full Code Here

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

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

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

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

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

    return reportDesignerContext;
  }

  public void setReportDesignerContext(final ReportDesignerContext reportDesignerContext)
  {
    final ReportDesignerContext oldContext = this.reportDesignerContext;
    this.reportDesignerContext = reportDesignerContext;
    updateDesignerContext(oldContext, reportDesignerContext);
  }
View Full Code Here

    putValue(Action.MNEMONIC_KEY, ActionMessages.getOptionalMnemonic("ShowAddDataSourcePopupAction.Mnemonic"));
  }

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

    final JPopupMenu menu = ContextMenuUtility.createDataSourcePopup(reportDesignerContext1);
    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

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

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

    return ReportDesignerView.STRUCTURE_VISIBLE_PROPERTY;
  }

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

    final ReportRenderContext activeContext = getActiveContext();
    if (activeContext == null)
    {
      return;
    }
    final ReportDesignerContext context = getReportDesignerContext();
    final Component parent = context.getParent();
    final Window window = SwingUtil.getWindowAncestor(parent);
    final DocumentMetaDataDialog dialog;
    if (window instanceof JDialog)
    {
      dialog = new DocumentMetaDataDialog((JDialog) window);
View Full Code Here

    if (activeContext == null)
    {
      return;
    }

    final ReportDesignerContext context = getReportDesignerContext();
    final Component parent = context.getParent();
    final Window window = SwingUtil.getWindowAncestor(parent);
    final BundledResourceEditor dialog;
    if (window instanceof JDialog)
    {
      dialog = new BundledResourceEditor((JDialog) window, getReportDesignerContext());
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.