public void setWidth(String width) { html.setWidth(width); }
html.setWidth("1000px");
private HTML buildSliderPart(String width, String height, String cursor, String color, double transparancy) { HTML container = new HTML(); container.setWidth(width); container.setHeight(height); DOM.setStyleAttribute(container.getElement(), "cursor", cursor); DOM.setStyleAttribute(container.getElement(), "backgroundColor", color); // transparency styling (see also bug#449 and http://www.quirksmode.org/css/opacity.html) // note: since GWT complains, '-msFilter' has to be in plain camelCase (w/o '-') // ordering is important here DOM.setStyleAttribute(container.getElement(), "opacity", Double.toString(transparancy)); DOM.setStyleAttribute(container.getElement(), "mozOpacity", Double.toString(transparancy)); String opacity = "(opacity=" +Double.toString(transparancy*100) + ")"; DOM.setStyleAttribute(container.getElement(), "msFilter", "\"progid:DXImageTransform.Microsoft.Alpha"+ opacity + "\""); DOM.setStyleAttribute(container.getElement(), "filter", "alpha" + opacity); return container; }
super.setWidth("0px"); super.setHeight("0px");
/*************************************** * Updates this cell with the given values. * * @param rRow The data model of the row represented by this cell * @param sText The new text for the cell */ void update(DataModel<?> rRow, String sText) { rRowModel = rRow; if (rRow instanceof HierarchicalDataModel<?>) { DataModel<? extends DataModel<?>> rChildren = ((HierarchicalDataModel<?>) rRow).getChildModels(); nDirectChildren = rChildren != null ? rChildren.getElementCount() : 0; } int nSpacing = nLevel; aCellText.setHTML(" " + (sText != null ? sText : "")); aSpacing.setWidth(nSpacing + "em"); aNodeControl.setResource(nDirectChildren > 0 ? GwtTable.RES.imTreeExpand() : GwtTable.RES.imTreeLeaf()); }
/** * Append draggable background for the selection area */ private HTML appendDraggableBackground() { final HTML backgroundHandle = new HTML(); backgroundHandle.setWidth(this.nInnerWidth + "px"); backgroundHandle.setHeight(this.nInnerHeight + "px"); backgroundHandle.getElement().getStyle().setCursor(Cursor.MOVE); backgroundHandle.addStyleName(this.bundleResources.css().selectionDraggableBackground()); backgroundHandle.addMouseDownHandler(new MouseDownHandler() { public void onMouseDown(MouseDownEvent event) { isDown = true; action = Constants.DRAG_BACKGROUND; } }); backgroundHandle.addTouchStartHandler(new TouchStartHandler() { public void onTouchStart(TouchStartEvent event) { isDown = true; action = Constants.DRAG_BACKGROUND; } }); this.handlesContainer.add(backgroundHandle, 0, 0); return backgroundHandle; }
super.setWidth(width + "px"); super.setHeight(height + "px"); super.setVisible(true);
@Override public void onMouseDown(final MouseDownEvent event) { event.preventDefault(); // Check if the zoom selection is active, if so, it's possible that the // mouse left the browser mid-selection and got stuck enabled even // though the mouse isn't still pressed. If that's the case, do a similar // operation to the onMouseUp event. if (zoom_selection_active) { endSelection(event); return; } final Element image = graph.getElement(); zoom_selection_active = true; start_x = event.getRelativeX(image); start_y = event.getRelativeY(image); end_x = 0; end_y = 0; graphbox.setWidgetPosition(this, start_x, start_y); super.setWidth("0px"); super.setHeight("0px"); super.setVisible(true); // Workaround to steal the focus from whatever had it previously, // which may cause the graph to reload as a side effect. super.getElement().focus(); graph_move_handler = graph.addMouseMoveHandler(this); box_move_handler = super.addMouseMoveHandler(this); }
closeBtn.setStyleName("myPopupCloseBtn"); titleArea = new HTML(); titleArea.setWidth("300px"); titleArea.addStyleName("myPopupTitleArea"); add(titleArea);
aPanel.setCellVerticalAlignment(rGwtImage, HasVerticalAlignment.ALIGN_MIDDLE); aHtml.setWidth("100%"); aPanel.setCellHorizontalAlignment(aHtml, eHorizontalAlignment); aPanel.setCellVerticalAlignment(aHtml,