1//////////////////////////////////////////////////////////////////////////////// 2// 3// ADOBE SYSTEMS INCORPORATED 4// Copyright 2003-2006 Adobe Systems Incorporated 5// All Rights Reserved. 6// 7// NOTICE: Adobe permits you to use, modify, and distribute this file 8// in accordance with the terms of the license agreement accompanying it. 9// 10//////////////////////////////////////////////////////////////////////////////// 11 12package mx.skins.halo 13{ 14 15import flash.display.Graphics; 16import mx.skins.ProgrammaticSkin; 17 18/** 19 * The skin for the drop indicator of a list-based control. 20 * 21 * @langversion 3.0 22 * @playerversion Flash 9 23 * @playerversion AIR 1.1 24 * @productversion Flex 3 25 */ 26public class ListDropIndicator extends ProgrammaticSkin 27{ 28 include "../../core/Version.as"; 29 30 //-------------------------------------------------------------------------- 31 // 32 // Constructor 33 // 34 //-------------------------------------------------------------------------- 35 36 /** 37 * Constructor. 38 * 39 * @langversion 3.0 40 * @playerversion Flash 9 41 * @playerversion AIR 1.1 42 * @productversion Flex 3 43 */ 44 public function ListDropIndicator() 45 { 46 super(); 47 } 48 49 //-------------------------------------------------------------------------- 50 // 51 // Properties 52 // 53 //-------------------------------------------------------------------------- 54 55 //---------------------------------- 56 // direction 57 //---------------------------------- 58 59 /** 60 * Should the skin draw a horizontal line or vertical line. 61 * Default is horizontal. 62 * 63 * @langversion 3.0 64 * @playerversion Flash 9 65 * @playerversion AIR 1.1 66 * @productversion Flex 3 67 */ 68 public var direction:String = "horizontal"; 69 70 //-------------------------------------------------------------------------- 71 // 72 // Overridden methods 73 // 74 //-------------------------------------------------------------------------- 75 76 /** 77 * @private 78 */ 79 override protected function updateDisplayList(w:Number, h:Number):void 80 { 81 super.updateDisplayList(w, h); 82 83 var g:Graphics = graphics; 84 85 g.clear(); 86 g.lineStyle(2, 0x2B333C); 87 88 // Line 89 if (direction == "horizontal") 90 { 91 g.moveTo(0, 0); 92 g.lineTo(w, 0); 93 } 94 else 95 { 96 g.moveTo(0, 0); 97 g.lineTo(0, h); 98 } 99 } 100} 101 102} 103