Package com.projity.offline_graphics

Examples of com.projity.offline_graphics.SVGRenderer


  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


  public Printable getPrintable(int pageIndex){
    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

    if (instance==null) instance=new PrintDocumentFactory();
    return instance;
  }
  public GraphPageable createDocument(DocumentFrame frame,boolean pdfAsDefault){
    BaseView view=frame.getActiveTopView();
    SVGRenderer renderer;
    NodeModelCache cache;
    if (view instanceof GanttView){
      renderer=new GanttSVGRenderer();
      SpreadSheet sp=frame.getActiveSpreadSheet();
      SpreadSheetFieldArray fieldArray=sp.getFieldArrayWithWidths(null);
      List<Integer> colWidth=null;
//      if (sp!=null){
//        fieldArray=(SpreadSheetFieldArray)sp.getFieldArray();
//        colWidth=getColWidth(sp, fieldArray);
//      }
      cache=NodeModelCacheFactory.getInstance().createFilteredCache((ReferenceNodeModelCache)frame.getReferenceCache(true),"OfflineGantt",null);
      ((GanttSVGRenderer)renderer).init(frame.getProject(),cache,fieldArray,colWidth,frame.getScale(),true);
      renderer.getParams().setSupportLeftAndRightParts(true);
    }else if (view instanceof ResourceView){
      renderer=new GanttSVGRenderer();
      SpreadSheet sp=frame.getActiveSpreadSheet();
      SpreadSheetFieldArray fieldArray=sp.getFieldArrayWithWidths(null);
      List<Integer> colWidth=null;
View Full Code Here

    if (bigPage){
      orientation.setSelectedItem(portrait);
      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;
View Full Code Here

TOP

Related Classes of com.projity.offline_graphics.SVGRenderer

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.