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

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


                                 final ReportElementEditorContext dragContext,
                                 final Point2D point)
  {
    final ReportDocumentContext context = dragContext.getRenderContext();
    final UndoManager undo = context.getUndo();
    undo.addChange(Messages.getString("DefaultReportElementDragHandler.AddElementUndoEntry"),
        new ElementEditUndoEntry(target.getObjectID(), target.getElementCount(), null, visualElement));
    target.addElement(visualElement);
  }

  protected abstract Element createElement(final ElementMetaData elementMetaData,
View Full Code Here


        final Object attribute = styleSheet.getStyleProperty(metaData.getStyleKey());
        undos.add(new StyleEditUndoEntry
            (element.getObjectID(), metaData.getStyleKey(), attribute, value));
        styleSheet.setStyleProperty(metaData.getStyleKey(), value);
      }
      undo.addChange(Messages.getString("StyleChange"), new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));
    }
    return changed;
  }

  protected Object computeInheritValue(final StyleMetaData metaData,
View Full Code Here

              (element.getObjectID(), metaData.getStyleKey(), attribute, expression));
          element.setStyleExpression(metaData.getStyleKey(), expression);
          element.notifyNodePropertiesChanged();
        }
      }
      undo.addChange(Messages.getString("StyleChange"), new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));

    }
    return changed;
  }
View Full Code Here

      final float scaleFactor = getZoomAsMicropoints();
      final double scaledPosition = (e.getX() / scaleFactor) - start;
      final double position = Math.min(width, Math.max((double) 0, scaledPosition));
      final GuideLine newGuideLine = new GuideLine(position, dragged.isActive());
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.ChangeGuideUndoName"),
          new UpdateHorizontalGuidelineUndoEntry(draggedGuideLineIndex, newGuideLine, dragged));
      linealModel.updateGuideLine(draggedGuideLineIndex, newGuideLine);
    }

    public void mouseMoved(final MouseEvent e)
View Full Code Here

      final double scaledPosition = (e.getX() / scaleFactor) - start;
      final double position = Math.min(width, Math.max((double) 0, scaledPosition));
      final GuideLine guideLine = new GuideLine(position, e.getButton() == MouseEvent.BUTTON1);

      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.AddGuideUndoName"), new AddHorizontalGuidelinesUndoEntry(guideLine));
      linealModel.addGuidLine(guideLine);
    }

    public void mousePressed(final MouseEvent e)
    {
View Full Code Here

    public void actionPerformed(final ActionEvent e)
    {
      final GuideLine newGuideLine = new GuideLine(guideLine.getPosition(), false);
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.DeactivateGuideUndoEntry"),
          new UpdateHorizontalGuidelineUndoEntry(index, newGuideLine, guideLine));
      linealModel.updateGuideLine(index, newGuideLine);
    }
  }
View Full Code Here

    public void actionPerformed(final ActionEvent e)
    {
      final GuideLine newGuideLine = new GuideLine(oldGuideLine.getPosition(), true);
      final UndoManager undo = getRenderContext().getUndo();
      final LinealModel linealModel = getLinealModel();
      undo.addChange(Messages.getString("LinealComponent.ActivateGuideUndoEntry"),
          new UpdateHorizontalGuidelineUndoEntry(index, newGuideLine, oldGuideLine));
      linealModel.updateGuideLine(index, newGuideLine);
    }
  }
View Full Code Here

    public void actionPerformed(final ActionEvent e)
    {
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.DeleteGuideUndoName"),
          new RemoveHorizontalGuidelineUndoEntry(guideLine));
      linealModel.removeGuideLine(guideLine);
    }
  }
View Full Code Here

      type.configureDesignTimeDefaults(visualElement, Locale.getDefault());


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

    public void actionPerformed(final ActionEvent e)
    {
      final GuideLine newGuideLine = new GuideLine(guideLine.getPosition(), false);
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.DeactivateGuideUndoEntry"),
          new UpdateVerticalGuidelineUndoEntry(index, newGuideLine, guideLine, getInstanceID()));
      linealModel.updateGuideLine(index, newGuideLine);
    }

  }
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.