home *** CD-ROM | disk | FTP | other *** search
- package com.livebrush.ui
- {
- import com.livebrush.data.Settings;
- import com.livebrush.events.UpdateEvent;
- import com.livebrush.utils.Update;
-
- public class SamplePropsView extends UIView
- {
- public var uiAsset:SamplePropsUI;
-
- public function SamplePropsView(ui:UI)
- {
- super(ui);
- init();
- }
-
- override protected function createView() : void
- {
- this.uiAsset = new SamplePropsUI();
- this.uiAsset.cacheAsBitmap = true;
- this.uiAsset.sampleHead.label.text = "Location".toUpperCase();
- }
-
- override public function set settings(data:Settings) : void
- {
- this.uiAsset.color.selectedColor = data.color;
- }
-
- override public function update(update:Update = null) : void
- {
- if(update.type == UpdateEvent.COLOR)
- {
- this.settings = Settings(update.data);
- }
- }
-
- override public function get settings() : Settings
- {
- var settings:Settings = new Settings();
- settings.color = this.uiAsset.color.selectedColor;
- return settings;
- }
-
- override protected function createController() : void
- {
- controller = new SamplePropsController(this);
- }
- }
- }
-
-