composite.setLayout(new FillLayout(SWT.HORIZONTAL)); composite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1)); composite.setBounds(0, 0, 64, 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); }
@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)); }
@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)); }
@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); }
@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); }
@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); }
.... 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) } } ....
private void layoutFacade( final Composite facade ) { Rectangle bounds = composite.getBounds(); facade.setBounds( 0, 0, bounds.width, bounds.height ); facade.moveAbove( null ); }
@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; }
@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; }
@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; }
@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; }
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);
@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; }
@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; }
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); } });
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; }
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)); } });
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)); } });