1//////////////////////////////////////////////////////////////////////////////// 2// 3// ADOBE SYSTEMS INCORPORATED 4// Copyright 2005-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 haloclassic 13{ 14 15import flash.display.Graphics; 16import mx.core.mx_internal; 17import mx.skins.ProgrammaticSkin; 18 19/** 20 * The skin for all the states of the icon in a PopUpButton. 21 */ 22public class PopUpIcon extends ProgrammaticSkin 23{ 24 include "../mx/core/Version.as"; 25 26 //-------------------------------------------------------------------------- 27 // 28 // Constructor 29 // 30 //-------------------------------------------------------------------------- 31 32 /** 33 * Constructor 34 */ 35 public function PopUpIcon() 36 { 37 super(); 38 } 39 40 //-------------------------------------------------------------------------- 41 // 42 // Variables 43 // 44 //-------------------------------------------------------------------------- 45 46 /** 47 * @private 48 */ 49 mx_internal var arrowColor:uint = 0x111111; 50 51 //-------------------------------------------------------------------------- 52 // 53 // Overridden properties 54 // 55 //-------------------------------------------------------------------------- 56 57 //---------------------------------- 58 // measuredWidth 59 //---------------------------------- 60 61 /** 62 * @private 63 */ 64 override public function get measuredWidth():Number 65 { 66 return 6; 67 } 68 69 //---------------------------------- 70 // measuredHeight 71 //---------------------------------- 72 73 /** 74 * @private 75 */ 76 override public function get measuredHeight():Number 77 { 78 return 4; 79 } 80 81 //-------------------------------------------------------------------------- 82 // 83 // Overridden methods 84 // 85 //-------------------------------------------------------------------------- 86 87 /** 88 * @private 89 */ 90 override protected function updateDisplayList(w:Number, h:Number):void 91 { 92 super.updateDisplayList(w, h); 93 94 var g:Graphics = graphics; 95 96 g.clear(); 97 g.beginFill(mx_internal::arrowColor); 98 g.moveTo(0, height / 2); 99 g.lineTo(-w / 2, -h / 2); 100 g.lineTo(w / 2, -h / 2); 101 g.lineTo(0, h / 2); 102 g.endFill(); 103 } 104} 105 106} 107