⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orientation.as

📁 用于flash/flex的 as3的 2D图形图像图表的动态生成
💻 AS
字号:
package flare.util
{
	/**
	 * Constants defining layout orientations.
	 */
	public class Orientation
	{
		/** Constant indicating a left-to-right layout orientation. */
		public static const LEFT_TO_RIGHT:String = "leftToRight";
		/** Constant indicating a right-to-left layout orientation. */
		public static const RIGHT_TO_LEFT:String = "rightToLeft";
		/** Constant indicating a top-to-bottom layout orientation. */
		public static const TOP_TO_BOTTOM:String = "topToBottom";
		/** Constant indicating a bottom-to-top layout orientation. */
		public static const BOTTOM_TO_TOP:String = "bottomToTop";
		
		/**
		 * This is an abstract class and can not be instantiated.
		 */
		public function Orientation() {
			throw new Error("This is an abstract class.");
		}

		/**
		 * Returns true if the input string indicates a vertical orientation.
		 * @param an orientation string
		 * @return true if the input string indicates a vertical orientation
		 */
		public static function isVertical(orient:String):Boolean
		{
			return (orient==TOP_TO_BOTTOM || orient==BOTTOM_TO_TOP);
		}
		
		/**
		 * Returns true if the input string indicates a horizontal orientation.
		 * @param an orientation string
		 * @return true if the input string indicates a horizontal orientation
		 */
		public static function isHorizontal(orient:String):Boolean
		{
			return (orient==LEFT_TO_RIGHT || orient==RIGHT_TO_LEFT);
		}

	} // end of class Orientation
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -