Package org.eclipse.swt.widgets

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


    Label ctrl = new Label(bar, SWT.PUSH);
    ctrl.setText("Button 1"); //$NON-NLS-1$
    Point size = ctrl.computeSize(SWT.DEFAULT, SWT.DEFAULT);

    Point ps = item.computeSize(size.x, size.y);
    item.setPreferredSize(ps);
    item.setControl(ctrl);

    bar.pack();
View Full Code Here


   
    Label ctrl = new Label (bar, SWT.PUSH);
    ctrl.setText ("Button 1"); //$NON-NLS-1$
      Point size = ctrl.computeSize (SWT.DEFAULT, SWT.DEFAULT);
   
      Point ps = item.computeSize (size.x, size.y);
    item.setPreferredSize (ps);
    item.setControl (ctrl);

    bar.pack ();
View Full Code Here

    int totalx = 0;
    CoolItem coolItem = new CoolItem(buttonCoolBar, SWT.NULL);
    coolItem.setControl(toolBar);
    toolBar.pack();
    Point size = toolBar.getSize();
    size = coolItem.computeSize(size.x,size.y);
    totalx+=size.x;
    coolItem.setMinimumSize(size);
    coolItem.setPreferredSize(size);
   
    ToolBar sendToolBar = new ToolBar(buttonCoolBar, SWT.FLAT);
View Full Code Here

    CoolItem sendCoolItem = new CoolItem(buttonCoolBar, SWT.NULL);
    sendCoolItem.setControl(sendToolBar);
    sendToolBar.pack();
    size = sendToolBar.getSize();
    size = sendCoolItem.computeSize(size.x, size.y);
    totalx+=size.x;
    sendCoolItem.setMinimumSize(size);
    sendCoolItem.setPreferredSize(size);
   
   
View Full Code Here

   
   
    CoolItem coolItem1 = new CoolItem (topCoolBar, SWT.NONE);
    coolItem1.setControl (coolToolBar);
    Point size = coolToolBar.computeSize (SWT.DEFAULT, SWT.DEFAULT);
    coolItem1.setSize (coolItem1.computeSize (size.x, size.y));
   
    /*
    coolToolBar = new ToolBar (topCoolBar, SWT.BORDER);
    coolToolItem = new ToolItem (coolToolBar, SWT.NONE);
    coolToolItem.setText ("Item 3");
View Full Code Here

    CoolItem[] coolItems = coolBar.getItems();
    for (int i = 0; i < coolItems.length; i++) {
      CoolItem coolItem = coolItems[i];
      Control control = coolItem.getControl();
      Point size = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
      Point coolSize = coolItem.computeSize(size.x, size.y);
      if (control instanceof ToolBar) {
        ToolBar bar = (ToolBar) control;
        if (bar.getItemCount() > 0)
          if (vertical)
            size.y = bar.getItem(0).getBounds().height;
View Full Code Here

        item.setText(LayoutExample.getResourceString("Item", new String[] { "4" }));
        CoolItem coolItem2 = new CoolItem(coolBar, 0);
        coolItem2.setControl(toolBar);
        Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        coolItem1.setSize(coolItem1.computeSize(size.x, size.y));
        coolItem2.setSize(coolItem2.computeSize(size.x, size.y));
        coolBar.setSize(coolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
        children[i] = coolBar;
      } else if (control.equals("Group")) {
        Group group = new Group(layoutComposite, SWT.NONE);
        group.setText(LayoutExample
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.