Tabnine Logo
Composite.setSize
Code IndexAdd Tabnine to your IDE (free)

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

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

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: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt

  @PostConstruct
  void createWidget(Composite parent, MToolControl tc) {
    Composite comp = new Composite(parent, SWT.NONE) {
      @Override
      public Point computeSize(int wHint, int hHint, boolean flushCache) {
        return new Point(0, 0);
      }
    };
    comp.setSize(0, 0);
  }
}
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.scout.sdk.deps/org.eclipse.jdt.ui

  @Override
  public void controlResized(ControlEvent e) {
    settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  }
});
origin: org.eclipse.swt.cocoa.macosx/x86_64

void relayout() {
  Point size = getSize();
  int height = layoutItems();
  if ((style & SWT.VERTICAL) != 0) {
    Rectangle trim = computeTrim (0, 0, height, 0);
    if (height != size.x) super.setSize(trim.width, size.y);
  } else {
    Rectangle trim = computeTrim (0, 0, 0, height);
    if (height != size.y) super.setSize(size.x, trim.height);		
  }
}
/**
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void relayout() {
  Point size = getSize();
  int height = layoutItems();
  if ((style & SWT.VERTICAL) != 0) {
    Rectangle trim = computeTrim (0, 0, height, 0);
    if (height != size.x) super.setSize(trim.width, size.y);
  } else {
    Rectangle trim = computeTrim (0, 0, 0, height);
    if (height != size.y) super.setSize(size.x, trim.height);
  }
}
/**
origin: org.eclipse.e4.ui.workbench.addons/swt

private void setHostSize() {
  if (hostPane == null || hostPane.isDisposed())
    return;
  int xSize = 600;
  String xSizeStr = toolControl.getPersistedState().get(STATE_XSIZE);
  if (xSizeStr != null)
    xSize = Integer.parseInt(xSizeStr);
  int ySize = 400;
  String ySizeStr = toolControl.getPersistedState().get(STATE_YSIZE);
  if (ySizeStr != null)
    ySize = Integer.parseInt(ySizeStr);
  hostPane.setSize(xSize, ySize);
}
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: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void relayout() {
  Point size = getSize();
  int height = layoutItems();
  if ((style & SWT.VERTICAL) != 0) {
    Rectangle trim = computeTrim (0, 0, height, 0);
    if (height != size.x) super.setSize(trim.width, size.y);
  } else {
    Rectangle trim = computeTrim (0, 0, 0, height);
    if (height != size.y) super.setSize(size.x, trim.height);
  }
}
/**
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void relayout() {
  Point size = getSize();
  int height = layoutItems();
  if ((style & SWT.VERTICAL) != 0) {
    Rectangle trim = computeTrim (0, 0, height, 0);
    if (height != size.x) super.setSize(trim.width, size.y);
  } else {
    Rectangle trim = computeTrim (0, 0, 0, height);
    if (height != size.y) super.setSize(size.x, trim.height);
  }
}
/**
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: org.eclipse.rap/org.eclipse.rap.rwt

void relayout() {
  Point size = getSize();
  int height = layoutItems();
  if ((style & SWT.VERTICAL) != 0) {
    Rectangle trim = computeTrim (0, 0, height, 0);
    if (height != size.x) super.setSize(trim.width, size.y);
  } else {
    Rectangle trim = computeTrim (0, 0, 0, height);
    if (height != size.y) super.setSize(size.x, trim.height);
  }
}
origin: stackoverflow.com

 ScrolledComposite sc = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
sc.setBounds(0, 0, 200, 200);

Composite content = new Composite(sc, SWT.NONE);
content.setSize(300, 300);
sc.setContent(content);

Button button = new Button(content, SWT.PUSH);
button.setText("Button");
button.setBounds(50, 50, 100, 50);
origin: org.apache.uima/uimaj-ep-configurator

/**
 * Sets the error message.
 *
 * @param msg the new error message
 */
protected void setErrorMessage(String msg) {
 errorMessageUI.setText(msg);
 Composite shell = errorMessageUI.getParent();
 while (!(shell instanceof Shell))
  shell = shell.getParent();
 shell.setSize(shell.computeSize(-1, -1));
}
origin: org.eclipse/org.eclipse.jst.j2ee.ui

public void createControl(Composite parent) {
  PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.IMPORT_CLASS_WIZARD_P1);
  initializeDialogUnits(parent);
  Composite aComposite = new Composite(parent, SWT.NULL);
  aComposite.setLayout(new GridLayout());
  aComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
  aComposite.setSize(aComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  aComposite.setFont(parent.getFont());
  createImportTypeGroup(aComposite);
  setControl(aComposite);
}
origin: com.googlecode.playn/playn-swt-java

@Override
public void setSize(int width, int height, boolean fullscreen) {
 int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height);
 platform.comp.setSize(rawWidth, rawHeight);
 platform.shell.setFullScreen(fullscreen);
 platform.shell.pack();
}
origin: org.apache.uima/uimaj-ep-cas-editor

@Override
public void setInput(CustomInformationControl control, Object input) {
 AnnotationEditingControl annotationEditControl = (AnnotationEditingControl) control
     .getControl();
 annotationEditControl.displayFeatureStructure((FeatureStructure) input);
 control.getParent().setSize(annotationEditControl.getSize());
}
origin: threerings/playn

@Override
public void setSize(int width, int height, boolean fullscreen) {
 int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height);
 platform.comp.setSize(rawWidth, rawHeight);
 platform.shell.setFullScreen(fullscreen);
 platform.shell.pack();
}
origin: playn/playn

@Override public void setSize (int width, int height, boolean fullscreen) {
 plat.composite().setSize(width, height);
 plat.shell().setFullScreen(fullscreen);
 plat.shell().pack();
}
origin: io.playn/playn-java-swt

@Override public void setSize (int width, int height, boolean fullscreen) {
 plat.composite().setSize(width, height);
 plat.shell().setFullScreen(fullscreen);
 plat.shell().pack();
}
org.eclipse.swt.widgetsCompositesetSize

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
  • computeSize
  • getParent,
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setData

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now