home *** CD-ROM | disk | FTP | other *** search
- package com.livebrush.ui
- {
- import flash.display.MovieClip;
- import flash.display.Sprite;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
-
- [Embed(source="/_assets/assets.swf", symbol="symbol241")]
- public class PanelTitleBar extends Sprite
- {
- public var closeBtn:CloseButton;
-
- public var bg:MovieClip;
-
- public var label:TextField;
-
- public var helpBtn:HelpButton;
-
- public function PanelTitleBar()
- {
- super();
- this.init();
- }
-
- public function setWidth(w:Number) : void
- {
- this.bg.width = w;
- this.closeBtn.x = this.bg.width - 18;
- this.showHelp = this.helpBtn.visible;
- }
-
- private function init() : void
- {
- this.label.autoSize = TextFieldAutoSize.LEFT;
- }
-
- public function set showHelp(b:Boolean) : void
- {
- this.helpBtn.visible = b;
- if(this.closeBtn.visible)
- {
- this.helpBtn.x = this.closeBtn.x - this.helpBtn.width - 5;
- }
- else
- {
- this.helpBtn.x = this.closeBtn.x;
- }
- }
-
- public function set showClose(b:Boolean) : void
- {
- this.closeBtn.visible = b;
- if(b)
- {
- this.helpBtn.x = this.closeBtn.x - this.helpBtn.width + 5;
- }
- else
- {
- this.helpBtn.x = this.closeBtn.x;
- }
- }
- }
- }
-
-