mainPanel.setSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) ); scrollpane.setMinSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) ); BaseStepDialog.setSize( shell, 250, 400, false );
@PostConstruct void createWidget(Composite parent, MToolControl tc) { Composite comp = new Composite(parent, SWT.NONE) { @Override public Point computeSize(int wHint, int hHint, boolean flushCache) { return new Point(0, 0); } }; comp.setSize(0, 0); } }
@Override public void controlResized(ControlEvent e) { settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } });
@Override public void controlResized(ControlEvent e) { settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } });
void relayout() { Point size = getSize(); int height = layoutItems(); if ((style & SWT.VERTICAL) != 0) { Rectangle trim = computeTrim (0, 0, height, 0); if (height != size.x) super.setSize(trim.width, size.y); } else { Rectangle trim = computeTrim (0, 0, 0, height); if (height != size.y) super.setSize(size.x, trim.height); } } /**
void relayout() { Point size = getSize(); int height = layoutItems(); if ((style & SWT.VERTICAL) != 0) { Rectangle trim = computeTrim (0, 0, height, 0); if (height != size.x) super.setSize(trim.width, size.y); } else { Rectangle trim = computeTrim (0, 0, 0, height); if (height != size.y) super.setSize(size.x, trim.height); } } /**
private void setHostSize() { if (hostPane == null || hostPane.isDisposed()) return; int xSize = 600; String xSizeStr = toolControl.getPersistedState().get(STATE_XSIZE); if (xSizeStr != null) xSize = Integer.parseInt(xSizeStr); int ySize = 400; String ySizeStr = toolControl.getPersistedState().get(STATE_YSIZE); if (ySizeStr != null) ySize = Integer.parseInt(ySizeStr); hostPane.setSize(xSize, ySize); }
/** * Fits the width of the main composite to the same width scrolled composite was given. */ private void fitSizeOfScrolledContent() { Point p = scrollComposite.getSize(); main.setSize(main.computeSize(p.x, SWT.DEFAULT)); }
void relayout() { Point size = getSize(); int height = layoutItems(); if ((style & SWT.VERTICAL) != 0) { Rectangle trim = computeTrim (0, 0, height, 0); if (height != size.x) super.setSize(trim.width, size.y); } else { Rectangle trim = computeTrim (0, 0, 0, height); if (height != size.y) super.setSize(size.x, trim.height); } } /**
void relayout() { Point size = getSize(); int height = layoutItems(); if ((style & SWT.VERTICAL) != 0) { Rectangle trim = computeTrim (0, 0, height, 0); if (height != size.x) super.setSize(trim.width, size.y); } else { Rectangle trim = computeTrim (0, 0, 0, height); if (height != size.y) super.setSize(size.x, trim.height); } } /**
ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); Composite composite = new Composite(sc, SWT.NONE); sc.setContent(composite); Label lblRelation = new Label(composite, SWT.NONE); lblRelation.setBounds(10, 13, 74, 15); lblRelation.setText("Label name:"); composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
void relayout() { Point size = getSize(); int height = layoutItems(); if ((style & SWT.VERTICAL) != 0) { Rectangle trim = computeTrim (0, 0, height, 0); if (height != size.x) super.setSize(trim.width, size.y); } else { Rectangle trim = computeTrim (0, 0, 0, height); if (height != size.y) super.setSize(size.x, trim.height); } }
ScrolledComposite sc = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); sc.setBounds(0, 0, 200, 200); Composite content = new Composite(sc, SWT.NONE); content.setSize(300, 300); sc.setContent(content); Button button = new Button(content, SWT.PUSH); button.setText("Button"); button.setBounds(50, 50, 100, 50);
/** * Sets the error message. * * @param msg the new error message */ protected void setErrorMessage(String msg) { errorMessageUI.setText(msg); Composite shell = errorMessageUI.getParent(); while (!(shell instanceof Shell)) shell = shell.getParent(); shell.setSize(shell.computeSize(-1, -1)); }
public void createControl(Composite parent) { PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.IMPORT_CLASS_WIZARD_P1); initializeDialogUnits(parent); Composite aComposite = new Composite(parent, SWT.NULL); aComposite.setLayout(new GridLayout()); aComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); aComposite.setSize(aComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); aComposite.setFont(parent.getFont()); createImportTypeGroup(aComposite); setControl(aComposite); }
@Override public void setSize(int width, int height, boolean fullscreen) { int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height); platform.comp.setSize(rawWidth, rawHeight); platform.shell.setFullScreen(fullscreen); platform.shell.pack(); }
@Override public void setInput(CustomInformationControl control, Object input) { AnnotationEditingControl annotationEditControl = (AnnotationEditingControl) control .getControl(); annotationEditControl.displayFeatureStructure((FeatureStructure) input); control.getParent().setSize(annotationEditControl.getSize()); }
@Override public void setSize(int width, int height, boolean fullscreen) { int rawWidth = ctx.scale.scaledCeil(width), rawHeight = ctx.scale.scaledCeil(height); platform.comp.setSize(rawWidth, rawHeight); platform.shell.setFullScreen(fullscreen); platform.shell.pack(); }
@Override public void setSize (int width, int height, boolean fullscreen) { plat.composite().setSize(width, height); plat.shell().setFullScreen(fullscreen); plat.shell().pack(); }
@Override public void setSize (int width, int height, boolean fullscreen) { plat.composite().setSize(width, height); plat.shell().setFullScreen(fullscreen); plat.shell().pack(); }