Package org.pentaho.reporting.designer.core.model.lineal

Examples of org.pentaho.reporting.designer.core.model.lineal.LinealModel


    }

    public void actionPerformed(final ActionEvent e)
    {
      final GuideLine newGuideLine = new GuideLine(guideLine.getPosition(), true);
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(new UpdateVerticalGuidelineUndoEntry(index, newGuideLine, guideLine, getInstanceID()));
      linealModel.updateGuideLine(index, newGuideLine);
    }
View Full Code Here


      this.guideLine = guideLine;
    }

    public void actionPerformed(final ActionEvent e)
    {
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(new RemoveVerticalGuidelineUndoEntry(guideLine, getInstanceID()));
      linealModel.removeGuideLine(guideLine);
    }
View Full Code Here

      if (activeGuide == false)
      {
        return;
      }

      final LinealModel linealModel = getLinealModel();
      final ZoomModel zoomModel = getZoomModel();
      final float pageHeight = pageDefinition.getHeight();
      final double scaledHeight = (e.getY() / zoomModel.getZoomAsPercentage()) - start;
      final double position = Math.min((double) pageHeight, Math.max((double) 0, scaledHeight));
      final GuideLine guideLine = new GuideLine(position, e.getButton() == MouseEvent.BUTTON1);

      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(new AddVerticalGuidelineUndoEntry(guideLine, getInstanceID()));
      linealModel.addGuidLine(guideLine);
    }
View Full Code Here

      if (isShowTopBorder())
      {
        start = getTopBorder();
      }
      final ZoomModel zoomModel = getZoomModel();
      final LinealModel linealModel = getLinealModel();

      final double scaledPos = (e.getY() / zoomModel.getZoomAsPercentage()) - start;
      final float pageHeight = pageDefinition.getHeight();
      final double position = Math.min((double) pageHeight, Math.max((double) 0, scaledPos));
      final GuideLine newGuideLine = new GuideLine(position, dragged.isActive());
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(new UpdateVerticalGuidelineUndoEntry(guideLineIndex, newGuideLine, dragged, getInstanceID()));
      linealModel.updateGuideLine(guideLineIndex, newGuideLine);
    }
View Full Code Here

  }

  public void undo(final ReportRenderContext renderContext)
  {
    final AbstractReportDefinition abstractReportDefinition = renderContext.getReportDefinition();
    final LinealModel linealModel = ModelUtility.getHorizontalLinealModel(abstractReportDefinition);
    linealModel.addGuidLine(guideLine);
  }
View Full Code Here

  }

  public void redo(final ReportRenderContext renderContext)
  {
    final AbstractReportDefinition abstractReportDefinition = renderContext.getReportDefinition();
    final LinealModel linealModel = ModelUtility.getHorizontalLinealModel(abstractReportDefinition);
    linealModel.removeGuideLine(guideLine);
  }
View Full Code Here

  public void undo(final ReportRenderContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.updateGuideLine(index, oldGuideLine);
  }
View Full Code Here

  public void redo(final ReportRenderContext context)
  {
    final AbstractReportDefinition abstractReportDefinition = context.getReportDefinition();
    final Band band = (Band) ModelUtility.findElementById(abstractReportDefinition, id);
    final LinealModel linealModel = ModelUtility.getVerticalLinealModel(band);
    linealModel.updateGuideLine(index, guideLine);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.model.lineal.LinealModel

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.