Examples of UndoEntry


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

    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
    for (int i = 0; i < selectedElements.length; i++)
    {
      final Object element = selectedElements[i];
      final UndoEntry undoEntry = InsertationUtil.delete(activeContext, element);
      if (undoEntry != null)
      {
        undos.add(undoEntry);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.util.undo.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()]);
View Full Code Here

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

  {
    try
    {
      if (element instanceof Expression)
      {
        final UndoEntry undoEntry = moveExpressions(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof ParameterDefinitionEntry)
      {
        final UndoEntry undoEntry = moveParameters(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof DataFactory)
      {
        final UndoEntry undoEntry = moveDataFactories(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof RelationalGroup)
      {
        final UndoEntry undoEntry = moveGroup((RelationalGroup) element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof Element)
      {
        final UndoEntry undoEntry = moveVisualElement(report, (Element) element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
View Full Code Here

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

        if (preparedElement == null)
        {
          continue;
        }

        final UndoEntry undoEntry = InsertationUtil.delete(activeContext, selectedElement);
        if (undoEntry != null)
        {
          preparedElements.add(preparedElement);
          undoEntries.add(undoEntry);
        }
View Full Code Here

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

        }
      }

      final Object oldValue = element.getAttribute(ReportDesignerParserModule.NAMESPACE,
          ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE);
      final UndoEntry entry = new AttributeEditUndoEntry(element.getObjectID(), ReportDesignerParserModule.NAMESPACE,
          ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, oldValue, value);
      undos.add(entry);
      element.setAttribute(ReportDesignerParserModule.NAMESPACE,
          ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, value);
    }
View Full Code Here

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

      if (newGroup == null)
      {
        return;
      }

      UndoEntry undo = createUndoEntry(selectedCrosstab, newGroup);
      if (undo != null)
      {
        undo.redo(activeContext);
        activeContext.getUndo().addChange("Edit Crosstab", undo);
      }
    }
    catch (final Exception ex)
    {
View Full Code Here

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

    return newGroup;
  }

  protected UndoEntry createUndoEntry(final CrosstabGroup selectedCrosstab, final CrosstabGroup newGroup)
  {
    UndoEntry undo;
    Section parentSection = selectedCrosstab.getParentSection();
    if (parentSection instanceof AbstractReportDefinition)
    {
      AbstractReportDefinition r = (AbstractReportDefinition) parentSection;
      undo = new CrosstabEditSupport.EditGroupOnReportUndoEntry(r.getRootGroup(), newGroup);
View Full Code Here

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

    for (int i = 0; i < visualElements.length; i++)
    {
      final Element element = visualElements[i];
      final Object oldValue = element.getAttribute
          (SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.TYPE_ATTRIBUTE);
      final UndoEntry entry = new AttributeEditUndoEntry(element.getObjectID(),
          SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.TYPE_ATTRIBUTE,
          oldValue, type);
      undos.add(entry);
      element.setAttribute(SimpleBarcodesAttributeNames.NAMESPACE, SimpleBarcodesAttributeNames.TYPE_ATTRIBUTE, type);
    }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.util.undo.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()]);
View Full Code Here

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

  {
    try
    {
      if (element instanceof Expression)
      {
        final UndoEntry undoEntry = moveExpressions(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof ParameterDefinitionEntry)
      {
        final UndoEntry undoEntry = moveParameters(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof DataFactory)
      {
        final UndoEntry undoEntry = moveDataFactories(report, element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof RelationalGroup)
      {
        final UndoEntry undoEntry = moveGroup((RelationalGroup) element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
      }
      else if (element instanceof Element)
      {
        final UndoEntry undoEntry = moveVisualElement(report, (Element) element);
        if (undoEntry == null)
        {
          return false;
        }
        undos.add(undoEntry);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.