Examples of LinealModel


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

  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.removeGuideLine(guideLine);
  }
View Full Code Here

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

  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.addGuidLine(guideLine);
  }
View Full Code Here

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

  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.addGuidLine(guideLine);
  }
View Full Code Here

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

  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.removeGuideLine(guideLine);
  }
View Full Code Here

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

  }

  protected void installLineals(final LinealModel horizontalLinealModel,
                                final HorizontalPositionsModel horizontalPositionsModel)
  {
    final LinealModel verticalLinealModel;
    final ElementRenderer elementRenderer = getElementRenderer();
    if (elementRenderer != null)
    {
      verticalLinealModel = elementRenderer.getVerticalLinealModel();
    }
View Full Code Here

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

    this.renderContext = renderContext;
    this.renderContext.getContextRoot().addReportModelListener(new PageFormatUpdateHandler());
    this.changeHandler = new RootBandChangeHandler();
    this.showTopBorder = showTopBorder;
    this.zoomModel = renderContext.getZoomModel();
    this.linealModel = new LinealModel();
    this.linealUpdateHandler = new LinealUpdateHandler();
    this.linealModel.addLinealModelListener(linealUpdateHandler);
    this.renderContext.getZoomModel().addZoomModelListener(changeHandler);

    final DragAndDropHandler andDropHandler = new DragAndDropHandler();
View Full Code Here

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

    this.reportElement = reportElement;
    this.pageDefinition = pageDefinition;
    if (reportElement == null)
    {
      this.linealModel = new LinealModel();
      this.name = null;
    }
    else
    {
      this.linealModel = reportElement.getVerticalLinealModel();
View Full Code Here

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

      this.index = index;
    }

    public void actionPerformed(final ActionEvent e)
    {
      final LinealModel linealModel = getLinealModel();
      if (linealModel == null)
      {
        return;
      }

      final GuideLineDialog spinnerDialog;
      final Component parent = VerticalLinealComponent.this;
      final Window window = LibSwingUtil.getWindowAncestor(parent);
      if (window instanceof JDialog)
      {
        spinnerDialog = new GuideLineDialog((JDialog) window);
      }
      else if (window instanceof JFrame)
      {
        spinnerDialog = new GuideLineDialog((JFrame) window);
      }
      else
      {
        spinnerDialog = new GuideLineDialog();
      }

      spinnerDialog.setUnit(WorkspaceSettings.getInstance().getUnit());
      spinnerDialog.setPosition(guideLine.getPosition());

      if (spinnerDialog.showDialog())
      {
        final GuideLine newGuideLine = new GuideLine(spinnerDialog.getPosition(), guideLine.isActive());
        linealModel.updateGuideLine(index, newGuideLine);
        this.guideLine = newGuideLine;
      }

    }
View Full Code Here

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

    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

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

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

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