@Override protected void layout(Composite composite, boolean flushCache) { if (currentPage != null) { currentPage.setBounds(composite.getClientArea()); } }
public void setBounds(Rectangle bounds) { if (control != null) { control.setBounds(bounds); } layoutIfNecessary(); }
protected void layout(Composite composite, boolean flushCache) { Control[] children = composite.getChildren(); Point p1 = children[1].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); Point p2 = children[2].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); Rectangle r = composite.getClientArea(); children[2].setBounds(r.x + INDENT, r.y + r.height - p2.y, r.width - INDENT, p2.y); children[1].setBounds(r.x + INDENT, r.y + r.height - p2.y - p1.y - SPACING, r.width - INDENT, p1.y); children[0].setBounds(r.x, r.y, r.width, r.height - p1.y - p2.y - SPACING * 3); } }
void setBoundsInPixels (Rectangle rect) { checkWidget (); if (rect == null) error (SWT.ERROR_NULL_ARGUMENT); setBounds (rect.x, rect.y, Math.max (0, rect.width), Math.max (0, rect.height), true, true); }
void setSizeInPixels (Point size) { checkWidget (); if (size == null) error (SWT.ERROR_NULL_ARGUMENT); setBounds (0, 0, Math.max (0, size.x), Math.max (0, size.y), false, true); }
@Override protected void layout(Composite composite, boolean flushCache) { if (currentPage != null && !currentPage.isDisposed()) { currentPage.setBounds(composite.getClientArea()); } } }
public void layout(Composite composite, boolean force) { Rectangle rect = getClientArea(composite); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setBounds(rect); } }
/** * Lays outs the page according to this layout. * * @param w * the control */ public void layoutPage(Control w) { w.setBounds(getClientArea(w.getParent())); }
protected void layout(Composite composite, boolean flushCache) { CTabFolder folder = (CTabFolder)composite; // resize content if (folder.selectedIndex != -1) { Control control = folder.items[folder.selectedIndex].control; if (control != null && !control.isDisposed()) { control.setBounds(folder.getClientArea()); } } } }
void setLocationInPixels (Point location) { checkWidget (); if (location == null) error (SWT.ERROR_NULL_ARGUMENT); setBounds (location.x, location.y, 0, 0, true, false); }
protected void layout (Composite composite, boolean flushCache) { Rectangle rect= composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setBounds(rect); } } }
@Override protected void layout (Composite composite, boolean flushCache) { Rectangle rect= composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setBounds(rect); } } }
@Override public void layout(GC gc, int width, Locator loc, Hashtable<String, Object> resourceTable, boolean selected) { super.layout(gc, width, loc, resourceTable, selected); Control control = getControl(resourceTable); if (control!=null) control.setBounds(getBounds()); }
@Override int setBounds(int x, int y, int width, int height, boolean move, boolean resize) { int result = super.setBounds (x, y, width,height, move, resize); if ((result & RESIZED) != 0) { layout.setWidth (DPIUtil.autoScaleDown((width > 0 ? width : -1))); redraw (); } return result; }
@Override public void layout(GC gc, int width, Locator loc, Hashtable<String, Object> resourceTable, boolean selected) { super.layout(gc, width, loc, resourceTable, selected); Control control = getControl(resourceTable); if (control!=null) control.setBounds(getBounds()); }
@Override public void layout(Composite editor, boolean force) { Rectangle bounds = editor.getClientArea(); Point size = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, force); if (contents != null) { contents.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); }
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) { CTabFolder folder = (CTabFolder)composite; // resize content if (folder.selectedIndex != -1) { // Control control = folder.items[folder.selectedIndex].getControl(); Control control = folder.getItem( folder.selectedIndex ).getControl(); if (control != null && !control.isDisposed()) { control.setBounds(folder.getClientArea()); } } } }
private void updateSelectedItemControl() { int index = getSelectionIndex(); if( index != -1 ) { Control control = getItem( index ).getControl(); if( control != null && !control.isDisposed() ) { control.setBounds( getClientArea() ); control.setVisible( true ); } } }