/** * AUTHOR: James O'Reilly * * NOTE: This class is included for legacy content only. It's * been replaced by Div class. (5.19.06) * * Defines a coordinate space without requring a movieclip. Class provides methods for * changing x, y, width and height. For maximum flexibility, all variations on names are provided: * _width, width, setWidth, _height, height, setHeight, etc... */ /** * TODO Refactor objects that use this class to use new layout code instead. * * THIS IS DEPRECATED. */ package com.flashconnections.ui.util { import com.flashconnections.core.Core; import com.flashconnections.ui.util.ifc.Iactionscript_video_com_flashconnections_ui_util_CoordinateSpace; class actionscript_video_com_flashconnections_ui_util_CoordinateSpace extends Core implements Iactionscript_video_com_flashconnections_ui_util_CoordinateSpace { public var x:Number; public var y:Number; public var w:Number; public var h:Number; public function actionscript_video_com_flashconnections_ui_util_CoordinateSpace() {} public function initCoordinates(x:Number, y:Number, w:Number, h:Number):void { setX(x); setY(y); setWidth(w); setHeight(h); } //interface implementations //instance public function setName(val:String):void {} public function getName():String { return null; } //visibility public function show():void {} public function hide():void {} public function destroy():void {} //size public function setSize(W:Number, H:Number):void { w = W; h = H; } public function getSize():Object { return {w:w, w:h}; } public function setWidth(val:Number):void { w = val; } public function getWidth():Number { return w; } public function setHeight(val:Number):void { h = val; } public function getHeight():Number { return h; } //position public function setPosition(X:Number, Y:Number):void { x = X; y = Y; } public function getPosition():Object { return {x:x, y:y}; } public function setX(val:Number):void { x = val; } public function getX():Number { return x; } public function setY(val:Number):void { y = val; } public function getY():Number { return y; } //bounds public function getBounds():Object { return {xMin:x, xMax:x + w, yMin:y, yMax:y + h}; } public function setRight(val:Number):void { w = val - x; } public function getRight():Number { return x + w; } public function setBottom(val:Number):void { h = val - y; } public function getBottom():Number { return y + h; } //intrinsic variations public function set _x(val:Number):void { setX(val); } public function get _x():Number { return getX(); } public function set _y(val:Number):void { setY(val); } public function get _y():Number { return getY(); } public function set _width(val:Number):void { setWidth(val); } public function get _width():Number { return getWidth(); } public function set width(val:Number):void { setWidth(val); } public function get width():Number { return getWidth(); } public function set _height(val:Number):void { setHeight(val); } public function get _height():Number { return getHeight(); } public function set height(val:Number):void { setHeight(val); } public function get height():Number { return getHeight(); } public function set position(val:Object):void { setPosition(val.x, val.y); } public function get position():Object { return getPosition(); } public function set size(val:Object):void { setSize(val.x, val.y); } public function get size():Object { return getSize(); } public function set right(val:Number):void { setRight(val); } public function get right():Number { return getRight(); } public function set bottom(val:Number):void { setBottom(val); } public function get bottom():Number { return getBottom(); } } }