/** * Creates an empty tab bar. */ public TabBar() { initWidget(panel); sinkEvents(Event.ONCLICK); setStyleName("gwt-TabBar"); // Add a11y role "tablist" Roles.getTablistRole().set(panel.getElement()); panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); HTML first = new HTML(" ", true), rest = new HTML(" ", true); first.setStyleName("gwt-TabBarFirst"); rest.setStyleName("gwt-TabBarRest"); first.setHeight("100%"); rest.setHeight("100%"); panel.add(first); panel.add(rest); first.setHeight("100%"); panel.setCellHeight(first, "100%"); panel.setCellWidth(rest, "100%"); setStyleName(first.getElement().getParentElement(), "gwt-TabBarFirst-wrapper"); setStyleName(rest.getElement().getParentElement(), "gwt-TabBarRest-wrapper"); }
public void setHeight(String height) { html.setHeight(height); }
private void calcSpacerHeight() { int verticalScrollPosition = scrollAncestor.getVerticalScrollPosition(); // properties and palette spacer if (verticalScrollPosition > FormDesignerConstants.MAX_VERTICAL_SCROLL_POSITION) { int height = verticalScrollPosition - FormDesignerConstants.MAX_VERTICAL_SCROLL_POSITION; spacer.setHeight(height + "px"); paletteSpacer.setHeight(height + "px"); } else { spacer.setHeight("0px"); paletteSpacer.setHeight("0px"); } }
private HTML spacerWidget() { HTML h = new HTML( " " ); h.setHeight( "2px" ); return h; }
private HTML spacerWidget() { HTML h = new HTML( " " ); //NON-NLS h.setHeight( "2px" ); //NON-NLS return h; }
private HTML spacerWidget() { HTML h = new HTML(" "); //NON-NLS h.setHeight("2px"); //NON-NLS return h; }
private HTML spacerWidget() { HTML h = new HTML( " " ); h.setHeight( "2px" ); return h; }
private HTML spacerWidget() { HTML h = new HTML(" "); //NON-NLS h.setHeight("2px"); //NON-NLS return h; }
private HTML spacerWidget() { HTML h = new HTML( " " ); h.setHeight( "2px" ); return h; }
public Positioner() { widget.addStyleName(FormDesignerStyles.INSTANCE.spacer()); widget.setHeight(FormDesignerConstants.SOURCE_CONTROL_HEIGHT_PX + "px"); }
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.setHeight("0px");
/** * Creates an empty tab bar. */ public TabBar() { initWidget(panel); sinkEvents(Event.ONCLICK); setStyleName("gwt-TabBar"); // Add a11y role "tablist" Roles.getTablistRole().set(panel.getElement()); panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); HTML first = new HTML(" ", true), rest = new HTML(" ", true); first.setStyleName("gwt-TabBarFirst"); rest.setStyleName("gwt-TabBarRest"); first.setHeight("100%"); rest.setHeight("100%"); panel.add(first); panel.add(rest); first.setHeight("100%"); panel.setCellHeight(first, "100%"); panel.setCellWidth(rest, "100%"); setStyleName(first.getElement().getParentElement(), "gwt-TabBarFirst-wrapper"); setStyleName(rest.getElement().getParentElement(), "gwt-TabBarRest-wrapper"); }
/** * Creates an empty tab bar. */ public TabBar() { initWidget(panel); sinkEvents(Event.ONCLICK); setStyleName("gwt-TabBar"); // Add a11y role "tablist" Roles.getTablistRole().set(panel.getElement()); panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); HTML first = new HTML(" ", true), rest = new HTML(" ", true); first.setStyleName("gwt-TabBarFirst"); rest.setStyleName("gwt-TabBarRest"); first.setHeight("100%"); rest.setHeight("100%"); panel.add(first); panel.add(rest); first.setHeight("100%"); panel.setCellHeight(first, "100%"); panel.setCellWidth(rest, "100%"); setStyleName(first.getElement().getParentElement(), "gwt-TabBarFirst-wrapper"); setStyleName(rest.getElement().getParentElement(), "gwt-TabBarRest-wrapper"); }
/** * 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; }
graphbox.setWidgetPosition(this, left, top); 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); }