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

Examples of org.pentaho.reporting.designer.core.util.undo.UndoManager.addChange()


        }
      }
      else
      {
        final UndoManager undo = context.getUndo();
        undo.addChange(Messages.getString("CrosstabReportElementDragHandler.UndoEntry"),
            new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
        parent.addElement(subReport);
      }

      final ReportDesignerContext designerContext = dragContext.getDesignerContext();
View Full Code Here


      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);

      final ReportDocumentContext activeContext = getActiveContext();
      final UndoManager undo = activeContext.getUndo();
      undo.addChange(ActionMessages.getString("InsertTableAction.UndoName"),
          new ElementEditUndoEntry(band.getObjectID(), band.getElementCount(), null, visualElement));
      band.addElement(visualElement);
    }
    catch (Exception ex)
    {
View Full Code Here

        if (result == 0)
        {
          final ReportDocumentContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
          parent.addElement(subReport);
        }
        else
        {
View Full Code Here

        {
          final AbstractRootLevelBand arb = (AbstractRootLevelBand) parent;

          final ReportDocumentContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
View Full Code Here

      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
        final UndoManager undo = context.getUndo();
        undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
            new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
        parent.addElement(subReport);
      }

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

        if (result == 0)
        {
          final ReportDocumentContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
          parent.addElement(subReport);
        }
        else
        {
View Full Code Here

        {
          final AbstractRootLevelBand arb = (AbstractRootLevelBand) parent;

          final ReportDocumentContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
View Full Code Here

      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
        final UndoManager undo = context.getUndo();
        undo.addChange(Messages.getInstance().getString("TocElementDragHandler.UndoEntry"),
            new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
        parent.addElement(subReport);
      }

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

            (element.getObjectID(), metaData.getNameSpace(), metaData.getName(), attribute, value));
        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

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

    return changed;
  }
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.