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

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

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

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

Point getLocationInPixels () {
  checkWidget();
  int /*long*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  if ((parent.style & SWT.MIRRORED) != 0) {
    int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
    x = parent.getClientWidth () - width - x;
  }
  return new Point (x, y);
}

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

Point getLocationInPixels () {
  checkWidget();
  int /*long*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  if ((parent.style & SWT.MIRRORED) != 0) {
    int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
    x = parent.getClientWidth () - width - x;
  }
  return new Point (x, y);
}

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

Point getLocationInPixels () {
  checkWidget();
  long /*int*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  if ((parent.style & SWT.MIRRORED) != 0) {
    int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
    x = parent.getClientWidth () - width - x;
  }
  return new Point (x, y);
}

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

Rectangle getBoundsInPixels () {
  checkWidget();
  int /*long*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height;
  if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
  return new Rectangle (x, y, width, height);
}

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

Rectangle getBoundsInPixels () {
  checkWidget();
  long /*int*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height;
  if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
  return new Rectangle (x, y, width, height);
}

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

Rectangle getBoundsInPixels () {
  checkWidget();
  int /*long*/ topHandle = topHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (topHandle, allocation);
  int x = allocation.x;
  int y = allocation.y;
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height;
  if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
  return new Rectangle (x, y, width, height);
}

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

void setInitialBounds () {
  if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
    /*
    * Feature in GTK.  On creation, each widget's allocation is
    * initialized to a position of (-1, -1) until the widget is
    * first sized.  The fix is to set the value to (0, 0) as
    * expected by SWT.
    */
    int /*long*/ topHandle = topHandle ();
    GtkAllocation allocation = new GtkAllocation();
    if ((parent.style & SWT.MIRRORED) != 0) {
      allocation.x = parent.getClientWidth ();
    } else {
      allocation.x = 0;
    }
    allocation.y = 0;
    if (OS.GTK3) {
      OS.gtk_widget_set_visible(topHandle, true);
    }
    OS.gtk_widget_set_allocation(topHandle, allocation);
  } else {
    resizeHandle (1, 1);
    forceResize ();
  }
}

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

void setInitialBounds () {
  if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
    /*
    * Feature in GTK.  On creation, each widget's allocation is
    * initialized to a position of (-1, -1) until the widget is
    * first sized.  The fix is to set the value to (0, 0) as
    * expected by SWT.
    */
    long /*int*/ topHandle = topHandle ();
    GtkAllocation allocation = new GtkAllocation();
    if ((parent.style & SWT.MIRRORED) != 0) {
      allocation.x = parent.getClientWidth ();
    } else {
      allocation.x = 0;
    }
    allocation.y = 0;
    if (OS.GTK3) {
      OS.gtk_widget_set_visible(topHandle, true);
    }
    OS.gtk_widget_set_allocation(topHandle, allocation);
  } else {
    resizeHandle (1, 1);
    forceResize ();
  }
}

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

void setInitialBounds () {
  if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) {
    /*
    * Feature in GTK.  On creation, each widget's allocation is
    * initialized to a position of (-1, -1) until the widget is
    * first sized.  The fix is to set the value to (0, 0) as
    * expected by SWT.
    */
    int /*long*/ topHandle = topHandle ();
    GtkAllocation allocation = new GtkAllocation();
    if ((parent.style & SWT.MIRRORED) != 0) {
      allocation.x = parent.getClientWidth ();
    } else {
      allocation.x = 0;
    }
    allocation.y = 0;
    if (OS.GTK3) {
      OS.gtk_widget_set_visible(topHandle, true);
    }
    OS.gtk_widget_set_allocation(topHandle, allocation);
  } else {
    resizeHandle (1, 1);
    forceResize ();
  }
}

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

  event.detail = SWT.DRAG;
if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
sendSelectionEvent (SWT.Selection, event, true);
if (isDisposed ()) return 0;
  lastX = rect.x;
  lastY = rect.y;
  if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX;
  parent.update (true, (style & SWT.SMOOTH) == 0);
  drawBand (lastX, rect.y, width, height);
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
if (oldWidth > 0) x = oldWidth - controlWidth - x;
int clientWidth = getClientWidth ();
x = clientWidth - controlWidth - x;
if (child.enableWindow != 0) {
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
if (oldWidth > 0) x = oldWidth - controlWidth - x;
int clientWidth = getClientWidth ();
x = clientWidth - controlWidth - x;
if (child.enableWindow != 0) {
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
if (oldWidth > 0) x = oldWidth - controlWidth - x;
int clientWidth = getClientWidth ();
x = clientWidth - controlWidth - x;
if (child.enableWindow != 0) {
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

event.setBounds (DPIUtil.autoScaleDown (eventRect));
drawBand (lastX, lastY, width, height);
if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
sendSelectionEvent (SWT.Selection, event, true);
if (isDisposed ()) return result;
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

event.setBounds (DPIUtil.autoScaleDown (eventRect));
drawBand (lastX, lastY, width, height);
if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
sendSelectionEvent (SWT.Selection, event, true);
if (isDisposed ()) return result;
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

event.setBounds (DPIUtil.autoScaleDown (eventRect));
drawBand (lastX, lastY, width, height);
if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x;
sendSelectionEvent (SWT.Selection, event, true);
if (isDisposed ()) return result;
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof);
event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height)));
if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x;
long /*int*/ damageRgn = OS.gdk_region_new ();
OS.gdk_region_union_with_rect (damageRgn, rect);
origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof);
event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height)));
if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x;
int /*long*/ damageRgn = OS.gdk_region_new ();
OS.gdk_region_union_with_rect (damageRgn, rect);
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof);
event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height)));
if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x;
int /*long*/ damageRgn = OS.gdk_region_new ();
OS.gdk_region_union_with_rect (damageRgn, rect);
origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

Rectangle rect = rects [i];
int x = rect.x;
if (parent != null && (parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - rect.width - x;
OS.gdk_draw_rectangle (window, gc, 0, x, rect.y, rect.width, rect.height);
org.eclipse.swt.widgetsCompositegetClientWidth

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
  • startActivity (Activity)
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JButton (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
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