Package org.pentaho.reporting.designer.core.actions.report

Examples of org.pentaho.reporting.designer.core.actions.report.EditQueryAction


            return;
          }

          if (selection instanceof DataFactory)
          {
            final EditQueryAction action = new EditQueryAction();
            action.setReportDesignerContext(getReportDesignerContext());
            action.performEdit((DataFactory) selection, null);
            return;
          }

          if (selection instanceof ReportQueryNode)
          {
            final ReportQueryNode queryNode = (ReportQueryNode) selection;
            if (queryNode.isAllowEdit() == false)
            {
              return;
            }
            final EditQueryAction action = new EditQueryAction();
            action.setReportDesignerContext(getReportDesignerContext());
            action.performEdit(queryNode.getDataFactory(), queryNode.getQueryName());
            e.consume();
          }
        }
        catch (ReportDataFactoryException e1)
        {
View Full Code Here


      }

      // Edit data-source from structure panel
      reportDesignerContext.getActiveContext().getSelectionModel().setSelectedElements(new Object[]{dataFactory});

      final EditQueryAction editQueryAction = new EditQueryAction();
      editQueryAction.setReportDesignerContext(reportDesignerContext);
      editQueryAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""));

      final int idx = availableDataSourcesModel.indexOf(dataFactory);
      if (idx == -1)
      {
        throw new IllegalStateException("DataSource Model is out of sync with the GUI");
      }
      if (editQueryAction.getEditedDataFactory() != null)
      {
        availableDataSourcesModel.edit(idx, editQueryAction.getEditedDataFactory());
      }
    }
View Full Code Here

          {
            EditParametersAction.performEditSubReportParameters(getReportDesignerContext());
          }
          if (selection instanceof DataFactory)
          {
            final EditQueryAction action = new EditQueryAction();
            action.setReportDesignerContext(getReportDesignerContext());
            action.performEdit((DataFactory) selection, null);
            return;
          }
          if (selection instanceof ReportQueryNode == false)
          {
            return;
          }
          final ReportQueryNode theQuery = (ReportQueryNode) selection;
          if (theQuery.isAllowEdit() == false)
          {
            return;
          }
          final EditQueryAction action = new EditQueryAction();
          action.setReportDesignerContext(getReportDesignerContext());
          action.performEdit(theQuery.getDataFactory(), theQuery.getQueryName());
        }
        catch (ReportDataFactoryException e1)
        {
          UncaughtExceptionsModel.getInstance().addException(e1);
        }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.actions.report.EditQueryAction

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.