<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="192" height="26" xmlns="tanakaLibrary.sharedComponent.*">
<mx:Binding source="nsHour.value" destination="_valueHour" />
<mx:Binding source="nsMinitus.value" destination="_valueMinit" />
<mx:Script>
	<![CDATA[
		
		private var _enabledEx:Boolean;
		
		[Bindable]
		private var _valueHour:Number;
		
		[Bindable]
		private var _valueMinit:Number;
		
		[Bindable(event="valueChanged")]
		public function get value():String{
			
			var strHour:String;
			var strMinits:String;
			
			if(_valueHour>9){
				strHour = String(_valueHour);
			}else{
				strHour = "0" + String(_valueHour);
			}
			if(_valueMinit>9){
				strMinits = String(_valueMinit);
			}else{
				strMinits = "0" + String(_valueMinit);
			}
			
			return strHour + strMinits;
		}
		
		public function set value(timeStr:String):void{			
			_valueHour = Number(timeStr.toString().substr(0,2));
			_valueMinit = Number(timeStr.toString().substr(2,2));
			dispatchEvent(new Event("valueChanged"));
		}
		
		// 編集可能プロパティ設定処理
		public function set enabledEx(flg:Boolean):void{
			nsHour.enabled = flg;
			nsMinitus.enabled = flg;
			_enabledEx = flg;
		}
		
		// 編集可能プロパティ取得処理
		public function get enabledEx():Boolean{
			return _enabledEx;
		}

		public function changeHour():void{
			_valueHour = nsHour.value;
			dispatchEvent(new Event("valueChanged"));
		}
		
		public function changeMinits():void{
			_valueMinit = nsMinitus.value;
			dispatchEvent(new Event("valueChanged"));
		}
		
	]]>
</mx:Script>

	<TsNumericStepper id="nsHour" minimum="0" maximum="23" value="{_valueHour}" change="changeHour()"/>
	<TsLabel text="時" />
	<TsNumericStepper id="nsMinitus" minimum="0" maximum="59" value="{_valueMinit}" change="changeMinits()"/>
	<TsLabel text="分"/>
	
</mx:HBox>
