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

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


      {
        parentBand.removeElement(visualReportElement);
        parentBand.addElement(visualReportElement);

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


              throw new IllegalStateException("A newly inserted section must have a position within its parent.");
            }
          }
          else
          {
            undos.add(new ElementEditUndoEntry(parent.getObjectID(), position, null, insertElement));
          }
        }
        else if (insertResult instanceof Expression)
        {
          final Expression insertExpression = (Expression) insertResult;
View Full Code Here

      {
        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));
      }
    }
    return null;
  }
View Full Code Here

        if (result == 0)
        {
          final ReportRenderContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getString("SubreportReportElementDragHandler.UndoEntry"),
              new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
          parent.addElement(subReport);
        }
        else
        {
          final AbstractRootLevelBand arb = (AbstractRootLevelBand) parent;

          final ReportRenderContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getString("SubreportReportElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
      {
        final ReportRenderContext context = dragContext.getRenderContext();
        final UndoManager undo = context.getUndo();
        undo.addChange(Messages.getString("SubreportReportElementDragHandler.UndoEntry"),
            new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
        parent.addElement(subReport);
      }

      dragContext.getRenderContext().getSelectionModel().setSelectedElements(new Object[]{subReport});
View Full Code Here

    if (parent instanceof Band)
    {
      final Band band = (Band) parent;
      final int index = ModelUtility.findIndexOf(band, veElement);
      band.removeElement(veElement);
      return new ElementEditUndoEntry(band.getObjectID(), index, veElement, null);
    }

    if (data instanceof GroupHeader)
    {
      final Group g = (Group) parent;
View Full Code Here

TOP

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

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.