Package org.eclipse.swt.widgets

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


    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

    Rectangle tableBounds = table.getBounds();
    tableBounds.height = Math.min(tableBounds.height, table.getItemHeight()
        * MAX_ITEMS);
    table.setBounds(tableBounds);

    dialog.setBounds(dialog.computeTrim(tableBounds.x, tableBounds.y,
        tableBounds.width, tableBounds.height));

    tc.setWidth(table.getClientArea().width);
    table.setFocus();
    table.addFocusListener(new FocusListener() {
View Full Code Here

        shell.layout();
        if (size.x == 0 && size.y == 0) {
            inst.pack();
            shell.pack();
        } else {
            Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
            shell.setSize(shellBounds.width, shellBounds.height);
        }
        shell.open();

        while (!shell.isDisposed()) {
View Full Code Here

      shell.layout();
      if (size.x == 0 && size.y == 0) {
        inst.pack();
        shell.pack();
      } else {
        Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
        shell.setSize(shellBounds.width, shellBounds.height);
      }
      shell.open();
      while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
View Full Code Here

        inst.pack();
        shell.pack();
      }
      else
      {
        Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
        shell.setSize(shellBounds.width, shellBounds.height);
      }
      shell.open();
      while (!shell.isDisposed())
      {
View Full Code Here

  @Override
  protected void buttonPressed(int buttonId) {
    if (buttonId == DETAIL_BUTTON) {
      final Shell shell = getShell();
      Rectangle trim = shell.computeTrim(0, 0, 0, 0);
      int xOffset = 0;
      int xDelta = -trim.x + 3;
      int yOffset = 0;
      int yDelta = -trim.y - 3;
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.