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

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


      this.guideLine = guideLine;
    }

    public void actionPerformed(final ActionEvent e)
    {
      final LinealModel linealModel = getLinealModel();
      final UndoManager undo = getRenderContext().getUndo();
      undo.addChange(Messages.getString("LinealComponent.DeleteGuideUndoName"),
          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(Messages.getString("LinealComponent.AddGuideUndoName"),
          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(Messages.getString("LinealComponent.ChangeGuideUndoName"),
          new UpdateVerticalGuidelineUndoEntry(guideLineIndex, newGuideLine, dragged, getInstanceID()));
      linealModel.updateGuideLine(guideLineIndex, newGuideLine);
    }
View Full Code Here

  }

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

  }

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

  public void undo(final ReportDocumentContext 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 ReportDocumentContext 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

  }

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

  }

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

    if (maybeLinealModel instanceof LinealModel)
    {
      return (LinealModel) maybeLinealModel;
    }

    final LinealModel verticalLinealModel = new LinealModel();
    final Object attribute = rootBand.getAttribute(ReportDesignerParserModule.NAMESPACE,
        ReportDesignerParserModule.VERTICAL_GUIDE_LINES_ATTRIBUTE);
    if (attribute instanceof String)
    {
      verticalLinealModel.parse(attribute.toString());
    }
    verticalLinealModel.addLinealModelListener(new LinealUpdateHandler
        (rootBand, verticalLinealModel, ReportDesignerParserModule.VERTICAL_GUIDE_LINES_ATTRIBUTE));
    rootBand.setAttribute(ReportDesignerParserModule.NAMESPACE,
        ReportDesignerBoot.DESIGNER_LINEAL_MODEL_OBJECT, verticalLinealModel, false);
    return verticalLinealModel;
  }
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.