Package com.projity.pm.graphic.graph

Examples of com.projity.pm.graphic.graph.GraphParams


  private GraphPageable (SVGRenderer renderer,boolean pdfOnly,boolean pdfAsDefault,boolean localSettings) {
       super(renderer.getProject(),pdfOnly,pdfAsDefault,localSettings);
       FontManager.setOfflineDefaultFont(FontManager.DEFAULT_FONT);
       this.renderer=renderer;

       GraphParams params=renderer.getParams();

       if (params instanceof SpreadSheetParams && params.isLeftPartVisible() && params.isRightPartVisible()){
         params.setLeftPartVisible(showSpreadsheet);
         params.setRightPartVisible(showGantt);
       }else{
         showSpreadsheet=params.isLeftPartVisible();
         showGantt=params.isRightPartVisible();
       }

      zoomX=scaleToSettings.getWidth();
      zoomY=scaleToSettings.isConstrainProportions()?zoomX:scaleToSettings.getHeight();
      saveZoom();
View Full Code Here


    return documentColCount;
  }


  public void update(){
    GraphParams params=renderer.getParams();
    double zx=getTotalZoomX();
    double zy=getTotalZoomY();
    //zx=pageFormat.getOrientation()==PageFormat.PORTRAIT?zx:zy;
    //zy=pageFormat.getOrientation()==PageFormat.PORTRAIT?zy:zx;
    int pageW=(int)Math.ceil((pageFormat.getImageableWidth()-1)/zx);
    int pageH=(int)Math.ceil((pageFormat.getImageableHeight()-1)/zy);
    params.setPrintBounds(new Rectangle(0,0,pageW,pageH));
    documentColCount=params.getPrintCols();
    documentRowCount=params.getPrintRows();
  }
View Full Code Here

  ExtendedPrintService extendedPrintService=ExtendedPrintServiceFactory.getExtendedPrintService();
  public void updateZoom(int pw,int ph){
    double iw=pageFormat.getImageableWidth();
    double ih=pageFormat.getImageableHeight();
    SVGRenderer renderer=getRenderer();
    GraphParams params=renderer.getParams();
    double zw=extendedPrintService.getWRatio(pw, iw,params);
    double zh=extendedPrintService.getHRatio(ph, ih,params);
    setTotalZoomX(zw);
    setTotalZoomY(zh);
  }
View Full Code Here

    return this;
  }

  public void update(){
    SVGRenderer renderer=printableParams.getRenderer();
    GraphParams params=renderer.getParams();
    int pageW=(int)Math.ceil((pageFormat.getImageableWidth()-1)/printableParams.getTotalZoomX());
    int pageH=(int)Math.ceil((pageFormat.getImageableHeight()-1)/printableParams.getTotalZoomY());
    params.setPrintBounds(new Rectangle(0,0,pageW,pageH));
    printableParams.setDocumentColCount(params.getPrintCols());
    printableParams.setDocumentRowCount(params.getPrintRows());
  }
View Full Code Here

      printSpreadSheet=new JCheckBox(Messages.getString("PageSetupDialog.ShowSpreadSheet"),document.isShowSpreadsheet());
      printSpreadSheet.addItemListener(new ItemListener(){
        public void itemStateChanged(ItemEvent e) {
          if (isUpdaping()) return;
          boolean selected=printSpreadSheet.isSelected();
          GraphParams params=document.getRenderer().getParams();
          params.setLeftPartVisible(selected);
          if (!selected&&!printGantt.isSelected()){
            params.setRightPartVisible(true);
            beginUpdate();
            printGantt.setSelected(true);
            endUpdate();
          }

          refresh();
        }
      });
      initFont(printSpreadSheet);
      printGantt=new JCheckBox(Messages.getString("PageSetupDialog.ShowGantt"),document.isShowGantt());
      printGantt.addItemListener(new ItemListener(){
        public void itemStateChanged(ItemEvent e) {
          if (isUpdaping()) return;
          boolean selected=printGantt.isSelected();
          GraphParams params=document.getRenderer().getParams();
          params.setRightPartVisible(selected);
          if (!selected&&!printGantt.isSelected()){
            params.setLeftPartVisible(true);
            beginUpdate();
            printSpreadSheet.setSelected(true);
            endUpdate();
          }
View Full Code Here

      scaleTo.setSelected(true);
      svgPaperWidth=pageFormat.getPaper().getWidth();
      svgPaperHeight=pageFormat.getPaper().getHeight();
      SVGRenderer renderer=document.getRenderer();
      Dimension d=renderer.getCanvasSize();
      GraphParams params=renderer.getParams();
      double w=pageFormat.getOrientation()==PageFormat.PORTRAIT?d.getWidth():d.getHeight();
      double h=pageFormat.getOrientation()==PageFormat.PORTRAIT?d.getHeight():d.getWidth();
      int footerH=params.getConfiguration().getPrintFooterHeight();
      if (pageFormat.getOrientation()==PageFormat.PORTRAIT) h+=footerH;
      else w+=footerH;
      w=(w*PageSize.INCH)/(PageSize.POINTS_PER_INCH*PageSize.MM); //be sure the pages aren't cut due to the loss of precision
      h=(h*PageSize.INCH)/(PageSize.POINTS_PER_INCH*PageSize.MM);
      double[] margins=pageFormat.getMargins(false);
View Full Code Here

    beginUpdate();
    if (!fitTo.isSelected()) updateFitTo();
    endUpdate();
  }
  public void updateFitTo(){
    GraphParams params=document.getRenderer().getParams();
    fitToWidth.setValue(params.getPrintCols());
    fitToHeight.setValue(params.getPrintRows());
  }
View Full Code Here

    super(graphInfo);
    init();
  }
 
  public void init(){
    GraphParams graphInfo=getGraphInfo();
    if (graphInfo instanceof JComponent)
      container=(JComponent)graphInfo;
    config=GraphicConfiguration.getInstance();
    linkRenderer = new LinkRenderer();
    renderer=new NetworkCellRenderer(graphInfo);
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.graph.GraphParams

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.