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

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


        final PasteFormatUndoEntry undoEntry =
            new PasteFormatUndoEntry(element.getObjectID(), oldAttributes, newAttributes, oldStyleData, newStyleData);
        undos.add(undoEntry);
      }
      getActiveContext().getUndo().addChange(ActionMessages.getString("PasteFormatAction.UndoName"),
          new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
    }
    catch (final UnsupportedFlavorException e1)
    {
      UncaughtExceptionsModel.getInstance().addException(e1);
    }
View Full Code Here


        final Object attribute = styleSheet.getStyleProperty(metaData.getStyleKey());
        undos.add(new StyleEditUndoEntry
            (element.getObjectID(), metaData.getStyleKey(), attribute, value));
        styleSheet.setStyleProperty(metaData.getStyleKey(), value);
      }
      undo.addChange(Messages.getString("StyleChange"), new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));
    }
    return changed;
  }
View Full Code Here

              (element.getObjectID(), metaData.getStyleKey(), attribute, expression));
          element.setStyleExpression(metaData.getStyleKey(), expression);
          element.notifyNodePropertiesChanged();
        }
      }
      undo.addChange(Messages.getString("StyleChange"), new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    }
    return changed;
  }
View Full Code Here

        final Object attribute = visualElements[i].getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);
        undos.add(new AttributeEditUndoEntry(visualElements[i].getObjectID(), AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, oldValues.get(i),
            attribute));
      }
      getRenderContext().getUndo().addChange(Messages.getString("AbstractRenderComponent.InlineEditUndoName"),
          new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));
    }

    removeEditor();
  }
View Full Code Here

      }
    }
    if (undos.isEmpty() == false)
    {
      activeContext.getUndo().addChange(ActionMessages.getString("DeleteAction.Text"),
          new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));
    }
  }
View Full Code Here

    }
    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

        {
          undos.add(new DataSourceEditUndoEntry(i, dataFactoryWrapper.getOriginalDataFactory(), dataFactoryWrapper.getEditedDataFactory()));
        }
      }

      final CompoundUndoEntry undoEntry = new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()]));
      undoEntry.redo(activeContext);
      activeContext.getUndo().addChange(ActionMessages.getString("EditParametersAction.MasterReport.Text"), undoEntry);
    }
  }
View Full Code Here

        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(0, sr);

          return new CompoundUndoEntry
                  (new BandedSubreportEditUndoEntry(re.getObjectID(), i, sr, null),
                          new BandedSubreportEditUndoEntry(re.getObjectID(), 0, null, sr));
        }
      }
    }

    final Band parentBand = (Band) reportElement;
    final int count = parentBand.getElementCount();
    for (int i = 1; i < count; i++)
    {
      final Element visualReportElement = parentBand.getElement(i);
      if (element == visualReportElement)
      {
        parentBand.removeElement(visualReportElement);
        parentBand.addElement(0, visualReportElement);

        return new CompoundUndoEntry
                (new ElementEditUndoEntry(parentBand.getObjectID(), i, visualReportElement, null),
                        new ElementEditUndoEntry(parentBand.getObjectID(), 0, null,
                                visualReportElement));
      }
    }
View Full Code Here

      {
        expressionCollection.removeExpression(j);
        expressionCollection.add(expression);

        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, expression);
        return new CompoundUndoEntry(new ExpressionRemoveUndoEntry(j, expression),
                new ExpressionAddedUndoEntry(expressionCollection.getExpressions().length-1, expression));
      }
    }
    return null;
  }
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

TOP

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

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.