Package org.pentaho.reporting.designer.core.editor

Examples of org.pentaho.reporting.designer.core.editor.ReportRenderContext


  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportRenderContext activeContext = getActiveContext();
    if (activeContext == null)
    {
      return;
    }

View Full Code Here


  }

  public void actionPerformed(final ActionEvent e)
  {

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

    final MasterReport report = activeContext.getMasterReportElement();
    final PageDefinition originalPageDef = report.getPageDefinition();

    if ("true".equals(ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty // NON-NLS
        ("org.pentaho.reporting.engine.classic.core.modules.gui.print.UseAlternatePageSetupDialog"))) // NON-NLS
    {
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final ReportRenderContext activeContext = getActiveContext();
    if (activeContext == null)
    {
      return;
    }

    final Object[] selectedElements = activeContext.getSelectionModel().getSelectedElements();
    final AbstractReportDefinition report = activeContext.getReportDefinition();

    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
    if (collectChange(selectedElements, report, undos) == false)
    {
      // rollback ..
      for (int i = undos.size() - 1; i >= 0; i--)
      {
        final UndoEntry undoEntry = undos.get(i);
        undoEntry.undo(activeContext);
      }
    }
    else
    {
      final UndoEntry[] undoEntries = undos.toArray(new UndoEntry[undos.size()]);
      activeContext.getUndo().addChange(ActionMessages.getString("AbstractLayerAction.UndoName"),
          new CompoundUndoEntry(undoEntries));
    }
    // re-select the elements (moving them causes them to be unselected)
    activeContext.getSelectionModel().setSelectedElements(selectedElements);
  }
View Full Code Here

   */
  public void actionPerformed(final ActionEvent e)
  {

    final ReportDesignerContext reportDesignerContext = getReportDesignerContext();
    final ReportRenderContext activeContext = getActiveContext();
    if (activeContext == null)
    {
      return;
    }

    if (activeContext.isChanged())
    {
      // ask the user and maybe save the report..
      final int option = JOptionPane.showConfirmDialog(reportDesignerContext.getParent(),
          Messages.getInstance().getString("PublishToServerAction.ReportModifiedWarning.Message"),
          Messages.getInstance().getString("PublishToServerAction.ReportModifiedWarning.Title"),
View Full Code Here

     * @param evt A PropertyChangeEvent object describing the event source and the property that has changed.
     */

    public void propertyChange(final PropertyChangeEvent evt)
    {
      final ReportRenderContext oldContext = (ReportRenderContext) evt.getOldValue();
      final ReportRenderContext activeContext = (ReportRenderContext) evt.getNewValue();
      updateActiveContext(oldContext, activeContext);
    }
View Full Code Here

    if (reportDesignerContext == null)
    {
      return EMPTY_FIELDS;
    }

    final ReportRenderContext renderContext = reportDesignerContext.getActiveContext();
    if (renderContext == null)
    {
      return EMPTY_FIELDS;
    }

    final ReportDataSchemaModel model = renderContext.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();
    final ArrayList<FieldDefinition> fields = new ArrayList<FieldDefinition>(columnNames.length);
    final DataSchema dataSchema = model.getDataSchema();
    final DefaultDataAttributeContext attributeContext = new DefaultDataAttributeContext();
    final String parameter;
View Full Code Here

      this.loginData = loginData;
      this.skipFirstShowDialog = true;
    }
    else
    {
      final ReportRenderContext reportRenderContext = designerContext.getActiveContext();
      if (reportRenderContext != null)
      {
        final Object o = reportRenderContext.getProperty("pentaho-login-url");
        if (o != null)
        {
          // prepopulate the dialog with the correct login data, but do not skip login completely.
          this.loginData = RepositoryLoginDialog.getStoredLoginData(String.valueOf(o), designerContext);
        }
View Full Code Here

    {
      return null;
    }
    try
    {
      final ReportRenderContext activeContext = reportDesignerContext.getActiveContext();
      editModel.setActiveContext(activeContext);
      chartTable.setReportDesignerContext(reportDesignerContext);
      primaryDataSourceTable.setReportDesignerContext(reportDesignerContext);
      secondaryDataSourceTable.setReportDesignerContext(reportDesignerContext);
View Full Code Here

    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 IndexElement)
    {
      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;
        }
      }
View Full Code Here

    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 TocElement)
    {
      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;
        }
      }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.editor.ReportRenderContext

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.