source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/widget/LinkButtonTab.as@ 1227

Last change on this file since 1227 was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 1.7 KB
Line 
1package gov.va.med.edp.widget
2{
3 import gov.va.med.edp.skins.LinkButtonTabSkin;
4
5 import mx.controls.Button;
6 import mx.core.mx_internal;
7 import mx.styles.CSSStyleDeclaration;
8 import mx.styles.StyleManager;
9
10 use namespace mx_internal;
11
12 public class LinkButtonTab extends Button
13 {
14 private static var classConstructed:Boolean = classConstruct();
15
16 private static function classConstruct():Boolean {
17 // If there is no CSS definition for our style,
18 // then create one and set the default value.
19
20 if (!StyleManager.getStyleDeclaration("LinkButtonTab"))
21 {
22 var style:CSSStyleDeclaration = new CSSStyleDeclaration();
23 style.defaultFactory = function():void {
24 this.skin = LinkButtonTabSkin;
25
26 this.upSkin = LinkButtonTabSkin;
27 this.downSkin = LinkButtonTabSkin;
28 this.disabledSkin = LinkButtonTabSkin;
29 this.overSkin = LinkButtonTabSkin;
30 this.selectedUpSkin = LinkButtonTabSkin;
31 this.selectedDownSkin = LinkButtonTabSkin;
32 this.selectedOverSkin = LinkButtonTabSkin;
33 this.selectedDisabledSkin = LinkButtonTabSkin;
34 }
35 StyleManager.setStyleDeclaration("LinkButtonTab", style, true);
36 }
37 return true;
38 }
39
40 public function LinkButtonTab()
41 {
42 super();
43 // Tabs are not tab-enabled.
44 // The TabNavigator handles all focus management.
45 focusEnabled = false;
46 }
47
48 override protected function updateDisplayList(unscaledWidth:Number,
49 unscaledHeight:Number):void
50 {
51 super.updateDisplayList(unscaledWidth, unscaledHeight);
52
53 if (currentIcon)
54 {
55 currentIcon.scaleX = 1.0;
56 currentIcon.scaleY = 1.0;
57 }
58
59 viewIcon();
60 }
61 }
62}
Note: See TracBrowser for help on using the repository browser.