Examples of GuideLine


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

    final Unit unit = WorkspaceSettings.getInstance().getUnit();
    final GuideLine[] lines = linealModel.getGuideLines();
    for (int i = 0; i < lines.length; i++)
    {
      final GuideLine guideLine = lines[i];
      double start = 0;
      if (showTopBorder)
      {
        start = getTopBorder();
      }
      final int y = (int) ((guideLine.getPosition() + start) * zoomModel.getZoomAsPercentage());
      if (y <= e.getY() + 2 && y >= e.getY() - 2)
      {
        final double unitValue = unit.convertFromPoints(guideLine.getPosition());
        setToolTipText(decimalFormat.format(unitValue));
        return i;
      }
    }

View Full Code Here

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

      }
      g.drawRect(0, y - 2, 14, 4);
    }

    g.setColor(Color.BLUE);
    GuideLine highlightGuideLine = activeGuidLine;
    if (draggedGuideLine != null)
    {
      highlightGuideLine = draggedGuideLine;
    }

    if (highlightGuideLine != null)
    {
      final int y = (int) ((highlightGuideLine.getPosition()) * zoomModel.getZoomAsPercentage()) + so;
      if (highlightGuideLine.isActive())
      {
        g.setColor(new Color(179, 224, 255));
      }
      else
      {
        g.setColor(new Color(170, 170, 170));
      }
      g.fillRect(1, y - 2, 13, 4);
      if (highlightGuideLine.isActive())
      {
        g.setColor(new Color(0, 139, 237));
      }
      else
      {
View Full Code Here

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

    {
      return;
    }

    final int agIndex = getActiveGuideIndex(e);
    final GuideLine ag;
    if (agIndex == -1)
    {
      ag = null;
    }
    else
View Full Code Here

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

      spinnerDialog.pack();
      SwingUtil.centerDialogInParent(spinnerDialog);
      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.GuideLine

      this.index = index;
    }

    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(new UpdateVerticalGuidelineUndoEntry(index, newGuideLine, guideLine, getInstanceID()));
      linealModel.updateGuideLine(index, newGuideLine);
    }
View Full Code Here

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

      this.index = index;
    }

    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

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

      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

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

      setDraggedGuideLine(null);
    }

    public void mouseDragged(final MouseEvent e)
    {
      final GuideLine dragged = getDraggedGuideLine();
      if (dragged == null || guideLineIndex == -1)
      {
        return;
      }

      double start = 0;
      final PageDefinition pageDefinition = getPageDefinition();
      if (pageDefinition == null)
      {
        return;
      }

      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

Examples of org.pentaho.reporting.engine.classic.extensions.parsers.reportdesigner.model.Guideline

   * @param attrs the attributes.
   * @throws SAXException if there is a parsing error.
   */
  protected void startParsing(final Attributes attrs) throws SAXException
  {
    guideline = new Guideline();
    guideline.setActive(Boolean.parseBoolean(attrs.getValue(getUri(), "active")));
    guideline.setPosition(Double.parseDouble(attrs.getValue(getUri(), "position")));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.extensions.parsers.reportdesigner.model.Guideline

      if (guidelines != null && guidelines.length > 0)
      {
        final StringBuffer b = new StringBuffer(100);
        for (int i = 0; i < guidelines.length; i++)
        {
          final Guideline guideline = guidelines[i];
          if (i != 0)
          {
            b.append(' ');
          }
          b.append(guideline.externalize());
        }
        report.setAttribute(ReportDesignerParserModule.NAMESPACE,
            ReportDesignerParserModule.HORIZONTAL_GUIDE_LINES_ATTRIBUTE, b.toString());
      }
    }
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.