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

📄 scaletype.as

📁 用于flash/flex的 as3的 2D图形图像图表的动态生成
💻 AS
字号:
package flare.scale
{
	/**
	 * Constants defining known scale types, such as linear, log, and
	 * date/time scales.
	 */
	public class ScaleType
	{
		/** Constant indicating an unknown scale. */
		public static const UNKNOWN:String = "unknown";
		/** Constant indicating a categorical scale. */
		public static const CATEGORIES:String = "categories";
		/** Constant indicating an ordinal scale. */
		public static const ORDINAL:String = "ordinal";
		/** Constant indicating a linear numeric scale. */
		public static const LINEAR:String = "linear";
		/** Constant indicating a root-transformed numeric scale. */
		public static const ROOT:String = "root";
		/** Constant indicating a log-transformed numeric scale. */
		public static const LOG:String = "log";
		/** Constant indicating a quantile scale. */
		public static const QUANTILE:String = "quantile";
		/** Constant indicating a date/time scale. */
		public static const TIME:String = "time";
		
		/**
		 * Constructor, throws an error if called, as this is an abstract class.
		 */
		public function ScaleType() {
			throw new Error("This is an abstract class.");
		}
		
		/**
		 * Tests if a given scale type indicates an ordinal scale 
		 * @param type the scale type
		 * @return true if the type indicates an ordinal scale, false otherwise
		 */
		public static function isOrdinal(type:String):Boolean
		{
			return type==ORDINAL || type==CATEGORIES;
		}
		
		/**
		 * Tests if a given scale type indicates a quantitative scale 
		 * @param type the scale type
		 * @return true if the type indicates a quantitative scale,
		 *  false otherwise
		 */
		public static function isQuantitative(type:String):Boolean
		{
			return type==LINEAR || type==ROOT || type==LOG;
		}
		
	} // end of class ScaleType
}

⌨️ 快捷键说明

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