Examples of computeTrim()


Examples of org.eclipse.swt.custom.StyledText.computeTrim()

     * @see Layout#layout(Composite, boolean)
     */
    protected void layout(Composite composite, boolean flushCache) {
      Rectangle clArea= composite.getClientArea();
      StyledText textWidget= getTextWidget();
      Rectangle trim= textWidget.computeTrim(0, 0, 0, 0);
      int topTrim= - trim.y;
      int scrollbarHeight= trim.height - topTrim; // horizontal scroll bar is only under the client area

      int x= clArea.x;
      int width= clArea.width;
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText.computeTrim()

      int topLine= text.getTopIndex();
      int rangeTopLine= getWidgetLineNumber(lineRange.getStartLine());
      int topDelta= Math.max(topLine - rangeTopLine, 0);

      Rectangle size= text.getClientArea();
      Rectangle trim= text.computeTrim(0, 0, 0, 0);
      int height= size.height - trim.height;

      int lines= JFaceTextUtil.getLineIndex(text, height) - text.getTopIndex();

      int bottomLine= topLine + lines;
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText.computeTrim()

  private int getViewportHeight() {
    StyledText te = fLeft.getTextWidget();

    int vh = te.getClientArea().height;
    if (vh == 0) {
      Rectangle trim = te.computeTrim(0, 0, 0, 0);
      int scrollbarHeight = trim.height;

      int headerHeight = getHeaderHeight();

      Composite composite = (Composite) getControl();
View Full Code Here

Examples of org.eclipse.swt.printing.Printer.computeTrim()

      Printer printer = new Printer(printerData);
      Point screenDPI = display.getDPI();
      Point printerDPI = printer.getDPI();
      int scaleFactor = printerDPI.x / screenDPI.x;
      Rectangle trim = printer.computeTrim(0, 0, 0, 0);
      if (printer.startJob(currentName)) {
        if (printer.startPage()) {
          GC gc = new GC(printer);
          int transparentPixel = imageData.transparentPixel;
          if (transparentPixel != -1 && !transparent)
View Full Code Here

Examples of org.eclipse.swt.widgets.Composite.computeTrim()

     */
    private void computeHintOffset(Control control) {
        if (control instanceof Composite) {
            // For composites, subtract off the trim size
            Composite composite = (Composite) control;
            Rectangle trim = composite.computeTrim(0, 0, 0, 0);

            widthAdjustment = trim.width;
            heightAdjustment = trim.height;
        } else {
            // For non-composites, subtract off 2 * the border size
View Full Code Here

Examples of org.eclipse.swt.widgets.Composite.computeTrim()

        if (parentBounds.y + parentBounds.height < clientArea.y + clientArea.height) {
          parentBounds.height += insets;
          viewMinimumSize.y += insets;
        }
       
        Rectangle parentTrim = parent.computeTrim(0, 0, 0, 0);
        viewMinimumSize.x += parentTrim.width;
        viewMinimumSize.y += parentTrim.height;
       
        float curXFactor = ((float )parentBounds.width) / ((float )viewMinimumSize.x);
        float curYFactor = ((float )parentBounds.height) / ((float )viewMinimumSize.y);
View Full Code Here

Examples of org.eclipse.swt.widgets.Scrollable.computeTrim()

     */
    private void computeHintOffset(Control control) {
        if (control instanceof Scrollable) {
            // For scrollables, subtract off the trim size
            Scrollable scrollable = (Scrollable) control;
            Rectangle trim = scrollable.computeTrim(0, 0, 0, 0);

            widthAdjustment = trim.width;
            heightAdjustment = trim.height;
        } else {
            // For non-composites, subtract off 2 * the border size
View Full Code Here

Examples of org.eclipse.swt.widgets.Scrollable.computeTrim()

     */
    private void computeHintOffset(Control control) {
        if (control instanceof Scrollable) {
            // For scrollables, subtract off the trim size
            Scrollable scrollable = (Scrollable) control;
            Rectangle trim = scrollable.computeTrim(0, 0, 0, 0);

            widthAdjustment = trim.width;
            heightAdjustment = trim.height;
        } else {
            // For non-composites, subtract off 2 * the border size
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell.computeTrim()

              try {
               
                int w = Integer.parseInt(strings[1]);
                int h = Integer.parseInt(strings[2]);

                Rectangle computeTrim = shell.computeTrim(0, 0, w, h);
                shell.setSize(computeTrim.width, computeTrim.height);
               
              } catch (Exception e) {
              }
            }
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell.computeTrim()

    Rectangle bounds = ((TableCellSWT) cell).getBoundsOnDisplay();
    bounds.y += bounds.height;
    bounds.width = 630;
    bounds.height = (16 * dm.getNumFileInfos()) + 60;
    Rectangle realBounds = shell.computeTrim(0, 0, bounds.width, bounds.height);
    realBounds.width -= realBounds.x;
    realBounds.height -= realBounds.y;
    realBounds.x = bounds.x;
    realBounds.y = bounds.y;
    if (bounds.height > 500) {
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.