congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Composite.setBounds
Code IndexAdd Tabnine 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)

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.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: 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: 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.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: 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: 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

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • CodeWhisperer 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