Package org.pentaho.reporting.designer.core.util.undo

Examples of org.pentaho.reporting.designer.core.util.undo.DataSourceEditUndoEntry


      for (int i = 0; i < dataFactoryWrappers.length; i++)
      {
        final DataFactoryWrapper dataFactoryWrapper = dataFactoryWrappers[i];
        if (dataFactoryWrapper.getOriginalDataFactory() != dataFactoryWrapper.getEditedDataFactory())
        {
          undos.add(new DataSourceEditUndoEntry(i, dataFactoryWrapper.getOriginalDataFactory(), dataFactoryWrapper.getEditedDataFactory()));
        }
      }

      final CompoundUndoEntry undoEntry = new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()]));
      undoEntry.redo(activeContext);
View Full Code Here


            collection.remove(j);

            final DataFactory editedClone = editedDataFactory.derive();
            collection.add(j, editedDataFactory);
            activeContext.getUndo().addChange(ActionMessages.getString("EditQueryAction.Text"),
                new DataSourceEditUndoEntry(j, storedFactory, editedClone));

            report.notifyNodeChildRemoved(originalDataFactory);
            report.notifyNodeChildAdded(editedDataFactory);
          }
          catch (ReportDataFactoryException e)
View Full Code Here

          collection.remove(j);
          collection.add(j + 1, dataFactory);

          report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, dataFactory);
          return new CompoundUndoEntry
              (new DataSourceEditUndoEntry(j, dataFactory, null), new DataSourceEditUndoEntry(j + 1, null, dataFactory));
        }
      }
    }
    return null;
  }
View Full Code Here

            collection.remove(j);

            final DataFactory editedClone = editedDataFactory.derive();
            collection.add(j, editedDataFactory);
            activeContext.getUndo().addChange
                (ActionMessages.getString("EditDataSourceAction.UndoName"), new DataSourceEditUndoEntry(j, storedFactory, editedClone));

            report.notifyNodeChildRemoved(originalDataFactory);
            report.notifyNodeChildAdded(editedDataFactory);
          }
          catch (ReportDataFactoryException e)
View Full Code Here

      {
        final CompoundDataFactory reportDf = CompoundDataFactory.normalize(originalDataFactory);
        final int position = reportDf.size();
        reportDf.add(dataFactory);
        activeContext.getUndo().addChange(ActionMessages.getString("AddDataFactoryAction.UndoText"),
            new DataSourceEditUndoEntry(position, null, dataFactory.derive()));
        element.setDataFactory(reportDf);
      }
    }
    finally
    {
View Full Code Here

      {
        collection.remove(j);
        collection.add(dataFactory);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, dataFactory);
        return new CompoundUndoEntry(new DataSourceEditUndoEntry(j, dataFactory, null),
                new DataSourceEditUndoEntry(collection.size()-1, null, dataFactory));
      }
    }
    return null;
  }
View Full Code Here

        collection.remove(j);
        collection.add(0, dataFactory);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, dataFactory);
        return new CompoundUndoEntry
            (new DataSourceEditUndoEntry(j, dataFactory, null), new DataSourceEditUndoEntry(0, null, dataFactory));
      }
    }
    return null;
  }
View Full Code Here

        else if (insertResult instanceof DataFactory)
        {
          final DataFactory insertDataFactory = (DataFactory) insertResult;
          final CompoundDataFactory compoundDataFactory = (CompoundDataFactory) activeContext.getReportDefinition().getDataFactory();
          final int index = compoundDataFactory.size() - 1;
          undos.add(new DataSourceEditUndoEntry(index, null, insertDataFactory));
        }

      }
      getSelectionModel().setSelectedElements(selectedElements);
    }
View Full Code Here

        collection.remove(j);
        collection.add(j - 1, dataFactory);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, dataFactory);
        return new CompoundUndoEntry
                (new DataSourceEditUndoEntry(j, dataFactory, null), new DataSourceEditUndoEntry(j - 1, null, dataFactory));
      }
    }
    return null;
  }
View Full Code Here

        final DataFactory df = dataFactory.getReference(i);
        if (df == data)
        {
          dataFactory.remove(i);
          report.notifyNodeStructureChanged();
          return new DataSourceEditUndoEntry(i, df, null);
        }
      }
      return null;
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.util.undo.DataSourceEditUndoEntry

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.