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 ); } } );
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 ); } } );
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 ); } } );
@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(); } } } );
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 ); }
Rectangle rect = composite.getClientArea(); imageGradient = new Image(display, rect.width, rect.height); GC gc = new GC(imageGradient);
@Override protected void layout(Composite composite, boolean flushCache) { if (currentPage != null) { currentPage.setBounds(composite.getClientArea()); } }
@Override protected void layout(Composite composite, boolean flushCache) { Rectangle rect = composite.getClientArea(); layout(composite, true, rect.x, rect.y, rect.width, rect.height, flushCache); }
public Rectangle getClientArea() { checkWidget(); Rectangle clientArea = super.getClientArea(); clientArea.x += borderLeft; clientArea.y += borderTop; clientArea.width -= borderLeft + borderRight; clientArea.height -= borderTop + borderBottom; return clientArea; }
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); }
@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); }
@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); }
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); } } }
@Override protected void layout(Composite composite, boolean flushCache) { if (currentPage != null && !currentPage.isDisposed()) { currentPage.setBounds(composite.getClientArea()); } } }
@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); } } }
@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); } }
@Override public void preserveValues( Composite composite ) { WidgetLCAUtil.preserveBackgroundGradient( composite ); WidgetLCAUtil.preserveRoundedBorder( composite ); WidgetLCAUtil.preserveProperty( composite, PROP_CLIENT_AREA, composite.getClientArea() ); }
@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; } } });
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); }
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); }