@Override public void setWidth(int width) { this.mainPanel.setWidth(""+width); }
public void setWidth(String width) { this.panel.setWidth(width); }
RowItem() { row = new AbsolutePanel(); row.setWidth( "100%" ); }
RowItem() { row = new AbsolutePanel(); row.setWidth( "100%" ); }
private void adjustmentsForCollapsedState() { int hoverBarWidth = hoverBar.getOffsetWidth(); int aboutHalf = (hoverBarWidth / 2) + 1; int newWidth = width + aboutHalf; maxOffshift = newWidth; // Width is now hoverBarWidth. master.setWidth(hoverBarWidth + "px"); // clean up state. currentOffshift = width; }
private void adjustmentsForExpandedState() { master.setWidth(width + "px"); DOM.setStyleAttribute(container.getElement(), "left", "0px"); }
public void onLoad(final LoadEvent event) { graphbox.setWidth(graph.getWidth() + "px"); graphbox.setHeight(graph.getHeight() + "px"); } });
private void updateCanvasBoundaries(int x, int y, int width, int height){ // assume x and y are in canvas coordinate (not sure !) if (x+width > canvas.getOffsetWidth()){ raphael.setSize(x+width+MARGIN,this.height); canvas.setWidth(x+width+MARGIN+"px"); overlayPanel.setWidth(width+x+MARGIN+"px"); this.width = x+width+MARGIN; } if (y+height > canvas.getOffsetHeight()){ raphael.setSize(this.width, y+height+MARGIN); canvas.setHeight(y+height+MARGIN+"px"); overlayPanel.setHeight(height+y+MARGIN+"px"); this.height = y+height+MARGIN; } }
private void sizeContainer() { container.setWidth((Window.getClientWidth() - LEFT_MARGIN) + "px"); container.setHeight((Window.getClientHeight()) + "px"); container.setWidgetPosition(widget, PADDING, PADDING); widget.setWidth((Window.getClientWidth() - LEFT_MARGIN - (PADDING * 2)) + "px"); widget.setHeight((Window.getClientHeight() - (PADDING * 2)) + "px"); }
public void setSize(String width, String height) { layerHtmlContainer.setSize(width, height); drawingArea.setWidth(width); drawingArea.setHeight(height); canvasPanel.setWidth(width); canvasPanel.setHeight(height); for (CanvasContainer container : worldCanvases) { container.setPixelSize(drawingArea.getWidth(), drawingArea.getHeight()); } super.setSize(width, height); }
public void setSize(String width, String height) { layerHtmlContainer.setSize(width, height); drawingArea.setWidth(width); drawingArea.setHeight(height); canvasPanel.setWidth(width); canvasPanel.setHeight(height); for (CanvasContainer container : worldCanvases) { container.setPixelSize(drawingArea.getWidth(), drawingArea.getHeight()); } super.setSize(width, height); }
/** * Add special handles. User can drag these handle and change form of the selected area * * @return container with handles and needed attached event listeners */ private AbsolutePanel buildSelectionArea() { // add selection handles this.handlesContainer = new AbsolutePanel(); this.handlesContainer.setWidth(this.nInnerWidth + "px"); this.handlesContainer.setHeight(this.nInnerHeight + "px"); this.handlesContainer.setStyleName(this.bundleResources.css().handlesContainer()); this.handlesContainer.getElement().getStyle().setOverflow(Overflow.VISIBLE); // append background this.draggableBackground = this.appendDraggableBackground(); // find the center of draggable handle to make an offset for the positioning final int h = this.HANDLE_SIZE / 2; /* 1px and 2px below are correction because of 1px border. We need to position handle exactly on the center of the selection corner. */ // append top left corner handler. this.appendHandle(Cursor.NW_RESIZE, Constants.DRAG_TOP_LEFT_CORNER, -h, 0, 0, -(h + 1)); // append top right corner handler this.appendHandle(Cursor.NE_RESIZE, Constants.DRAG_TOP_RIGHT_CORNER, -h, -(h + 2), 0, 0); // append bottom left corner handler this.appendHandle(Cursor.SW_RESIZE, Constants.DRAG_BOTTOM_LEFT_CORNER, 0, 0, -(h + 2), -(h + 1)); // append bottom right corner handler this.appendHandle(Cursor.SE_RESIZE, Constants.DRAG_BOTTOM_RIGHT_CORNER, 0, -(h + 2), -(h + 2), 0); return handlesContainer; }