/* start module: info_traffico */
$pyjs['loaded_modules']['info_traffico'] = function (__mod_name__) {
	if($pyjs['loaded_modules']['info_traffico']['__was_initialized__']) return $pyjs['loaded_modules']['info_traffico'];
	var $m = $pyjs['loaded_modules']['info_traffico'];
	$m['__repr__'] = function() { return '<module: info_traffico>'; };
	$m['__was_initialized__'] = true;
	if ((__mod_name__ === null) || (typeof __mod_name__ == 'undefined')) __mod_name__ = 'info_traffico';
	$m['__name__'] = __mod_name__;


	$m['RootPanel'] = $p['___import___']('pyjamas.ui.RootPanel.RootPanel', null, null, false);
	$m['VerticalPanel'] = $p['___import___']('pyjamas.ui.VerticalPanel.VerticalPanel', null, null, false);
	$m['HorizontalPanel'] = $p['___import___']('pyjamas.ui.HorizontalPanel.HorizontalPanel', null, null, false);
	$m['VerticalSplitPanel'] = $p['___import___']('pyjamas.ui.VerticalSplitPanel.VerticalSplitPanel', null, null, false);
	$m['SimplePanel'] = $p['___import___']('pyjamas.ui.SimplePanel.SimplePanel', null, null, false);
	$m['FlowPanel'] = $p['___import___']('pyjamas.ui.FlowPanel.FlowPanel', null, null, false);
	$m['DisclosurePanel'] = $p['___import___']('pyjamas.ui.DisclosurePanel.DisclosurePanel', null, null, false);
	$m['TabPanel'] = $p['___import___']('pyjamas.ui.TabPanel.TabPanel', null, null, false);
	$m['Grid'] = $p['___import___']('pyjamas.ui.Grid.Grid', null, null, false);
	$m['Frame'] = $p['___import___']('pyjamas.ui.Frame.Frame', null, null, false);
	$m['TextBox'] = $p['___import___']('pyjamas.ui.TextBox.TextBox', null, null, false);
	$m['TextArea'] = $p['___import___']('pyjamas.ui.TextArea.TextArea', null, null, false);
	$m['HTML'] = $p['___import___']('pyjamas.ui.HTML.HTML', null, null, false);
	$m['HTMLPanel'] = $p['___import___']('pyjamas.ui.HTMLPanel.HTMLPanel', null, null, false);
	$m['Anchor'] = $p['___import___']('pyjamas.ui.Anchor.Anchor', null, null, false);
	$m['Label'] = $p['___import___']('pyjamas.ui.Label.Label', null, null, false);
	$m['CheckBox'] = $p['___import___']('pyjamas.ui.CheckBox.CheckBox', null, null, false);
	$m['ListBox'] = $p['___import___']('pyjamas.ui.ListBox.ListBox', null, null, false);
	$m['Button'] = $p['___import___']('pyjamas.ui.Button.Button', null, null, false);
	$m['RadioButton'] = $p['___import___']('pyjamas.ui.RadioButton.RadioButton', null, null, false);
	$m['PopupPanel'] = $p['___import___']('pyjamas.ui.PopupPanel.PopupPanel', null, null, false);
	$m['KeyboardHandler'] = $p['___import___']('pyjamas.ui.KeyboardListener.KeyboardHandler', null, null, false);
	$m['FocusHandler'] = $p['___import___']('pyjamas.ui.FocusListener.FocusHandler', null, null, false);
	$m['Tree'] = $p['___import___']('pyjamas.ui.Tree.Tree', null, null, false);
	$m['TreeItem'] = $p['___import___']('pyjamas.ui.Tree.TreeItem', null, null, false);
	$m['Image'] = $p['___import___']('pyjamas.ui.Image.Image', null, null, false);
	$m['HasAlignment'] = $p['___import___']('pyjamas.ui.HasAlignment', null, null, false);
	$m['MenuBar'] = $p['___import___']('pyjamas.ui.MenuBar.MenuBar', null, null, false);
	$m['MenuItem'] = $p['___import___']('pyjamas.ui.MenuItem.MenuItem', null, null, false);
	$m['Widget'] = $p['___import___']('pyjamas.ui.Widget.Widget', null, null, false);
	$m['Hyperlink'] = $p['___import___']('pyjamas.ui.Hyperlink.Hyperlink', null, null, false);
	$m['Window'] = $p['___import___']('pyjamas.Window', null, null, false);
	$m['Timer'] = $p['___import___']('pyjamas.Timer.Timer', null, null, false);
	$m['JSONProxy'] = $p['___import___']('pyjamas.JSONService.JSONProxy', null, null, false);
	$m['History'] = $p['___import___']('pyjamas.History', null, null, false);
	$m['DOM'] = $p['___import___']('pyjamas.DOM', null, null, false);
	$m['prnt'] = $p['___import___']('prnt.prnt', null, null, false);
	$m['StyledFixedColumnFlexTable'] = $p['___import___']('util.StyledFixedColumnFlexTable', null, null, false);
	$m['HTMLFlowPanel'] = $p['___import___']('util.HTMLFlowPanel', null, null, false);
	$m['DP'] = $p['___import___']('util.DP', null, null, false);
	$m['VP'] = $p['___import___']('util.VP', null, null, false);
	$m['HP'] = $p['___import___']('util.HP', null, null, false);
	$m['GP'] = $p['___import___']('util.GP', null, null, false);
	$m['SP'] = $p['___import___']('util.SP', null, null, false);
	$m['get_checked_radio'] = $p['___import___']('util.get_checked_radio', null, null, false);
	$m['HidingPanel'] = $p['___import___']('util.HidingPanel', null, null, false);
	$m['ValidationErrorRemover'] = $p['___import___']('util.ValidationErrorRemover', null, null, false);
	$m['LoadingButton'] = $p['___import___']('util.LoadingButton', null, null, false);
	$m['MyAnchor'] = $p['___import___']('util.MyAnchor', null, null, false);
	$m['date'] = $p['___import___']('datetime.date', null, null, false);
	$m['time'] = $p['___import___']('datetime.time', null, null, false);
	$m['datetime'] = $p['___import___']('datetime.datetime', null, null, false);
	$m['timedelta'] = $p['___import___']('datetime.timedelta', null, null, false);
	$m['Calendar'] = $p['___import___']('Calendar.Calendar', null, null, false);
	$m['DateField'] = $p['___import___']('Calendar.DateField', null, null, false);
	$m['TimeField'] = $p['___import___']('Calendar.TimeField', null, null, false);
	$m['MapPanel'] = $p['___import___']('map.MapPanel', null, null, false);
	$m['Layer'] = $p['___import___']('map.Layer', null, null, false);
	$m['LayerPanel'] = $p['___import___']('map.LayerPanel', null, null, false);
	$m['DissolvingPopup'] = $p['___import___']('DissolvingPopup.DissolvingPopup', null, null, false);
	$m['JsonHandler'] = $p['___import___']('util.JsonHandler', null, null, false);
	$m['redirect'] = $p['___import___']('util.redirect', null, null, false);
	$m['client'] = $m['JSONProxy']('/json/', $p['list'](['stato_traffico']));
	$m['InfoTrafficoPanel'] = (function(){
		var $cls_definition = new Object();
		var $method;
		$cls_definition['__module__'] = 'info_traffico';
		$method = $pyjs__bind_method2('__init__', function(owner) {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
				owner = arguments[1];
			}

			$m['SimplePanel']['__init__'](self);
			self['owner'] = owner;
			self['map'] = null;
			self['layer_in'] = null;
			self['layer_out'] = null;
			self['base'] = $m['VP'](self, $p['list']([$p['dict']([['class', $m['LoadingButton']], ['args', $p['list'](['Traffico in ingresso', $p['getattr'](self, 'onTrafficoIn')])], ['height', null], ['name', 'in']]), $p['dict']([['class', $m['LoadingButton']], ['args', $p['list'](['Traffico in uscita', $p['getattr'](self, 'onTrafficoOut')])], ['height', null], ['name', 'out']])]));
			self['add']($p['getattr'](self, 'base'));
			return null;
		}
	, 1, [null,null,['self'],['owner']]);
		$cls_definition['__init__'] = $method;
		$method = $pyjs__bind_method2('onTrafficoIn', function() {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
			}

			if ($p['bool'](($p['getattr'](self, 'layer_in') === null))) {
				self['base']['by_name']('in')['start']();
				$m['client']['stato_traffico']('in', $m['JsonHandler']($p['getattr'](self, 'onTrafficoInDone')));
			}
			else {
				self['layer_in']['setVisible'](true);
				self['layer_in']['centerOnMap']();
			}
			return null;
		}
	, 1, [null,null,['self']]);
		$cls_definition['onTrafficoIn'] = $method;
		$method = $pyjs__bind_method2('onTrafficoOut', function() {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
			}

			if ($p['bool'](($p['getattr'](self, 'layer_out') === null))) {
				self['base']['by_name']('out')['start']();
				$m['client']['stato_traffico']('out', $m['JsonHandler']($p['getattr'](self, 'onTrafficoOutDone')));
			}
			else {
				self['layer_out']['setVisible'](true);
				self['layer_out']['centerOnMap']();
			}
			return null;
		}
	, 1, [null,null,['self']]);
		$cls_definition['onTrafficoOut'] = $method;
		$method = $pyjs__bind_method2('onTrafficoInDone', function(res) {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
				res = arguments[1];
			}

			self['map']['hideAllLayers']();
			self['layer_in'] = $m['Layer']('traffico-in', 'Traffico in ingresso', $p['getattr'](self, 'map'));
			self['layer_in']['deserialize'](res['__getitem__']('mappa'));
			self['layer_in']['centerOnMap']();
			self['base']['by_name']('in')['stop']();
			return null;
		}
	, 1, [null,null,['self'],['res']]);
		$cls_definition['onTrafficoInDone'] = $method;
		$method = $pyjs__bind_method2('onTrafficoOutDone', function(res) {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
				res = arguments[1];
			}

			self['map']['hideAllLayers']();
			self['layer_out'] = $m['Layer']('traffico-out', 'Traffico in uscita', $p['getattr'](self, 'map'));
			self['layer_out']['deserialize'](res['__getitem__']('mappa'));
			self['layer_out']['centerOnMap']();
			self['base']['by_name']('out')['stop']();
			return null;
		}
	, 1, [null,null,['self'],['res']]);
		$cls_definition['onTrafficoOutDone'] = $method;
		$method = $pyjs__bind_method2('setMap', function(map) {
			if (this['__is_instance__'] === true) {
				var self = this;
			} else {
				var self = arguments[0];
				map = arguments[1];
			}

			self['map'] = map;
			return null;
		}
	, 1, [null,null,['self'],['map']]);
		$cls_definition['setMap'] = $method;
		var $bases = new Array($m['SimplePanel']);
		var $data = $p['dict']();
		for (var $item in $cls_definition) { $data['__setitem__']($item, $cls_definition[$item]); }
		return $p['_create_class']('InfoTrafficoPanel', $p['tuple']($bases), $data);
	})();
	return this;
}; /* end info_traffico */


/* end module: info_traffico */


/*
PYJS_DEPS: ['pyjamas.ui.RootPanel.RootPanel', 'pyjamas', 'pyjamas.ui', 'pyjamas.ui.RootPanel', 'pyjamas.ui.VerticalPanel.VerticalPanel', 'pyjamas.ui.VerticalPanel', 'pyjamas.ui.HorizontalPanel.HorizontalPanel', 'pyjamas.ui.HorizontalPanel', 'pyjamas.ui.VerticalSplitPanel.VerticalSplitPanel', 'pyjamas.ui.VerticalSplitPanel', 'pyjamas.ui.SimplePanel.SimplePanel', 'pyjamas.ui.SimplePanel', 'pyjamas.ui.FlowPanel.FlowPanel', 'pyjamas.ui.FlowPanel', 'pyjamas.ui.DisclosurePanel.DisclosurePanel', 'pyjamas.ui.DisclosurePanel', 'pyjamas.ui.TabPanel.TabPanel', 'pyjamas.ui.TabPanel', 'pyjamas.ui.Grid.Grid', 'pyjamas.ui.Grid', 'pyjamas.ui.Frame.Frame', 'pyjamas.ui.Frame', 'pyjamas.ui.TextBox.TextBox', 'pyjamas.ui.TextBox', 'pyjamas.ui.TextArea.TextArea', 'pyjamas.ui.TextArea', 'pyjamas.ui.HTML.HTML', 'pyjamas.ui.HTML', 'pyjamas.ui.HTMLPanel.HTMLPanel', 'pyjamas.ui.HTMLPanel', 'pyjamas.ui.Anchor.Anchor', 'pyjamas.ui.Anchor', 'pyjamas.ui.Label.Label', 'pyjamas.ui.Label', 'pyjamas.ui.CheckBox.CheckBox', 'pyjamas.ui.CheckBox', 'pyjamas.ui.ListBox.ListBox', 'pyjamas.ui.ListBox', 'pyjamas.ui.Button.Button', 'pyjamas.ui.Button', 'pyjamas.ui.RadioButton.RadioButton', 'pyjamas.ui.RadioButton', 'pyjamas.ui.PopupPanel.PopupPanel', 'pyjamas.ui.PopupPanel', 'pyjamas.ui.KeyboardListener.KeyboardHandler', 'pyjamas.ui.KeyboardListener', 'pyjamas.ui.FocusListener.FocusHandler', 'pyjamas.ui.FocusListener', 'pyjamas.ui.Tree.Tree', 'pyjamas.ui.Tree', 'pyjamas.ui.Tree.TreeItem', 'pyjamas.ui.Image.Image', 'pyjamas.ui.Image', 'pyjamas.ui.HasAlignment', 'pyjamas.ui.MenuBar.MenuBar', 'pyjamas.ui.MenuBar', 'pyjamas.ui.MenuItem.MenuItem', 'pyjamas.ui.MenuItem', 'pyjamas.ui.Widget.Widget', 'pyjamas.ui.Widget', 'pyjamas.ui.Hyperlink.Hyperlink', 'pyjamas.ui.Hyperlink', 'pyjamas.Window', 'pyjamas.Timer.Timer', 'pyjamas.Timer', 'pyjamas.JSONService.JSONProxy', 'pyjamas.JSONService', 'pyjamas.History', 'pyjamas.DOM', 'prnt.prnt', 'prnt', 'util.StyledFixedColumnFlexTable', 'util', 'util.HTMLFlowPanel', 'util.DP', 'util.VP', 'util.HP', 'util.GP', 'util.SP', 'util.get_checked_radio', 'util.HidingPanel', 'util.ValidationErrorRemover', 'util.LoadingButton', 'util.MyAnchor', 'datetime.date', 'datetime', 'datetime.time', 'datetime.datetime', 'datetime.timedelta', 'Calendar.Calendar', 'Calendar', 'Calendar.DateField', 'Calendar.TimeField', 'map.MapPanel', 'map', 'map.Layer', 'map.LayerPanel', 'DissolvingPopup.DissolvingPopup', 'DissolvingPopup', 'util.JsonHandler', 'util.redirect']
*/
