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

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


      }
      undos.add(StyleEditUndoEntry.createConditional(element, TextStyleKeys.BOLD, value));
      styleSheet.setStyleProperty(TextStyleKeys.BOLD, value);
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("BoldAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));
  }
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 = (Element) 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

      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, TextStyleKeys.ITALIC, value));
      styleSheet.setStyleProperty(TextStyleKeys.ITALIC, value);
      element.notifyNodePropertiesChanged();
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("ItalicsAction.UndoName"),
        new CompoundUndoEntry(undos.toArray(new UndoEntry[undos.size()])));

  }
View Full Code Here

      ClipboardManager.getManager().setContents(preparedElements.toArray());
    }
    finally
    {
      activeContext.getUndo().addChange(ActionMessages.getString("CutAction.Text"),
          new CompoundUndoEntry((UndoEntry[]) undoEntries.toArray(new UndoEntry[undoEntries.size()])));
    }
  }
View Full Code Here

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

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

      }
      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.KEEP_ASPECT_RATIO, value));
      styleSheet.setStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO, value);
    }
    getActiveContext().getUndo().addChange(ActionMessages.getString("KeepAspectRatioAction.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.