@Override public void setHeight( int height ) { row.setHeight( height + "px" ); }
@Override public void setHeight(int height) { this.mainPanel.setHeight(""+height); }
@Override public void setHeight( int height ) { row.setHeight( height + "px" ); }
public void onLoad(final LoadEvent event) { graphbox.setWidth(graph.getWidth() + "px"); graphbox.setHeight(graph.getHeight() + "px"); } });
public FieldPalette() { this.panel = new AbsolutePanel(); List<Template> templates = Templates.list(); for (int i = 0; i != templates.size(); ++i) { int row = (i / NUM_COLUMNS); int column = (i % NUM_COLUMNS); DnDLabel draggableLabel = new DnDLabel(templates.get(i)); panel.add(draggableLabel, calculateLeft(column), calculateTop(row)); } int rowCount = Math.round((float) templates.size() / NUM_COLUMNS); panel.setHeight(calculateTop(rowCount) + "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; } }
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); }
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); }
/** * 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; }