Sha256: 2a16e6d02a95d6a1df653ce5db35de39b3e418fcabe25a25bef47205fa095006

Contents?: true

Size: 1.93 KB

Versions: 28

Compression:

Stored size: 1.93 KB

Contents

import com.asunit.controls.*;
import com.asunit.controls.shapes.*;

class com.asunit.controls.LocalOutputPanelTitleBar extends Rectangle {
	public static var linkageId:String = "__Packages.com.asunit.controls.LocalOutputPanelTitleBar";
	public static var classRef:Function = LocalOutputPanelTitleBar;
	private var controller:LocalOutputPanel;
	private var title:TextField;
	private var txtFormat:TextFormat;

	public function LocalOutputPanelTitleBar() {
		init();
	}
	
	public function init():Void {
		onPress = doPress;
		onRelease = doRelease;
		createAssets();
	}
	
	public function createAssets():Void {
		createTextField("title", 1, 0, 0, width, height);
		title.wordWrap = true;
		title.selectable = false;
		
		txtFormat = new TextFormat();
		txtFormat.font = "Verdana";
		txtFormat.bold = true;
		txtFormat.leftMargin = 2;
		txtFormat.rightMargin = 20;
		txtFormat.size = 10;
		
		title.text = "AsUnit Output Panel [v." + controller.getVersion() + "]";
		title.setTextFormat(txtFormat);
	}
	
	public function doPress():Void {
		onMouseMove = doMouseMove;
	}
	
	public function doMouseMove():Void {
		controller.beginDrag();
		onRelease = doReleaseDrag;
		onMouseMove = doMouseUpdate;
	}
	
	public function doMouseUpdate():Void {
		updateAfterEvent();
	}
	
	public function doReleaseDrag():Void {
		delete onMouseMove;
		onRelease = doRelease;
		controller.endDrag();
	}
	
	public function onReleaseOutside():Void {
		doReleaseDrag();
	}
	
	public function doRelease():Void {
		Sys.println(">> title released");
		delete onMouseMove;
//		controller.toggleVisible();
	}
	
	public function setWidth(num:Number):Number {
		width = Math.round(num);
		title._width = width;
		refreshLayout();
		return width;
	}
	
	public function refreshLayout():Void {
		super.refreshLayout();
		title.width = width;
	}
	
	public static var serializable:Boolean = Object.registerClass(linkageId, classRef);
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
asproject-0.1.28 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.27 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.21 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.31 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.30 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.29 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.33 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.35 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.37 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.32 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.34 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.36 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.44 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.40 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.41 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.38 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.43 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.42 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.68 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as
asproject-0.1.60 templates/asproject/asunit2/project/lib/asunit/com/asunit/controls/LocalOutputPanelTitleBar.as