Changeset 216 for trunk

Show
Ignore:
Timestamp:
07/01/08 15:29:03 (5 months ago)
Author:
silver
Message:
 
Location:
trunk/flexbook/chapter9/chapter9_flex/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/flexbook/chapter9/chapter9_flex/src/printpage/PrintFooter.mxml

    r215 r216  
    88        ]]> 
    99        </mx:Script> 
    10     <mx:Label text="Product Total: {pTotal}"/> 
     10    <mx:Label text="坐标点总数: {pTotal}"/> 
    1111</mx:VBox> 
  • trunk/flexbook/chapter9/chapter9_flex/src/printpage/PrintHeader.mxml

    r215 r216  
    11<?xml version="1.0"?> 
    22<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"  
    3     width="60%" horizontalAlign="right" > 
    4     <mx:Label text="坐标点数据列表打印"/> 
     3    width="100%" horizontalAlign="left" > 
     4    <mx:Label text="坐标点数据列表打印:" fontSize="16" /> 
    55</mx:VBox> 
  • trunk/flexbook/chapter9/chapter9_flex/src/printpage/PrintPage.mxml

    r215 r216  
    4040    </mx:Script>     
    4141    <MyComp:PrintHeader id="header"/> 
    42     <mx:PrintDataGrid id="myDataGrid" width="100%" height="100%">     
     42    <mx:Image id="map" width="500" height="200"/>    
     43    <mx:PrintDataGrid id="myDataGrid" width="500" height="100%">     
    4344        <mx:columns> 
    4445            <mx:DataGridColumn headerText="名称" dataField="name"/> 
  • trunk/flexbook/chapter9/chapter9_flex/src/sample11.mxml

    r215 r216  
    22<!-- printing\MultiPagePrint.mxml --> 
    33<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  
    4     layout="vertical"> 
     4    layout="vertical" xmlns:maps="com.earthplayer.maps.*"> 
    55 
    66    <mx:Script> 
    77    <![CDATA[ 
     8        import mx.graphics.ImageSnapshot; 
    89        import mx.printing.*; 
    910        import mx.collections.ArrayCollection;         
     
    3637        // 打印函数 
    3738        public function doPrint():void { 
     39                 
     40                 
     41                 
    3842            //创建打印对象 
    3943            var printJob:FlexPrintJob = new FlexPrintJob(); 
     
    4549                // 作为当前页面的子控件,添加对象 
    4650                addChild(thePrintView); 
     51                 
     52                var bmp:BitmapData = ImageSnapshot.captureBitmapData(map);  
     53                        var bitmap:Bitmap = new Bitmap(bmp); 
     54                        thePrintView.map.source = bitmap; 
    4755                 
    4856                // 设置打印尺寸 
     
    98106 
    99107    <!-- The form that appears on the user's system.--> 
    100     <mx:Form id="myForm" width="80%"> 
    101         <mx:FormHeading label="经纬度坐标列表"/>        
    102         <mx:DataGrid id="myDataGrid" dataProvider="{dgProvider}"> 
     108    <mx:Form id="myForm" width="100%"> 
     109        <mx:FormHeading label="经纬度坐标列表"/> 
     110        <maps:MapLive id="map" width="500" height="200"/>        
     111        <mx:DataGrid id="myDataGrid" width="500" dataProvider="{dgProvider}"> 
    103112             <mx:columns> 
    104113                 <mx:DataGridColumn headerText="名称" dataField="name"/>