Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com
- {
- import flash.events.*;
- import flash.utils.*;
- import mx.binding.*;
- import mx.containers.*;
- import mx.controls.*;
- import mx.core.*;
- import mx.events.*;
- import mx.managers.*;
- import mx.styles.*;
- public class SavePdf extends Panel implements IBindingClient
- {
- var _bindingsBeginWithWord:Object;
- var _watchers:Array;
- var _bindingsByDestination:Object;
- private var _1092828516closebtn:Button;
- private var _1427818632download:Button;
- public var _SavePdf_Label1:Label;
- public var _SavePdf_Label2:Label;
- private var _documentDescriptor_:UIComponentDescriptor;
- var _bindings:Array;
- private static var _watcherSetupUtil:IWatcherSetupUtil;
- public function SavePdf()
- {
- _documentDescriptor_ = new UIComponentDescriptor({type:Panel, propertiesFactory:function () : Object
- {
- return {width:384, height:156, childDescriptors:[new UIComponentDescriptor({type:Button, id:"download", events:{click:"__download_click"}, propertiesFactory:function () : Object
- {
- return {styleName:"overallButton", x:215, y:117};
- }// end function
- }), new UIComponentDescriptor({type:Button, id:"closebtn", events:{click:"__closebtn_click"}, propertiesFactory:function () : Object
- {
- return {styleName:"overallButton", x:290, y:117};
- }// end function
- }), new UIComponentDescriptor({type:Button, events:{click:"___SavePdf_Button3_click"}, propertiesFactory:function () : Object
- {
- return {styleName:"close", visible:false, x:344, y:117};
- }// end function
- }), new UIComponentDescriptor({type:Label, id:"_SavePdf_Label1", stylesFactory:function () : void
- {
- this.textAlign = "center";
- return;
- }// end function
- , propertiesFactory:function () : Object
- {
- return {x:29, y:50, styleName:"Txtnormal", width:322, height:29, selectable:false, tabIndex:0};
- }// end function
- }), new UIComponentDescriptor({type:Label, id:"_SavePdf_Label2", stylesFactory:function () : void
- {
- this.paddingTop = 0;
- this.color = 0;
- this.fontFamily = "Verdana";
- this.fontSize = 11;
- this.fontWeight = "bold";
- return;
- }// end function
- , propertiesFactory:function () : Object
- {
- return {x:18, y:8};
- }// end function
- })]};
- }// end function
- });
- _bindings = [];
- _watchers = [];
- _bindingsByDestination = {};
- _bindingsBeginWithWord = {};
- mx_internal::_document = this;
- if (!this.styleDeclaration)
- {
- this.styleDeclaration = new CSSStyleDeclaration();
- }
- this.styleDeclaration.defaultFactory = function () : void
- {
- this.creationCompleteEffect = "FBCreationCompleteEffect";
- return;
- }// end function
- ;
- this.registerEffects(["creationCompleteEffect"]);
- this.styleName = "flipbookpanel";
- this.width = 384;
- this.height = 156;
- this.layout = "absolute";
- this.addEventListener("move", ___SavePdf_Panel1_move);
- this.addEventListener("creationComplete", ___SavePdf_Panel1_creationComplete);
- return;
- }// end function
- private function ActivityDrag(event:MouseEvent) : void
- {
- this.startDrag();
- return;
- }// end function
- private function saveData(event:Event) : void
- {
- return;
- }// end function
- public function set closebtn(param1:Button) : void
- {
- var _loc_2:* = this._1092828516closebtn;
- if (_loc_2 !== param1)
- {
- this._1092828516closebtn = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "closebtn", _loc_2, param1));
- }
- return;
- }// end function
- public function __closebtn_click(event:MouseEvent) : void
- {
- closeAction();
- return;
- }// end function
- public function get download() : Button
- {
- return this._1427818632download;
- }// end function
- private function init() : void
- {
- Application.application.booklist_tile.BookWindow_obj.PopupMouseHandler(false);
- cursorManager.removeAllCursors();
- return;
- }// end function
- private function checkPosition() : void
- {
- var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.width;
- var _loc_2:* = Application.application.booklist_tile.BookWindow_obj.height;
- if (this.x < 0 || this.x > _loc_1 - this.width)
- {
- this.x = this.x < 0 ? (0) : (this.x > _loc_1 - this.width ? (_loc_1 - this.width) : (this.x));
- }
- if (this.y < 0 || this.y > _loc_2 - this.height)
- {
- this.y = this.y < 0 ? (0) : (this.y > _loc_2 - this.height ? (_loc_2 - this.height) : (this.y));
- }
- return;
- }// end function
- private function closeAction() : void
- {
- Application.application.booklist_tile.BookWindow_obj.hiddenFocus.setFocus();
- PopUpManager.removePopUp(this);
- Application.application.booklist_tile.BookWindow_obj.ExternalWindow = null;
- Application.application.booklist_tile.BookWindow_obj.PopupMouseHandler(true);
- return;
- }// end function
- override public function initialize() : void
- {
- var target:SavePdf;
- var watcherSetupUtilClass:Object;
- .mx_internal::setDocumentDescriptor(_documentDescriptor_);
- var bindings:* = _SavePdf_bindingsSetup();
- var watchers:Array;
- target;
- if (_watcherSetupUtil == null)
- {
- watcherSetupUtilClass = getDefinitionByName("_com_SavePdfWatcherSetupUtil");
- var _loc_2:* = watcherSetupUtilClass;
- _loc_2["init"](null);
- }
- _watcherSetupUtil.setup(this, function (param1:String)
- {
- return target[param1];
- }// end function
- , bindings, watchers);
- var i:uint;
- while (i < bindings.length)
- {
- Binding(bindings[i]).execute();
- i = (i + 1);
- }
- mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
- mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
- super.initialize();
- return;
- }// end function
- override protected function createChildren() : void
- {
- var _loc_2:* = null;
- super.createChildren();
- var _loc_1:* = new Button();
- _loc_1.styleName = "close";
- _loc_1.width = 15.4;
- _loc_1.height = 15.5;
- _loc_1.toolTip = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel._close.toString();
- _loc_1.addEventListener(MouseEvent.CLICK, close_Action);
- _loc_2 = new HBox();
- _loc_2.width = 15.4;
- _loc_2.x = 355;
- _loc_2.y = 8;
- _loc_2.height = 15.5;
- _loc_2.addChild(_loc_1);
- titleBar.addChild(_loc_2);
- return;
- }// end function
- public function ___SavePdf_Panel1_creationComplete(event:FlexEvent) : void
- {
- init();
- return;
- }// end function
- private function _SavePdf_bindingExprs() : void
- {
- var _loc_1:* = undefined;
- _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_yes.toString();
- _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_no.toString();
- _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_msg.toString();
- _loc_1 = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_title.toString();
- return;
- }// end function
- public function get closebtn() : Button
- {
- return this._1092828516closebtn;
- }// end function
- public function ___SavePdf_Button3_click(event:MouseEvent) : void
- {
- closeAction();
- return;
- }// end function
- private function _SavePdf_bindingsSetup() : Array
- {
- var binding:Binding;
- var result:Array;
- binding = new Binding(this, function () : String
- {
- var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_yes.toString();
- var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
- return _loc_2;
- }// end function
- , function (param1:String) : void
- {
- download.label = param1;
- return;
- }// end function
- , "download.label");
- result[0] = binding;
- binding = new Binding(this, function () : String
- {
- var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_no.toString();
- var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
- return _loc_2;
- }// end function
- , function (param1:String) : void
- {
- closebtn.label = param1;
- return;
- }// end function
- , "closebtn.label");
- result[1] = binding;
- binding = new Binding(this, function () : String
- {
- var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_msg.toString();
- var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
- return _loc_2;
- }// end function
- , function (param1:String) : void
- {
- _SavePdf_Label1.text = param1;
- return;
- }// end function
- , "_SavePdf_Label1.text");
- result[2] = binding;
- binding = new Binding(this, function () : String
- {
- var _loc_1:* = Application.application.booklist_tile.BookWindow_obj.LabelData_obj.downloadPanel.download_title.toString();
- var _loc_2:* = _loc_1 == undefined ? (null) : (String(_loc_1));
- return _loc_2;
- }// end function
- , function (param1:String) : void
- {
- _SavePdf_Label2.text = param1;
- return;
- }// end function
- , "_SavePdf_Label2.text");
- result[3] = binding;
- return result;
- }// end function
- public function __download_click(event:MouseEvent) : void
- {
- getURL();
- return;
- }// end function
- public function set download(param1:Button) : void
- {
- var _loc_2:* = this._1427818632download;
- if (_loc_2 !== param1)
- {
- this._1427818632download = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "download", _loc_2, param1));
- }
- return;
- }// end function
- private function addDragEvent() : void
- {
- this.addEventListener(MouseEvent.MOUSE_DOWN, ActivityDrag);
- this.addEventListener(MouseEvent.MOUSE_OUT, ActivityDrop);
- this.addEventListener(MouseEvent.MOUSE_UP, ActivityDrop);
- return;
- }// end function
- private function getURL() : void
- {
- return;
- }// end function
- public function ___SavePdf_Panel1_move(event:MoveEvent) : void
- {
- checkPosition();
- return;
- }// end function
- private function close_Action(event:MouseEvent) : void
- {
- closeAction();
- return;
- }// end function
- private function ActivityDrop(event:MouseEvent) : void
- {
- this.stopDrag();
- return;
- }// end function
- public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
- {
- SavePdf._watcherSetupUtil = param1;
- return;
- }// end function
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment