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

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


      if (element == entry)
      {
        dpd.removeParameterDefinition(i);
        dpd.addParameterDefinition(entry);
        report.fireModelLayoutChanged(report, ReportModelEvent.NODE_STRUCTURE_CHANGED, entry);
        return new CompoundUndoEntry
                (new ParameterEditUndoEntry(i, entry, null), new ParameterEditUndoEntry(dpd.getParameterDefinitions().length-1, null, entry));
      }
    }
    return null;
  }
View Full Code Here


      }
      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.SCALE, value));
      styleSheet.setStyleProperty(ElementStyleKeys.SCALE, value);
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("ScaleAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
View Full Code Here

      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.ALIGNMENT, ElementAlignment.LEFT));
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.LEFT);
      element.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("TextAlignmentLeftAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
View Full Code Here

      undos.add(StyleEditUndoEntry.createConditional(element, TextStyleKeys.UNDERLINED, value));
      styleSheet.setStyleProperty(TextStyleKeys.UNDERLINED, value);
      element.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("UnderlineAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));

  }
View Full Code Here

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

      undos.add(StyleEditUndoEntry.createConditional(visualElement, TextStyleKeys.FONT, font));
      visualElement.getStyle().setStyleProperty(TextStyleKeys.FONT, font);
      visualElement.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("ApplyFontFamilyAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));

  }
View Full Code Here

      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.ALIGNMENT, ElementAlignment.JUSTIFY));
      styleSheet.setStyleProperty(ElementStyleKeys.ALIGNMENT, ElementAlignment.JUSTIFY);
      element.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("TextAlignmentJustifyAction.UndoName"),
        new CompoundUndoEntry(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 = 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

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.