Codota Logo
Composite.computeSize
Code IndexAdd Codota to your IDE (free)

How to use
computeSize
method
in
org.eclipse.swt.widgets.Composite

Best Java code snippets using org.eclipse.swt.widgets.Composite.computeSize (Showing top 20 results out of 540)

  • Common ways to obtain Composite
private void myMethod () {
Composite c =
  • Codota IconControl control;control.getParent()
  • Codota IconStatusDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Codota IconTitleAreaDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Smart code suggestions by Codota
}
origin: pentaho/pentaho-kettle

mainPanel.setSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
scrollpane.setMinSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
BaseStepDialog.setSize( shell, 250, 400, false );
origin: stackoverflow.com

 ScrolledComposite sc = new ScrolledComposite(content, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);

Composite composite = new Composite(sc, SWT.NONE);
composite.setLayout(new FillLayout(SWT.VERTICAL));

new Label(composite, SWT.NONE).setText("1111");
new Label(composite, SWT.NONE).setText("2222");
new Label(composite, SWT.NONE).setText("3333");
new Label(composite, SWT.NONE).setText("4444");
new Label(composite, SWT.NONE).setText("5555");
new Label(composite, SWT.NONE).setText("6666");
new Label(composite, SWT.NONE).setText("7777");

sc.setContent(composite);
sc.setExpandHorizontal(true);
sc.setExpandVertical(true);
sc.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
origin: org.eclipse.platform/org.eclipse.debug.ui

public int getHeight()
{
  int height = fComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
  return height;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench

  @Override
  public Point computeSize(int wHint, int hHint, boolean changed) {
    Point size = super.computeSize(wHint, hHint, changed);
    if (isHorizontal())
      size.y = TrimUtil.TRIM_DEFAULT_HEIGHT;
    else {
      size.x = TrimUtil.TRIM_DEFAULT_HEIGHT;
    }
    return size;
  }
};
origin: org.eclipse.platform/org.eclipse.jface

  @Override
  public Point computeSize(Composite parent, int wHint, int hHint,
      boolean changed) {
    Point size;
    size = container.computeSize(wHint, hHint, changed);
    // size set to account for the BORDER_MARGIN on
    // all sides of the decorated field
    size.x += 4;
    size.y += 4;
    return size;
  }
});
origin: org.eclipse.platform/org.eclipse.compare

  @Override
  public Point computeSize(int wHint, int hHint, boolean changed) {
    return super.computeSize(wHint, Math.max(24, hHint), changed);
  }
};
origin: com.eclipsesource.tabris/tabris

private Point calculateVerticalSize( boolean changed ) {
 Point resultSize = super.computeSize( SWT.DEFAULT, SWT.DEFAULT, changed );
 int clientAreaWidth = scrolledComposite.getClientArea().width;
 Point widthSize = super.computeSize( clientAreaWidth, SWT.DEFAULT, changed );
 if( widthSize.y > resultSize.y ) {
  resultSize = widthSize;
 }
 return resultSize;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  @Override
  public void controlResized(ControlEvent e) {
    settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  }
});
origin: org.eclipse.platform/org.eclipse.ui.workbench

/**
 * Update the minimum size for scrolled composite.
 */
private void updateSize() {
  Point size = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
  size.x += IDialogConstants.HORIZONTAL_SPACING;
  size.y += IDialogConstants.VERTICAL_SPACING;
  scrolled.setMinSize(size);
}
origin: BiglySoftware/BiglyBT

  @Override
  public void controlResized(ControlEvent e) {
    Rectangle r = sc.getClientArea();
    Point size = cMainComposite.computeSize(r.width, SWT.DEFAULT);
    sc.setMinSize(size);
  }
});
origin: BiglySoftware/BiglyBT

  @Override
  public void handleEvent(Event event) {
    int width = sc.getClientArea().width;
    Point size = parent.computeSize( width, SWT.DEFAULT );
    sc.setMinSize( size );
  }
} );
origin: BiglySoftware/BiglyBT

  @Override
  public void handleEvent(Event event) {
    expandItemFilters.setHeight(cFilterArea.computeSize(
        expandFilters.getSize().x, SWT.DEFAULT).y + 3);
  }
});
origin: BiglySoftware/BiglyBT

  @Override
  public void controlResized(ControlEvent e) {
    Rectangle r = scrollable.getClientArea();
    scrollable.setMinSize(main.computeSize(r.width, SWT.DEFAULT ));
  }
});
origin: BiglySoftware/BiglyBT

  @Override
  public void controlResized(ControlEvent e) {
    Rectangle r = scrollable.getClientArea();
    scrollable.setMinSize(scrollChild.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  }
});
origin: inspectIT/inspectIT

/**
 * Fits the width of the main composite to the same width scrolled composite was given.
 */
private void fitSizeOfScrolledContent() {
  Point p = scrollComposite.getSize();
  main.setSize(main.computeSize(p.x, SWT.DEFAULT));
}
origin: BiglySoftware/BiglyBT

  @Override
  public void controlResized(ControlEvent e) {
    Rectangle r = sc.getClientArea();
    Point size = cMainComposite.computeSize(r.width, SWT.DEFAULT);
    sc.setMinSize(size);
  }
});
origin: stackoverflow.com

ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
 Composite composite = new Composite(sc, SWT.NONE);
 sc.setContent(composite);
 Label lblRelation = new Label(composite, SWT.NONE);
 lblRelation.setBounds(10, 13, 74, 15);
 lblRelation.setText("Label name:");
 composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
origin: stackoverflow.com

 public static ScrolledComposite createScrollable(Composite parent, Consumer<Composite> scrollableContentCreator) {
  ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  Composite composite = new Composite(sc, SWT.NONE);
  sc.setContent(composite);

  scrollableContentCreator.accept(composite);

  sc.setExpandHorizontal(true);
  sc.setExpandVertical(true);
  sc.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  return sc;
}
origin: stackoverflow.com

 ScrolledComposite scroller = new ScrolledComposite(tabs, SWT.BORDER | SWT.V_SCROLL);

Composite tabArea = new Composite(scroller, SWT.NONE); 
scroller.setContent(tabArea);

// create some controls in TabArea and assign a layout to TabArea

scroller.setExpandVertical(true);
scroller.setExpandHorizontal(true);
scroller.setMinSize(tabArea.computeSize(SWT.DEFAULT, SWT.DEFAULT));

tab.setControl(scroller);
origin: BiglySoftware/BiglyBT

private void insureSize() {
  //panel.pack();
  Point p = panel.computeSize(wizardWindow.getSize().x,SWT.DEFAULT);
  int height = p.y + wizardHeight;
  if(height > wizardWindow.getSize().y)
    wizardWindow.setSize(p.x,height);
}
org.eclipse.swt.widgetsCompositecomputeSize

Popular methods of Composite

  • setLayout
    Sets the layout which is associated with the receiver to be the argument which may be null.
  • <init>
    Constructs a new instance of this class given its parent and a style value describing its behavior a
  • setLayoutData
  • layout
    Forces a lay out (that is, sets the size and location) of all widgets that are in the parent hierarc
  • getDisplay
  • getChildren
    Returns a (possibly empty) array containing the receiver's children. Children are returned in the or
  • getShell
  • getFont
  • getLayout
    Returns layout which is associated with the receiver, or null if one has not been set.
  • setFont
  • getParent
  • dispose
  • getParent,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now