Guest User

Untitled

a guest
Oct 10th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com
  2. {
  3.     import flash.events.*;
  4.     import flash.utils.*;
  5.     import mx.binding.*;
  6.     import mx.containers.*;
  7.     import mx.controls.*;
  8.     import mx.core.*;
  9.     import mx.events.*;
  10.     import mx.managers.*;
  11.     import mx.styles.*;
  12.  
  13.     public class SavePdf extends Panel implements IBindingClient
  14.     {
  15.         var _bindingsBeginWithWord:Object;
  16.         var _watchers:Array;
  17.         var _bindingsByDestination:Object;
  18.         private var _1092828516closebtn:Button;
  19.         private var _1427818632download:Button;
  20.         public var _SavePdf_Label1:Label;
  21.         public var _SavePdf_Label2:Label;
  22.         private var _documentDescriptor_:UIComponentDescriptor;
  23.         var _bindings:Array;
  24.         private static var _watcherSetupUtil:IWatcherSetupUtil;
  25.  
  26.         public function SavePdf()
  27.         {
  28.             _documentDescriptor_ = new UIComponentDescriptor({type:Panel, propertiesFactory:function () : Object
  29.             {
  30.                 return {width:384, height:156, childDescriptors:[new UIComponentDescriptor({type:Button, id:"download", events:{click:"__download_click"}, propertiesFactory:function () : Object
  31.                 {
  32.                     return {styleName:"overallButton", x:215, y:117};
  33.                 }// end function
  34.                 }), new UIComponentDescriptor({type:Button, id:"closebtn", events:{click:"__closebtn_click"}, propertiesFactory:function () : Object
  35.                 {
  36.                     return {styleName:"overallButton", x:290, y:117};
  37.                 }// end function
  38.                 }), new UIComponentDescriptor({type:Button, events:{click:"___SavePdf_Button3_click"}, propertiesFactory:function () : Object
  39.                 {
  40.                     return {styleName:"close", visible:false, x:344, y:117};
  41.                 }// end function
  42.                 }), new UIComponentDescriptor({type:Label, id:"_SavePdf_Label1", stylesFactory:function () : void
  43.                 {
  44.                     this.textAlign = "center";
  45.                     return;
  46.                 }// end function
  47.                 , propertiesFactory:function () : Object
  48.                 {
  49.                     return {x:29, y:50, styleName:"Txtnormal", width:322, height:29, selectable:false, tabIndex:0};
  50.                 }// end function
  51.                 }), new UIComponentDescriptor({type:Label, id:"_SavePdf_Label2", stylesFactory:function () : void
  52.                 {
  53.                     this.paddingTop = 0;
  54.                     this.color = 0;
  55.                     this.fontFamily = "Verdana";
  56.                     this.fontSize = 11;
  57.                     this.fontWeight = "bold";
  58.                     return;
  59.                 }// end function
  60.                 , propertiesFactory:function () : Object
  61.                 {
  62.                     return {x:18, y:8};
  63.                 }// end function
  64.                 })]};
  65.             }// end function
  66.             });
  67.             _bindings = [];
  68.             _watchers = [];
  69.             _bindingsByDestination = {};
  70.             _bindingsBeginWithWord = {};
  71.             mx_internal::_document = this;
  72.             if (!this.styleDeclaration)
  73.             {
  74.                 this.styleDeclaration = new CSSStyleDeclaration();
  75.             }
  76.             this.styleDeclaration.defaultFactory = function () : void
  77.             {
  78.                 this.creationCompleteEffect = "FBCreationCompleteEffect";
  79.                 return;
  80.             }// end function
  81.             ;
  82.             this.registerEffects(["creationCompleteEffect"]);
  83.             this.styleName = "flipbookpanel";
  84.             this.width = 384;
  85.             this.height = 156;
  86.             this.layout = "absolute";
  87.             this.addEventListener("move", ___SavePdf_Panel1_move);
  88.             this.addEventListener("creationComplete", ___SavePdf_Panel1_creationComplete);
  89.             return;
  90.         }// end function
  91.  
  92.         private function ActivityDrag(event:MouseEvent) : void
  93.         {
  94.             this.startDrag();
  95.             return;
  96.         }// end function
  97.  
  98.         private function saveData(event:Event) : void
  99.         {
  100.             return;
  101.         }// end function
  102.  
  103.         public function set closebtn(param1:Button) : void
  104.         {
  105.             var _loc_2:* = this._1092828516closebtn;
  106.             if (_loc_2 !== param1)
  107.             {
  108.                 this._1092828516closebtn = param1;
  109.                 this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "closebtn", _loc_2, param1));
  110.             }
  111.             return;
  112.         }// end function
  113.  
  114.         public function __closebtn_click(event:MouseEvent) : void
  115.         {
  116.             closeAction();
  117.             return;
  118.         }// end function
  119.  
  120.         public function get download() : Button
  121.         {
  122.             return this._1427818632download;
  123.         }// end function
  124.  
  125.         private function init() : void
  126.         {
  127.             Application.application.booklist_tile.BookWindow_obj.PopupMouseHandler(false);
  128.             cursorManager.removeAllCursors();
  129.             return;
  130.         }// end function
  131.  
  132.         private function checkPosition() : void
  133.         {
  134.             var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.width;
  135.             var _loc_2:* = Application.application.booklist_tile.BookWindow_obj.height;
  136.             if (this.x < 0 || this.x > _loc_1 - this.width)
  137.             {
  138.                 this.x = this.x < 0 ? (0) : (this.x > _loc_1 - this.width ? (_loc_1 - this.width) : (this.x));
  139.             }
  140.             if (this.y < 0 || this.y > _loc_2 - this.height)
  141.             {
  142.                 this.y = this.y < 0 ? (0) : (this.y > _loc_2 - this.height ? (_loc_2 - this.height) : (this.y));
  143.             }
  144.             return;
  145.         }// end function
  146.  
  147.         private function closeAction() : void
  148.         {
  149.             Application.application.booklist_tile.BookWindow_obj.hiddenFocus.setFocus();
  150.             PopUpManager.removePopUp(this);
  151.             Application.application.booklist_tile.BookWindow_obj.ExternalWindow = null;
  152.             Application.application.booklist_tile.BookWindow_obj.PopupMouseHandler(true);
  153.             return;
  154.         }// end function
  155.  
  156.         override public function initialize() : void
  157.         {
  158.             var target:SavePdf;
  159.             var watcherSetupUtilClass:Object;
  160.             .mx_internal::setDocumentDescriptor(_documentDescriptor_);
  161.             var bindings:* = _SavePdf_bindingsSetup();
  162.             var watchers:Array;
  163.             target;
  164.             if (_watcherSetupUtil == null)
  165.             {
  166.                 watcherSetupUtilClass = getDefinitionByName("_com_SavePdfWatcherSetupUtil");
  167.                 var _loc_2:* = watcherSetupUtilClass;
  168.                 _loc_2["init"](null);
  169.             }
  170.             _watcherSetupUtil.setup(this, function (param1:String)
  171.             {
  172.                 return target[param1];
  173.             }// end function
  174.             , bindings, watchers);
  175.             var i:uint;
  176.             while (i < bindings.length)
  177.             {
  178.                
  179.                 Binding(bindings[i]).execute();
  180.                 i = (i + 1);
  181.             }
  182.             mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
  183.             mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
  184.             super.initialize();
  185.             return;
  186.         }// end function
  187.  
  188.         override protected function createChildren() : void
  189.         {
  190.             var _loc_2:* = null;
  191.             super.createChildren();
  192.             var _loc_1:* = new Button();
  193.             _loc_1.styleName = "close";
  194.             _loc_1.width = 15.4;
  195.             _loc_1.height = 15.5;
  196.             _loc_1.toolTip = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel._close.toString();
  197.             _loc_1.addEventListener(MouseEvent.CLICK, close_Action);
  198.             _loc_2 = new HBox();
  199.             _loc_2.width = 15.4;
  200.             _loc_2.x = 355;
  201.             _loc_2.y = 8;
  202.             _loc_2.height = 15.5;
  203.             _loc_2.addChild(_loc_1);
  204.             titleBar.addChild(_loc_2);
  205.             return;
  206.         }// end function
  207.  
  208.         public function ___SavePdf_Panel1_creationComplete(event:FlexEvent) : void
  209.         {
  210.             init();
  211.             return;
  212.         }// end function
  213.  
  214.         private function _SavePdf_bindingExprs() : void
  215.         {
  216.             var _loc_1:* = undefined;
  217.             _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_yes.toString();
  218.             _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_no.toString();
  219.             _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_msg.toString();
  220.             _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_title.toString();
  221.             return;
  222.         }// end function
  223.  
  224.         public function get closebtn() : Button
  225.         {
  226.             return this._1092828516closebtn;
  227.         }// end function
  228.  
  229.         public function ___SavePdf_Button3_click(event:MouseEvent) : void
  230.         {
  231.             closeAction();
  232.             return;
  233.         }// end function
  234.  
  235.         private function _SavePdf_bindingsSetup() : Array
  236.         {
  237.             var binding:Binding;
  238.             var result:Array;
  239.             binding = new Binding(this, function () : String
  240.             {
  241.                 var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_yes.toString();
  242.                 var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
  243.                 return _loc_2;
  244.             }// end function
  245.             , function (param1:String) : void
  246.             {
  247.                 download.label = param1;
  248.                 return;
  249.             }// end function
  250.             , "download.label");
  251.             result[0] = binding;
  252.             binding = new Binding(this, function () : String
  253.             {
  254.                 var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_no.toString();
  255.                 var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
  256.                 return _loc_2;
  257.             }// end function
  258.             , function (param1:String) : void
  259.             {
  260.                 closebtn.label = param1;
  261.                 return;
  262.             }// end function
  263.             , "closebtn.label");
  264.             result[1] = binding;
  265.             binding = new Binding(this, function () : String
  266.             {
  267.                 var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_msg.toString();
  268.                 var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
  269.                 return _loc_2;
  270.             }// end function
  271.             , function (param1:String) : void
  272.             {
  273.                 _SavePdf_Label1.text = param1;
  274.                 return;
  275.             }// end function
  276.             , "_SavePdf_Label1.text");
  277.             result[2] = binding;
  278.             binding = new Binding(this, function () : String
  279.             {
  280.                 var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_title.toString();
  281.                 var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
  282.                 return _loc_2;
  283.             }// end function
  284.             , function (param1:String) : void
  285.             {
  286.                 _SavePdf_Label2.text = param1;
  287.                 return;
  288.             }// end function
  289.             , "_SavePdf_Label2.text");
  290.             result[3] = binding;
  291.             return result;
  292.         }// end function
  293.  
  294.         public function __download_click(event:MouseEvent) : void
  295.         {
  296.             getURL();
  297.             return;
  298.         }// end function
  299.  
  300.         public function set download(param1:Button) : void
  301.         {
  302.             var _loc_2:* = this._1427818632download;
  303.             if (_loc_2 !== param1)
  304.             {
  305.                 this._1427818632download = param1;
  306.                 this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "download", _loc_2, param1));
  307.             }
  308.             return;
  309.         }// end function
  310.  
  311.         private function addDragEvent() : void
  312.         {
  313.             this.addEventListener(MouseEvent.MOUSE_DOWN, ActivityDrag);
  314.             this.addEventListener(MouseEvent.MOUSE_OUT, ActivityDrop);
  315.             this.addEventListener(MouseEvent.MOUSE_UP, ActivityDrop);
  316.             return;
  317.         }// end function
  318.  
  319.         private function getURL() : void
  320.         {
  321.             return;
  322.         }// end function
  323.  
  324.         public function ___SavePdf_Panel1_move(event:MoveEvent) : void
  325.         {
  326.             checkPosition();
  327.             return;
  328.         }// end function
  329.  
  330.         private function close_Action(event:MouseEvent) : void
  331.         {
  332.             closeAction();
  333.             return;
  334.         }// end function
  335.  
  336.         private function ActivityDrop(event:MouseEvent) : void
  337.         {
  338.             this.stopDrag();
  339.             return;
  340.         }// end function
  341.  
  342.         public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
  343.         {
  344.             SavePdf._watcherSetupUtil = param1;
  345.             return;
  346.         }// end function
  347.  
  348.     }
  349. }
Advertisement
Add Comment
Please, Sign In to add comment