public void show() { if (this.toasterWindow == null) { getToasterWindow(); } this.toasterWindow.setZIndex(Constants.Z_INDEX_ON_TOP); this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10; this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30; this.toasterWindow.setLeft(this.left); this.toasterWindow.setTop(this.top); this.toasterWindow.animateFade(100); this.isVisible = true; }
public void addErrorMessage(String error) { Date d = new Date(); String timeStamp = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm").format(d); Label l = new Label(timeStamp + " " + error); l.setCanSelectText(true); l.setStyleName("n52_sensorweb_client_toasterErrorMsg"); l.setAutoHeight(); for (int i = 0; i < this.messages.size(); i++) { this.layout.removeMember(this.messages.get(i)); } this.messages.add(l); for (int i = this.messages.size() - 1; i >= 0; i--) { this.layout.addMember(this.messages.get(i)); } this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10; this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30; this.toasterWindow.setLeft(this.left); this.toasterWindow.setTop(this.top); animateToaster(); }
private void getToasterWindow() { if (this.toasterWindow == null) { this.toasterWindow = new Window(); this.layout = new VLayout(); this.layout.setTabIndex( -1); this.toasterWindow.setParentElement(this.parentElem); this.toasterWindow.setAnimateFadeTime(fadeout); this.toasterWindow.setHeight(this.height); this.toasterWindow.setWidth(this.width); this.toasterWindow.setTitle(this.title); this.toasterWindow.setAutoSize(new Boolean(false)); this.toasterWindow.setOverflow(Overflow.AUTO); this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10; this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30; this.toasterWindow.setLeft(this.left); this.toasterWindow.setTop(this.top); this.toasterWindow.setCanDragResize(true); this.toasterWindow.setShowMaximizeButton(true); this.toasterWindow.setID(this.id); this.toasterWindow.addItem(this.layout); this.toasterWindow.addCloseClickHandler(new CloseClickHandler() { public void onCloseClick(CloseClickEvent event) { hide(); } }); } }
public void onSelectAlternative(SelectAlternativeEvent event) { if (null == altWindow) { altGrid = new GeocoderAlternativesGrid(geocoderWidget, event.getAlternatives()); altWindow = new Window(); altWindow.setAutoSize(true); altWindow.setTitle(messages.alternativeSelectTitle()); altWindow.setAutoSize(true); altWindow.setLeft(20); altWindow.setTop(20); altWindow.setCanDragReposition(true); altWindow.setCanDragResize(true); altWindow.addItem(altGrid); altWindow.addCloseClickHandler(new CloseClickHandler() { public void onCloseClick(CloseClickEvent closeClickEvent) { removeAltWindow(); } }); map.addChild(altWindow); } else { altGrid.update(event.getAlternatives()); } } // @extract-end
addMixinTypeWindow.setWidth(400); addMixinTypeWindow.setTop("30%"); addMixinTypeWindow.setLeft("35%");
addNewNodeWindow.setWidth(550); addNewNodeWindow.setTop("30%"); addNewNodeWindow.setLeft("35%");