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

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

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

  • 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: caoxinyu/RedisClient

composite.setLayout(new FillLayout(SWT.HORIZONTAL));
composite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
composite.setBounds(0, 0, 64, 64);
origin: org.eclipse.swt.cocoa.macosx/x86_64

void setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  // In the unified toolbar case, the toolbar view size and position is completely controlled
  // by the window, so don't change its bounds or location.
  if (nsToolbar != null) return;
  super.setBounds(x, y, width, height, move, resize);
}
  
origin: org.eclipse.platform/org.eclipse.jface

@Override
public void layout(Composite parent, boolean changed) {
  Rectangle carea = getClientArea();
  container.setBounds(carea.x + BORDER_MARGIN, carea.y
      + BORDER_MARGIN, carea.width - (2 * BORDER_MARGIN),
      carea.height - (2 * BORDER_MARGIN));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
public void layout(Composite parent, boolean changed) {
  Rectangle carea = getClientArea();
  container.setBounds(carea.x + BORDER_MARGIN, carea.y
      + BORDER_MARGIN, carea.width - (2 * BORDER_MARGIN),
      carea.height - (2 * BORDER_MARGIN));
}
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  int newHeight = height;
  if (resize) newHeight = Math.max (getTextHeightInPixels (), height);
  return super.setBounds (x, y, width, newHeight, move, resize);
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  int newHeight = height;
  if (resize) newHeight = Math.max (getTextHeightInPixels (), height);
  return super.setBounds (x, y, width, newHeight, move, resize);
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  int newHeight = height;
  if (resize) newHeight = Math.max (getTextHeightInPixels (), height);
  return super.setBounds (x, y, width, newHeight, move, resize);
}

origin: stackoverflow.com

 ....
private Composite dataCalcComposite;

public void createContents() {
 dataCalcComposite = new Composite(shell, SWT.NONE);
 dataCalcComposite.setBounds(0, 10, 279, 146);
}

public void repositionObjects() {
 if (dataCalcComposite != null) {
   dataCalcComposite.setLocation(50, 10)
 }
}
....
origin: com.eclipsesource.tabris/tabris

private void layoutFacade( final Composite facade ) {
 Rectangle bounds = composite.getBounds();
 facade.setBounds( 0, 0, bounds.width, bounds.height );
 facade.moveAbove( null );
}
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  OS.gtk_toolbar_set_show_arrow (handle, false);
  int result = super.setBounds (x, y, width, height, move, resize);
  if ((result & RESIZED) != 0) relayout ();
  if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  return result;
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  boolean isFocus = caret != null && caret.isFocusCaret ();
  if (isFocus) caret.killFocus ();
  int result = super.setBounds (x, y, width, height, move, resize);
  if (isFocus) caret.setFocus ();
  return result;
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  OS.gtk_toolbar_set_show_arrow (handle, false);
  int result = super.setBounds (x, y, width, height, move, resize);
  if ((result & RESIZED) != 0) relayout ();
  if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  return result;
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  boolean isFocus = caret != null && caret.isFocusCaret ();
  if (isFocus) caret.killFocus ();
  int result = super.setBounds (x, y, width, height, move, resize);
  if (isFocus) caret.setFocus ();
  return result;
}

origin: stackoverflow.com

Composite composite_tree = new Composite(unitPriceChngeComposite12, SWT.EMBEDDED);
          composite_tree.setBounds(20, 207, 230, 398);
          Frame frame = SWT_AWT.new_Frame(composite_tree);
          Panel panel = new Panel();
          frame.add(panel);
          panel.setLayout(new BorderLayout(0, 0));
          JRootPane rootPane = new JRootPane();
          panel.add(rootPane);
          tree_unitPrice = new JTree();
          rootPane.getContentPane().add(tree_unitPrice, BorderLayout.NORTH);
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  boolean isFocus = caret != null && caret.isFocusCaret ();
  if (isFocus) caret.killFocus ();
  int result = super.setBounds (x, y, width, height, move, resize);
  if (isFocus) caret.setFocus ();
  return result;
}

origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  OS.gtk_toolbar_set_show_arrow (handle, false);
  int result = super.setBounds (x, y, width, height, move, resize);
  if ((result & RESIZED) != 0) relayout ();
  if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  return result;
}

origin: io.playn/playn-java-swt

 public void handleEvent(Event event) {
  // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets
  // can be overlaid on top of our GLCanvas
  Rectangle bounds = comp.getBounds();
  comp.setBounds(bounds);
  canvas.setBounds(bounds);
  canvas.setCurrent();
  hack.convertToBacking(canvas, bounds);
  viewportChanged(bounds.width, bounds.height);
 }
});
origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.addons.swt

protected void dragHorizontal(Composite composite, Point p) {
  int dx = p.x - curPos.x;
  Rectangle bounds = composite.getBounds();
  if (isFixed(SWT.RIGHT)) {
    bounds.x += dx;
    bounds.width -= dx;
  } else {
    bounds.width += dx;
  }
  composite.setBounds(bounds);
  composite.getDisplay().update();
  curPos = p;
}
origin: threerings/playn

 public void handleEvent(Event event) {
  // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets
  // can be overlaid on top of our GLCanvas
  Rectangle bounds = comp.getBounds();
  comp.setBounds(bounds);
  canvas.setBounds(bounds);
  makeCurrent();
  // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height);
  ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height));
 }
});
origin: com.googlecode.playn/playn-swt-java

 public void handleEvent(Event event) {
  // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets
  // can be overlaid on top of our GLCanvas
  Rectangle bounds = comp.getBounds();
  comp.setBounds(bounds);
  canvas.setBounds(bounds);
  makeCurrent();
  // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height);
  ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height));
 }
});
org.eclipse.swt.widgetsCompositesetBounds

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,
  • 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