@Override public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); container.setLayout(layout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); formText = new ScrolledFormText(container, true); formText.setBackground(parent.getBackground()); GridData gd = new GridData(GridData.FILL_BOTH); gd.widthHint = 300; gd.heightHint = 300; formText.setLayoutData(gd); HyperlinkSettings settings = new HyperlinkSettings(parent.getDisplay()); formText.getFormText().setHyperlinkSettings(settings); setControl(container); updateContent(); PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.REVIEW); } }
/** * 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; }
slowestCount.setHyperlinkSettings(slowestHyperlinkSettings); slowestCount.addHyperlinkListener(getHyperlinkAdapter());
ftext.marginWidth = 2; ftext.marginHeight = 2; ftext.setHyperlinkSettings(toolkit.getHyperlinkGroup()); formText.addDisposeListener(e -> { if (toolkit != null) {