Creates instance of {@link DynamicUrlController} that will listen to map changes and apply current x,y,r in the
hash part of the URL.

This method should be called after {@link MapWidget} is created.

@param mapWidget main map widget of the application.
491049
@Api
	public static void register(MapWidget mapWidget) {
		if (null == instance) {
			instance = new DynamicUrlController();
		}

		instance.extractHash();
		instance.setMap(mapWidget);
	}
612385
public void setUrl(String newValue)
    throws JspCoreException
    {
        if (newValue == null) {
            throw new JspCoreException(JspConstants.NullUrl);
        }
        this.url = newValue.trim();
    }
1294573
@Override
    protected void defineWidgets() {

        super.defineWidgets();

        // widgets to display
        // new indexsource
        if (m_indexsource.getName() == null) {
            addWidget(new CmsWidgetDialogParameter(m_indexsource, "name", PAGES[0], new CmsInputWidget()));
        } else {
            // existing indexsource
            addWidget(new CmsWidgetDialogParameter(m_indexsource, "name", PAGES[0], new CmsDisplayWidget()));
        }
        addWidget(
            new CmsWidgetDialogParameter(
                m_indexsource,
                "indexerClassName",
                "",
                PAGES[0],
                new CmsComboWidget(getIndexerClassWidgetConfiguration()),
                1,
                1));

    }
863736
public void addUrl(String url) {
		if (url != null && !url.isEmpty()) {
			renderer.addUrl(url);
		}
	}
764910
public static void setController(ServletRequest req, CmsFlexController controller) {

        req.setAttribute(CmsFlexController.ATTRIBUTE_NAME, controller);
    }
1318523
public static void showFeatureDetailWindow(final MapWidget mapWidget, final Feature feature) {
		Window window = FeatureDetailWidgetFactory.createFeatureDetailWindow(feature, false);
		window.setPageTop(mapWidget.getAbsoluteTop() + 10);
		window.setPageLeft(mapWidget.getAbsoluteLeft() + 10);
		window.draw();
	}
56241
public void setUrl(final String url) {
		String currUrl = getUrl();

		if (!Objects.equals(url, currUrl)) {
			getOrCreateComponentModel().url = url;
		}
	}
533227
function(router) {
    var location = get(router, 'location'),
        rootElement = get(this, 'rootElement'),
        applicationController = get(router, 'applicationController');

    Ember.assert("ApplicationView and ApplicationController must be defined on your application", (this.ApplicationView && applicationController) );

    var applicationView = this.ApplicationView.create({
      controller: applicationController
    });
    this._createdApplicationView = applicationView;

    applicationView.appendTo(rootElement);

    router.route(location.getURL());
    location.onUpdateURL(function(url) {
      router.route(url);
    });
  }
872124
private void buildWidget(VectorLayer layer) {
		mapModel = layer.getMapModel();

		setTitle(I18nProvider.getAttribute().getAttributeWindowTitle(""));
		setCanDragReposition(true);
		setCanDragResize(true);

		attributeTable = new FeatureAttributeEditor(layer, true, factory);

		toolStrip = new ToolStrip();
		toolStrip.setWidth100();
		toolStrip.setPadding(WidgetLayout.marginSmall);

		toolStrip.addMember(new ZoomButton());
		editButton = new EditButton();
		LayoutSpacer spacer = new LayoutSpacer();
		spacer.setWidth(2);
		toolStrip.addMember(spacer);
		if (editingAllowed) {
			toolStrip.addMember(editButton);
		}

		savePanel = new HLayout(WidgetLayout.marginSmall);
		saveButton = new SaveButton();
		IButton resetButton = new ResetButton();
		IButton cancelButton = new CancelButton();
		savePanel.addMember(saveButton);
		savePanel.addMember(resetButton);
		savePanel.addMember(cancelButton);
		savePanel.setVisible(false);
		savePanel.setAlign(Alignment.CENTER);
		savePanel.setPadding(WidgetLayout.marginSmall);

		VLayout layout = new VLayout();
		layout.addMember(toolStrip);
		layout.addMember(attributeTable);
		layout.addMember(savePanel);
		layout.setWidth(WidgetLayout.featureAttributeWindowLayoutWidth);
		addItem(layout);

		// Set the save button as disabled at startup:
		addDrawHandler(new DrawHandler() {

			public void onDraw(DrawEvent event) {
				saveButton.setDisabled(true);
			}
		});
	}
849574
@Override
  @UiChild(limit = 1, tagname = "widget")
  public void setChildWidget(final TakesValue<T> pwidget) {
    widget = (Widget) pwidget;
    contents.add(widget);
    setEditor(new ExtendedValueBoxEditor<>(pwidget, this));
    if (pwidget instanceof HasFocusHandlers) {
      ((HasFocusHandlers) pwidget).addFocusHandler(pevent -> addStyleToLabel());
    }
    if (pwidget instanceof HasBlurHandlers) {
      ((HasBlurHandlers) pwidget).addBlurHandler(pevent -> {
        boolean hide = true;
        if (widget instanceof TakesValue<?>) {
          hide = StringUtils.isEmpty(Objects.toString(((TakesValue<?>) widget).getValue(), null));
        }
        if (hide) {
          removeStyleFromLabel();
        }
      });
    }
  }
1235866
public void onChange(Widget widget) {

        if (widget == m_tbHexColor) {
            try {
                CmsColor color = new CmsColor();
                color.setHex(m_tbHexColor.getText());
                m_tbHue.setText(Integer.toString(color.getHue()));
                m_tbSaturation.setText(Integer.toString(color.getSaturation()));
                m_tbBrightness.setText(Integer.toString(color.getValue()));
                m_tbRed.setText(Integer.toString(color.getRed()));
                m_tbGreen.setText(Integer.toString(color.getGreen()));
                m_tbBlue.setText(Integer.toString(color.getBlue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        }

        if ((widget == m_tbRed) || (widget == m_tbGreen) || (widget == m_tbBlue)) {
            // Don't allow this value to overflow or underflow
            try {
                if (Integer.parseInt(((TextBox)widget).getText()) > 255) {
                    ((TextBox)widget).setText("255");
                }
                if (Integer.parseInt(((TextBox)widget).getText()) < 0) {
                    ((TextBox)widget).setText("0");
                }
            } catch (Exception e) {
                // do something.
            }

            m_red = Integer.parseInt(m_tbRed.getText());
            m_green = Integer.parseInt(m_tbGreen.getText());
            m_blue = Integer.parseInt(m_tbBlue.getText());
            m_hue = Integer.parseInt(m_tbHue.getText());
            m_saturation = Integer.parseInt(m_tbSaturation.getText());
            m_brightness = Integer.parseInt(m_tbBrightness.getText());

            try {
                CmsColor color = new CmsColor();
                color.setRGB(m_red, m_green, m_blue);
                m_tbHue.setText(Integer.toString(color.getHue()));
                m_tbSaturation.setText(Integer.toString(color.getSaturation()));
                m_tbBrightness.setText(Integer.toString(color.getValue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        } else if ((widget == m_tbHue) || (widget == m_tbSaturation) || (widget == m_tbBrightness)) {
            try {
                if (Integer.parseInt(m_tbHue.getText()) > 359) {
                    m_tbHue.setText("359");
                }

                if (Integer.parseInt(m_tbSaturation.getText()) > 100) {
                    m_tbSaturation.setText("100");
                }

                if (Integer.parseInt(m_tbBrightness.getText()) > 100) {
                    m_tbBrightness.setText("100");
                }
            } catch (Exception e) {
                // do something.
            }

            m_red = Integer.parseInt(m_tbRed.getText());
            m_green = Integer.parseInt(m_tbGreen.getText());
            m_blue = Integer.parseInt(m_tbBlue.getText());
            m_hue = Integer.parseInt(m_tbHue.getText());
            m_saturation = Integer.parseInt(m_tbSaturation.getText());
            m_brightness = Integer.parseInt(m_tbBrightness.getText());

            // Figure out colors
            try {
                CmsColor color = new CmsColor();
                color.setHSV(m_hue, m_saturation, m_brightness);
                m_tbRed.setText(Integer.toString(color.getRed()));
                m_tbGreen.setText(Integer.toString(color.getGreen()));
                m_tbBlue.setText(Integer.toString(color.getBlue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        }

        // Let the sliders know something's changed
        updateSliders();
    }
1369480
public void setController(@Nullable DraweeController draweeController) {
    mDraweeHolder.setController(draweeController);
    super.setImageDrawable(mDraweeHolder.getTopLevelDrawable());
  }
414201
public void setDiagramControllerAndPalettes(IControllerDiagramUml<?, ?> controllerDiagramUml, Component palletteDiagram, Component palletteZoom) {
    this.activeControllerDiagramUml = controllerDiagramUml;
    if(currentPaletteDiagram != null) {
      this.actionPropertiesPane.remove(currentPaletteDiagram);
    }
    this.actionPropertiesPane.add(palletteDiagram, BorderLayout.CENTER);
    currentPaletteDiagram = palletteDiagram;
    if(!isZoomPalletteAdded) {
      this.actionPropertiesPane.add(palletteZoom, BorderLayout.SOUTH);
      isZoomPalletteAdded = true;
    }
  }
114906
@Override
    protected void defineWidgets() {

        initModule();

        setKeyPrefix(KEY_PREFIX);

        List destinations = getDestinations();

        addWidget(new CmsWidgetDialogParameter(m_exportpoint, "uri", PAGES[0], new CmsVfsFileWidget()));
        addWidget(
            new CmsWidgetDialogParameter(
                m_exportpoint,
                "configuredDestination",
                PAGES[0],
                new CmsComboWidget(destinations)));
        addWidget(new CmsWidgetDialogParameter(m_exportpoint, "destinationPath", PAGES[0], new CmsDisplayWidget()));

    }
650946
@Override
    protected void defineWidgets() {

        setKeyPrefix(KEY_PREFIX);

        // initialize the cache object to use for the dialog
        CmsFlexController controller = (CmsFlexController)getJsp().getRequest().getAttribute(
            CmsFlexController.ATTRIBUTE_NAME);
        CmsFlexCache cache = controller.getCmsCache();

        setOffline(true);
        setOnline(true);
        setMode(MODE_ALL);

        // widgets to display
        if (cache.cacheOffline()) {
            addWidget(new CmsWidgetDialogParameter(this, "offline", PAGES[0], new CmsCheckboxWidget()));
        }
        addWidget(new CmsWidgetDialogParameter(this, "online", PAGES[0], new CmsCheckboxWidget()));
        addWidget(new CmsWidgetDialogParameter(this, "mode", PAGES[0], new CmsRadioSelectWidget(getModes())));
    }
1008764
function (mapWidth, mapHeight, zoomOptions) {
            var self = this;
            var mousedown = false;
            var previousX = 0;
            var previousY = 0;
            var fnZoomButtons = {
                "reset": function () {
                    self.$container.trigger("zoom", {"level": 0});
                },
                "in": function () {
                    self.$container.trigger("zoom", {"level": "+1"});
                },
                "out": function () {
                    self.$container.trigger("zoom", {"level": -1});
                }
            };

            // init Zoom data
            $.extend(self.zoomData, {
                zoomLevel: 0,
                panX: 0,
                panY: 0
            });

            // init zoom buttons
            $.each(zoomOptions.buttons, function(type, opt) {
                if (fnZoomButtons[type] === undefined) throw new Error("Unknown zoom button '" + type + "'");
                // Create div with classes, contents and title (for tooltip)
                var $button = $("<div>").addClass(opt.cssClass)
                    .html(opt.content)
                    .attr("title", opt.title);
                // Assign click event
                $button.on("click." + pluginName, fnZoomButtons[type]);
                // Append to map
                self.$map.append($button);
            });

            // Update the zoom level of the map on mousewheel
            if (self.options.map.zoom.mousewheel) {
                self.$map.on("mousewheel." + pluginName, function (e) {
                    var zoomLevel = (e.deltaY > 0) ? 1 : -1;
                    var coord = self.mapPagePositionToXY(e.pageX, e.pageY);

                    self.$container.trigger("zoom", {
                        "fixedCenter": true,
                        "level": self.zoomData.zoomLevel + zoomLevel,
                        "x": coord.x,
                        "y": coord.y
                    });

                    e.preventDefault();
                });
            }

            // Update the zoom level of the map on touch pinch
            if (self.options.map.zoom.touch) {
                self.$map.on("touchstart." + pluginName, function (e) {
                    if (e.originalEvent.touches.length === 2) {
                        self.zoomCenterX = (e.originalEvent.touches[0].pageX + e.originalEvent.touches[1].pageX) / 2;
                        self.zoomCenterY = (e.originalEvent.touches[0].pageY + e.originalEvent.touches[1].pageY) / 2;
                        self.previousPinchDist = Math.sqrt(Math.pow((e.originalEvent.touches[1].pageX - e.originalEvent.touches[0].pageX), 2) + Math.pow((e.originalEvent.touches[1].pageY - e.originalEvent.touches[0].pageY), 2));
                    }
                });

                self.$map.on("touchmove." + pluginName, function (e) {
                    var pinchDist = 0;
                    var zoomLevel = 0;

                    if (e.originalEvent.touches.length === 2) {
                        pinchDist = Math.sqrt(Math.pow((e.originalEvent.touches[1].pageX - e.originalEvent.touches[0].pageX), 2) + Math.pow((e.originalEvent.touches[1].pageY - e.originalEvent.touches[0].pageY), 2));

                        if (Math.abs(pinchDist - self.previousPinchDist) > 15) {
                            var coord = self.mapPagePositionToXY(self.zoomCenterX, self.zoomCenterY);
                            zoomLevel = (pinchDist - self.previousPinchDist) / Math.abs(pinchDist - self.previousPinchDist);
                            self.$container.trigger("zoom", {
                                "fixedCenter": true,
                                "level": self.zoomData.zoomLevel + zoomLevel,
                                "x": coord.x,
                                "y": coord.y
                            });
                            self.previousPinchDist = pinchDist;
                        }
                        return false;
                    }
                });
            }

            // When the user drag the map, prevent to move the clicked element instead of dragging the map (behaviour seen with Firefox)
            self.$map.on("dragstart", function() {
                return false;
            });

            // Panning
            var panningMouseUpTO = null;
            var panningMouseMoveTO = null;
            $("body").on("mouseup." + pluginName + (zoomOptions.touch ? " touchend." + pluginName : ""), function () {
                mousedown = false;
                clearTimeout(panningMouseUpTO);
                clearTimeout(panningMouseMoveTO);
                panningMouseUpTO = setTimeout(function () {
                    self.panning = false;
                }, self.panningEndFilteringTO);
            });

            self.$map.on("mousedown." + pluginName + (zoomOptions.touch ? " touchstart." + pluginName : ""), function (e) {
                clearTimeout(panningMouseUpTO);
                clearTimeout(panningMouseMoveTO);
                if (e.pageX !== undefined) {
                    mousedown = true;
                    previousX = e.pageX;
                    previousY = e.pageY;
                } else {
                    if (e.originalEvent.touches.length === 1) {
                        mousedown = true;
                        previousX = e.originalEvent.touches[0].pageX;
                        previousY = e.originalEvent.touches[0].pageY;
                    }
                }
            }).on("mousemove." + pluginName + (zoomOptions.touch ? " touchmove." + pluginName : ""), function (e) {
                var currentLevel = self.zoomData.zoomLevel;
                var pageX = 0;
                var pageY = 0;

                clearTimeout(panningMouseUpTO);
                clearTimeout(panningMouseMoveTO);

                if (e.pageX !== undefined) {
                    pageX = e.pageX;
                    pageY = e.pageY;
                } else {
                    if (e.originalEvent.touches.length === 1) {
                        pageX = e.originalEvent.touches[0].pageX;
                        pageY = e.originalEvent.touches[0].pageY;
                    } else {
                        mousedown = false;
                    }
                }

                if (mousedown && currentLevel !== 0) {
                    var offsetX = (previousX - pageX) / (1 + (currentLevel * zoomOptions.step)) * (mapWidth / self.paper.width);
                    var offsetY = (previousY - pageY) / (1 + (currentLevel * zoomOptions.step)) * (mapHeight / self.paper.height);
                    var panX = Math.min(Math.max(0, self.currentViewBox.x + offsetX), (mapWidth - self.currentViewBox.w));
                    var panY = Math.min(Math.max(0, self.currentViewBox.y + offsetY), (mapHeight - self.currentViewBox.h));

                    if (Math.abs(offsetX) > 5 || Math.abs(offsetY) > 5) {
                        $.extend(self.zoomData, {
                            panX: panX,
                            panY: panY,
                            zoomX: panX + self.currentViewBox.w / 2,
                            zoomY: panY + self.currentViewBox.h / 2
                        });
                        self.setViewBox(panX, panY, self.currentViewBox.w, self.currentViewBox.h);

                        panningMouseMoveTO = setTimeout(function () {
                            self.$map.trigger("afterPanning", {
                                x1: panX,
                                y1: panY,
                                x2: (panX + self.currentViewBox.w),
                                y2: (panY + self.currentViewBox.h)
                            });
                        }, self.panningFilteringTO);

                        previousX = pageX;
                        previousY = pageY;
                        self.panning = true;
                    }
                    return false;
                }
            });
        }
1343219
@Api
	public void setUrl(String url) throws LayerException {
		try {
			this.url = url;
			Map<String, Object> params = new HashMap<String, Object>();
			params.put("url", url);
			DataStore store = DataStoreFactory.create(params);
			setDataStore(store);
		} catch (IOException ioe) {
			throw new LayerException(ioe, ExceptionCode.INVALID_SHAPE_FILE_URL, url);
		}
	}