Examples of resize()


Examples of org.apache.phoenix.memory.MemoryManager.MemoryChunk.resize()

            public void run() {
                sleepFor(2000);
                MemoryChunk c3 = rmm2.allocate(10);
                // Will require waiting for a bit of time before t1 frees the requested memory
                long startTime = System.currentTimeMillis();
                c3.resize(50);
                assertTrue(System.currentTimeMillis() - startTime >= 2000);
                c3.close();
            }
        };
        t1.start();
View Full Code Here

Examples of org.apache.phoenix.memory.MemoryManager.MemoryChunk.resize()

            public void run() {
                sleepFor(2000);
                ChildMemoryManager rmm2 = new ChildMemoryManager(gmm,100);
                MemoryChunk c3 = rmm2.allocate(10);
                long startTime = System.currentTimeMillis();
                c3.resize(60); // Test that resize waits if memory not available
                assertTrue(c1.getSize() == 20); // c1 was resized not closed
                assertTrue(System.currentTimeMillis() - startTime >= 2000); // we waited some time before the allocate happened
                c3.close();
                assertTrue(rmm2.getAvailableMemory() == rmm2.getMaxMemory());
            }
View Full Code Here

Examples of org.apache.phoenix.memory.MemoryManager.MemoryChunk.resize()

            // Once we return from the first call to next, we've run through and cached
            // the topN rows, so we no longer need to start/stop a region operation.
            firstTuple = iterator.next();
            // Now that the topN are cached, we can resize based on the real size
            long actualSize = iterator.getByteSize();
            chunk.resize(actualSize);
        } catch (Throwable t) {
            ServerUtil.throwIOException(region.getRegionNameAsString(), t);
            return null;
        } finally {
            region.closeRegionOperation();
View Full Code Here

Examples of org.apache.phoenix.memory.MemoryManager.MemoryChunk.resize()

                maxSize = Math.max(length, maxSize);
            }
            spoolTo.close();
            if (spoolTo.isInMemory()) {
                byte[] data = spoolTo.getData();
                chunk.resize(data.length);
                spoolFrom = new InMemoryResultIterator(data, chunk);
            } else {
                spoolFrom = new OnDiskResultIterator(maxSize, spoolTo.getFile());
                usedOnDiskIterator = true;
            }
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFPicture.resize()

      HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      HSSFPatriarch patriarch = s.createDrawingPatriarch();
      HSSFPicture picture = patriarch.createPicture(anchor, index);

      picture.resize();

      if ((width != 0) && (height != 0)) {
        picture.getImageDimension().setSize(width, height);
      }
    }
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFPicture.resize()

      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();

      // if ((width != 0) && (height != 0)) {
      // picture.getImageDimension().setSize(width, height);
      // }
    }
View Full Code Here

Examples of org.eclipse.draw2d.geometry.PrecisionRectangle.resize()

    PrecisionRectangle rect = new PrecisionRectangle(
        getInitialFeedbackBounds().getCopy());
    getHostFigure().translateToAbsolute(rect);
    rect.translate(request.getMoveDelta());
    rect.resize(request.getSizeDelta());

    // to avoid enlarge feedback pane.
    // when draging a editpart inside designer to move/copy it, we do not
    // want to
    // enlarge the canvas, since that may resulting in relayout.
View Full Code Here

Examples of org.eclipse.draw2d.geometry.Rectangle.resize()

      IFigure target) {
      Rectangle bounds = getAdjustedColumnBoundingRectangle(editPart);
        target.translateToRelative(bounds);
        Insets insets = target.getInsets();
    bounds.translate(-insets.left, -insets.top);
    bounds.resize(insets.getWidth() + 1, insets.getHeight() + 1);
    return bounds;
  }
}
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart.resize()

    editor.activateTool(TOOL_CIRCUIT);
    editor.click(30, 30);
    SWTBotGefEditPart circuitEditPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    Rectangle boundsBeforeResize = getBounds(circuitEditPart);

    circuitEditPart.resize(PositionConstants.SOUTH_WEST, 200, 200);
    syncWithUIThread();
    Rectangle boundsAfterResize = getBounds(circuitEditPart);
    checkLocation(boundsAfterResize, boundsBeforeResize.x, boundsBeforeResize.y);
    checkSize(boundsAfterResize, 200, 200);
View Full Code Here

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.resize()

      if (barPosition.equalsIgnoreCase("TOP")) {
        bounds.moveY(barThickness);
      } else if (barPosition.equalsIgnoreCase("LEFT")) {
        bounds.moveX(barThickness);
      } else if (barPosition.equalsIgnoreCase("BOTTOM")) {
        bounds.resize(0, -barThickness);
      } else if (barPosition.equalsIgnoreCase("RIGHT")) {
        bounds.resize(-barThickness, 0);
      }
      // crop insets
      bounds.crop(tabSet.getTabInsets());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.