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

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


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


        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(i - 1, sr);

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

    final Band parentBand = (Band) reportElement;
    final int count = parentBand.getElementCount();
    for (int i = 1; i < count; i++)
    {
      final Element visualReportElement = (Element) parentBand.getElement(i);
      if (element == visualReportElement)
      {
        parentBand.removeElement(visualReportElement);
        parentBand.addElement(i - 1, visualReportElement);
        return new CompoundUndoEntry
            (new ElementEditUndoEntry(parentBand.getObjectID(), i, visualReportElement, null),
                new ElementEditUndoEntry(parentBand.getObjectID(), i - 1, null, visualReportElement));
      }
    }
View Full Code Here

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

        if (dpd.getParameterCount() > i + 1)
        {
          dpd.removeParameterDefinition(i);
          dpd.addParameterDefinition(i + 1, entry);
          report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, entry);
          return new CompoundUndoEntry
              (new ParameterEditUndoEntry(i, entry, null), new ParameterEditUndoEntry(i + 1, null, entry));
        }
      }
    }
    return null;
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

        element.setAttribute(metaData.getNameSpace(), metaData.getName(), value);
        changed = true;
      }
    }
    undo.addChange(Messages.getString("AttributeTableModel.UndoName"),
        new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    return changed;
  }
View Full Code Here

      final ReportAttributeMap newAttributes = visualElement.getAttributes();
      undos.add(new MorphUndoEntry(visualElement.getObjectID(), oldAttributes, newAttributes));
    }

    getActiveContext().getUndo().addChange(ActionMessages.getString("MorphAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
View Full Code Here

      undos.add(StyleEditUndoEntry.createConditional(visualElement, TextStyleKeys.FONTSIZE, fontSize));
      styleSheet.setStyleProperty(TextStyleKeys.FONTSIZE, fontSize);
      visualElement.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("ApplyFontSizeAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
View Full Code Here

      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.ALIGNMENT, ElementAlignment.RIGHT));
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.RIGHT);
      element.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("TextAlignmentRightAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
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.