Examples of computeSize()


Examples of org.eclipse.swt.widgets.ToolBar.computeSize()

                    coolItem.dispose();
                }
            } else {
                // If the toolbar item exists then adjust the size of the cool
                // item
                Point toolBarSize = toolBar.computeSize(SWT.DEFAULT,
                        SWT.DEFAULT);
                // Set the preffered size to the size of the toolbar plus trim
                Point preferredSize = coolItem.computeSize(toolBarSize.x,
                        toolBarSize.y);
                coolItem.setPreferredSize(preferredSize);
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree.computeSize()

    scrolledComposite.setExpandVertical(true);

    checkboxTreeViewer = new CheckboxTreeViewer(scrolledComposite, SWT.BORDER);
    Tree tree = checkboxTreeViewer.getTree();
    scrolledComposite.setContent(tree);
    scrolledComposite.setMinSize(tree.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    new Label(container, SWT.NONE);

    Button btnImportProfile = new Button(container, SWT.NONE);
    btnImportProfile.addSelectionListener(new SelectionAdapter() {
      @Override
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Hyperlink.computeSize()

      y += p.y + GAP;

      // hyperlink
      Hyperlink localLink = (Hyperlink) children[i + 3];
      p = localLink.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
      if (apply) {
        localLink.setBounds(x + w - p.x - 2, y, p.x, p.y);
      }

      // description
View Full Code Here

Examples of org.jgroups.util.RetransmitTable.computeSize()

        addAndGet(table, 19, "19");
        addAndGet(table, 20, "20");
        addAndGet(table, 29, "29");
        System.out.println("table: " + table.dump());
        assert table.size() == 9;
        assert table.size() == table.computeSize();
        assert table.capacity() == 30;
    }


    public static void testAdditionWithOffset() {
View Full Code Here

Examples of processing.app.debug.Sizer.computeSize()

    String maxsizeString = Base.getBoardPreferences().get("upload.maximum_size");
    if (maxsizeString == null) return;
    long maxsize = Integer.parseInt(maxsizeString);
    Sizer sizer = new Sizer(buildPath, suggestedClassName);
    try {
      size = sizer.computeSize();
      System.out.println("Binary sketch size: " + size + " bytes (of a " +
                         maxsize + " byte maximum) - " + ((size*100)/maxsize) + "% used");    
    } catch (RunnerException e) {
      System.err.println("Couldn't determine program size: " + e.getMessage());
    }
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

    // LOOK - need test for "all" common case

    // The actual wanted data we can get from this section
    Section intersect = dataSection.intersect(wantSection);
    this.total = intersect.computeSize();
    if (total <= 0) {
      System.out.println("hey");
    }
    assert total > 0;
    int varRank = intersect.getRank();
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

  static int max_size = 1000 * 1000 * 10;
  static Section makeSubset(Variable v) throws InvalidRangeException {
    int[] shape = v.getShape();
    shape[0] = 1;
    Section s = new Section(shape);
    long size = s.computeSize();
    shape[0] = (int) Math.max(1, max_size / size);
    return new Section(shape);
  }


View Full Code Here

Examples of ucar.ma2.Section.computeSize()

    Section makeSubset(Variable v) throws InvalidRangeException {
      int[] shape = v.getShape();
      shape[0] = 1;
      Section s = new Section(shape);
      long size = s.computeSize();
      shape[0] = (int) Math.max(1, max_size / size);
      return new Section(shape);
    }
  }
View Full Code Here

Examples of ucar.ma2.Section.computeSize()

  static int max_size = 1000 * 1000 * 10;
  static Section makeSubset(Variable v) throws InvalidRangeException {
    int[] shape = v.getShape();
    shape[0] = 1;
    Section s = new Section(shape);
    long size = s.computeSize();
    shape[0] = (int) Math.max(1, max_size / size);
    return new Section(shape);
  }


View Full Code Here

Examples of ucar.ma2.Section.computeSize()

  public void testFull() throws InvalidRangeException {
    int[] shape = new int[] {123,22,92,12};
    Section section = new Section(shape);
    IndexChunker index = new IndexChunker(shape, section);
    assert index.getTotalNelems() == section.computeSize();
    IndexChunker.Chunk chunk = index.next();
    assert chunk.getNelems() == section.computeSize();
    assert !index.hasNext();
  }
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.