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

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

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

  • 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

 public void handleEvent( Event e ) {
  Rectangle rect = composite.getClientArea();
  text.setBounds( rect.x + inset, rect.y + inset, rect.width - inset * 2, rect.height - inset * 2 );
 }
} );
origin: pentaho/pentaho-kettle

 public void handleEvent( Event e ) {
  Rectangle rect = composite.getClientArea();
  text.setBounds( rect.x + inset, rect.y + inset, rect.width - inset * 2, rect.height - inset * 2 );
 }
} );
origin: pentaho/pentaho-kettle

 public void handleEvent( Event e ) {
  Rectangle rect = composite.getClientArea();
  text.setBounds( rect.x + inset, rect.y + inset, rect.width - inset * 2, rect.height - inset * 2 );
 }
} );
origin: pentaho/pentaho-kettle

 @Override
 public void widgetSelected( SelectionEvent event ) {
  Rectangle rect = sash.getParent().getClientArea();
  event.x = Math.min( Math.max( event.x, SASH_LIMIT ), rect.width - SASH_LIMIT );
  if ( event.detail != SWT.DRAG ) {
   sash.setBounds( event.x, event.y, event.width, event.height );
   sashform.layout();
  }
 }
} );
origin: pentaho/pentaho-kettle

void layout() {
 Composite parent = canvas.getParent();
 Rectangle rect = parent.getClientArea();
 int width = 0;
 String[] items = list.getItems();
 GC gc = new GC( list );
 for ( int i = 0; i < objects.length; i++ ) {
  width = Math.max( width, gc.stringExtent( items[i] ).x );
 }
 gc.dispose();
 Point size1 = start.computeSize( SWT.DEFAULT, SWT.DEFAULT );
 Point size2 = stop.computeSize( SWT.DEFAULT, SWT.DEFAULT );
 Point size3 = check.computeSize( SWT.DEFAULT, SWT.DEFAULT );
 Point size4 = label.computeSize( SWT.DEFAULT, SWT.DEFAULT );
 width = Math.max( size1.x, Math.max( size2.x, Math.max( size3.x, width ) ) );
 width = Math.max( 64, Math.max( size4.x, list.computeSize( width, SWT.DEFAULT ).x ) );
 start.setBounds( 0, 0, width, size1.y );
 stop.setBounds( 0, size1.y, width, size2.y );
 check.setBounds( 0, size1.y + size2.y, width, size3.y );
 label.setBounds( 0, rect.height - size4.y, width, size4.y );
 int height = size1.y + size2.y + size3.y;
 list.setBounds( 0, height, width, rect.height - height - size4.y );
 text.setBounds( width, 0, rect.width - width, rect.height );
 canvas.setBounds( width, 0, rect.width - width, rect.height );
}
origin: stackoverflow.com

Rectangle rect = composite.getClientArea();
imageGradient = new Image(display, rect.width, rect.height);
GC gc = new GC(imageGradient);
origin: org.eclipse.platform/org.eclipse.ui.forms

@Override
protected void layout(Composite composite, boolean flushCache) {
  Rectangle rect = composite.getClientArea();
  layout(composite, true, rect.x, rect.y, rect.width, rect.height,
      flushCache);
}
origin: org.eclipse.platform/org.eclipse.ui.forms

@Override
protected void layout(Composite composite, boolean flushCache) {
  if (currentPage != null) {
    currentPage.setBounds(composite.getClientArea());
  }
}
origin: org.eclipse.rap/org.eclipse.rap.rwt

public Rectangle getClientArea() {
 checkWidget();
 Rectangle clientArea = super.getClientArea();
 clientArea.x += borderLeft;
 clientArea.y += borderTop;
 clientArea.width -= borderLeft + borderRight;
 clientArea.height -= borderTop + borderBottom;
 return clientArea;
}
origin: org.eclipse.rap/org.eclipse.rap.rwt

protected void layout (Composite composite, boolean flushCache) {
 Rectangle rect = composite.getClientArea ();
 int x = rect.x + marginLeft + marginWidth;
 int y = rect.y + marginTop + marginHeight;
 int width = Math.max (0, rect.width - marginLeft - 2 * marginWidth - marginRight);
 int height = Math.max (0, rect.height - marginTop - 2 * marginHeight - marginBottom);
 layout (composite, true, x, y, width, height, flushCache);
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
protected void layout (Composite composite, boolean flushCache) {
  Rectangle rect = composite.getClientArea ();
  int x = rect.x + marginLeft + marginWidth;
  int y = rect.y + marginTop + marginHeight;
  int width = Math.max (0, rect.width - marginLeft - 2 * marginWidth - marginRight);
  int height = Math.max (0, rect.height - marginTop - 2 * marginHeight - marginBottom);
  layout (composite, true, x, y, width, height, flushCache);
}

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

@Override
protected void layout (Composite composite, boolean flushCache) {
  Rectangle rect = composite.getClientArea ();
  int x = rect.x + marginLeft + marginWidth;
  int y = rect.y + marginTop + marginHeight;
  int width = Math.max (0, rect.width - marginLeft - 2 * marginWidth - marginRight);
  int height = Math.max (0, rect.height - marginTop - 2 * marginHeight - marginBottom);
  layout (composite, true, x, y, width, height, flushCache);
}

origin: org.eclipse/org.eclipse.jdt.ui

  public void layout(Composite composite, boolean force) {
    Rectangle rect = composite.getClientArea();
    Control[] children = composite.getChildren();
    for (int i = 0; i < children.length; i++) {
      children[i].setSize(rect.width, rect.height);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.ui.workbench

  @Override
  protected void layout(Composite composite, boolean flushCache) {
    if (currentPage != null && !currentPage.isDisposed()) {
      currentPage.setBounds(composite.getClientArea());
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

  @Override
  public void layout(Composite composite, boolean force) {
    Rectangle rect = composite.getClientArea();
    Control[] children = composite.getChildren();
    for (int i = 0; i < children.length; i++) {
      children[i].setSize(rect.width, rect.height);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
protected void layout (Composite composite, boolean flushCache) {
  Rectangle clientArea = composite.getClientArea ();
  if (type == SWT.HORIZONTAL) {
    layoutHorizontal (composite, true, wrap, clientArea.width, flushCache);
  } else {
    layoutVertical (composite, true, wrap, clientArea.height, flushCache);
  }
}

origin: org.eclipse.rap/org.eclipse.rap.rwt

@Override
public void preserveValues( Composite composite ) {
 WidgetLCAUtil.preserveBackgroundGradient( composite );
 WidgetLCAUtil.preserveRoundedBorder( composite );
 WidgetLCAUtil.preserveProperty( composite, PROP_CLIENT_AREA, composite.getClientArea() );
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  @Override
  public void handleEvent(Event event) {
    int height= fContainer.getClientArea().height;
    if (fGradientBackground == null || fGradientBackground.getBounds().height != height) {
      Image image= height == 0 ? null : createGradientImage(height, event.display);
      fContainer.setBackgroundImage(image);
      if (fGradientBackground != null)
        fGradientBackground.dispose();
      fGradientBackground= image;
    }
  }
});
origin: org.eclipse/org.eclipse.jst.pagedesigner

public void layout(Composite editor, boolean force) {
  Rectangle bounds = editor.getClientArea();
  Point size = _button.computeSize(SWT.DEFAULT, SWT.DEFAULT, force);
  // if (_wrapped != null)
  _wrapped.getControl().setBounds(0, 0, bounds.width - size.x,
      bounds.height);
  _button.setBounds(bounds.width - size.x, 0, size.x, bounds.height);
}
origin: org.eclipse/org.eclipse.help.ui

protected void layout(Composite composite, boolean flushCache) {
  Rectangle carea = composite.getClientArea();
  Point topSize = contextHelpPart.getControl().computeSize(
      carea.width, SWT.DEFAULT, flushCache);
  Point botSize = dynamicHelpPart.getControl().computeSize(
      carea.width, SWT.DEFAULT, flushCache);
  int y = VSPACE;
  contextHelpPart.getControl().setBounds(0, y, carea.width, topSize.y);
  y += topSize.y + VSPACE;
  dynamicHelpPart.getControl().setBounds(0, y, carea.width, botSize.y);
}
org.eclipse.swt.widgetsCompositegetClientArea

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,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
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