/** * Creates the new scrolled text instance in the provided parent * * @param parent * the parent composite * @param style * the style to pass to the scrolled composite * @param createFormText * if <code>true</code>, enclosing form text instance will be * created in this constructor. */ public ScrolledFormText(Composite parent, int style, boolean createFormText) { super(parent, style); if (createFormText) setFormText(new FormText(this, SWT.NULL)); } /**
/** * Creates the new scrolled text instance in the provided parent * * @param parent * the parent composite * @param style * the style to pass to the scrolled composite * @param createFormText * if <code>true</code>, enclosing form text instance will be * created in this constructor. */ public ScrolledFormText(Composite parent, int style, boolean createFormText) { super(parent, style); if (createFormText) setFormText(new FormText(this, SWT.NULL)); } /**
label.setText("Description:"); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); description = new FormText(group, SWT.NO_FOCUS | SWT.WRAP); GridData gd = new GridData(SWT.FILL, SWT.TOP, true, false); gd.widthHint = 400;
/** * {@inheritDoc} */ @Override protected Control createContents(Composite parent) { mainComposite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(4, false); layout.marginHeight = 0; layout.marginWidth = 0; mainComposite.setLayout(layout); boolean advancedCreated = false; for (SingleProperty<?> property : properties) { if (!advancedCreated && property.isAdvanced()) { advancedText = new FormText(mainComposite, SWT.WRAP); advancedText.setText("<form><p><b>Advanced properties:</b></p></form>", true, false); advancedText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 4, 1)); advancedCreated = true; } createSinglePropertyContents(property, mainComposite); } Dialog.applyDialogFont(mainComposite); showAdvanced(advancedVisible); mainComposite.layout(); return mainComposite; }
FormText headingText = new FormText(main, SWT.NONE); headingText.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, NUM_LAYOUT_COLUMNS - 1, 1)); headingText.setFont("header", JFaceResources.getBannerFont()); final FormText addText = new FormText(main, SWT.NONE); addText.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, NUM_LAYOUT_COLUMNS, 1)); addText.setText("<form><p>Add tag specification ... <a href=\"delete\"><img href=\"addImg\" /></a></p></form>", true, false);
/** * Creates a rich text as a part of the form. * * @param parent * the rich text parent * @param trackFocus * if <code>true</code>, the toolkit will monitor focus * transfers to ensure that the hyperlink in focus is visible in * the form. * @return the rich text widget */ public FormText createFormText(Composite parent, boolean trackFocus) { FormText engine = new FormText(parent, SWT.WRAP | orientation); engine.marginWidth = 1; engine.marginHeight = 0; engine.setHyperlinkSettings(getHyperlinkGroup()); adapt(engine, trackFocus, true); engine.setMenu(parent.getMenu()); return engine; }
/** * Creates a rich text as a part of the form. * * @param parent * the rich text parent * @param trackFocus * if <code>true</code>, the toolkit will monitor focus * transfers to ensure that the hyperlink in focus is visible in * the form. * @return the rich text widget */ public FormText createFormText(Composite parent, boolean trackFocus) { checkDisposed(); FormText engine = new FormText(parent, SWT.WRAP | orientation); engine.marginWidth = 1; engine.marginHeight = 0; engine.setHyperlinkSettings(getHyperlinkGroup()); adapt(engine, trackFocus, true); engine.setMenu(parent.getMenu()); return engine; }
FormText storageInfo = new FormText(lowerComposite, SWT.NONE); storageInfo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1)); storageInfo.setImage("storage", InspectIT.getDefault().getImage(InspectITImages.IMG_STORAGE));