/** * Sets the background color of the scrolled form text. * * @param bg * the background color */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (content != null) content.setBackground(bg); } /**
/** * Sets the background color of the scrolled form text. * * @param bg * the background color */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (content != null) content.setBackground(bg); } /**
private void createFormText(FormToolkit toolkit, Composite parent, String content, int span) { FormText text = toolkit.createFormText(parent, false); text.setText(content, true, false); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = span; gd.widthHint = 400; text.setLayoutData(gd); text.setBackground(parent.getBackground()); text.addHyperlinkListener(this); }
gd.widthHint = 400; text.setLayoutData(gd); text.setBackground(null); text.addHyperlinkListener(this);
/** * Creates a form text. * * @param parent the parent to put the form text on * @param text the form text to be displayed * @return the created form text * * @see FormToolkit#createFormText(org.eclipse.swt.widgets.Composite, boolean) */ private FormText createFormText(Composite parent, String text) { FormToolkit toolkit= new FormToolkit(getShell().getDisplay()); try { FormText formText= toolkit.createFormText(parent, true); formText.setFont(parent.getFont()); try { formText.setText(text, true, false); } catch (IllegalArgumentException e) { formText.setText(e.getMessage(), false, false); JavaPlugin.log(e); } formText.marginHeight= 2; formText.marginWidth= 0; formText.setBackground(null); formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); return formText; } finally { toolkit.dispose(); } }
/** * Creates a form text. * * @param parent the parent to put the form text on * @param text the form text to be displayed * @return the created form text * * @see FormToolkit#createFormText(org.eclipse.swt.widgets.Composite, boolean) */ private FormText createFormText(Composite parent, String text) { FormToolkit toolkit= new FormToolkit(getShell().getDisplay()); try { FormText formText= toolkit.createFormText(parent, true); formText.setFont(parent.getFont()); try { formText.setText(text, true, false); } catch (IllegalArgumentException e) { formText.setText(e.getMessage(), false, false); JavaPlugin.log(e); } formText.marginHeight= 2; formText.marginWidth= 0; formText.setBackground(null); formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); return formText; } finally { toolkit.dispose(); } }
/** * Creates a form text. * * @param parent the parent to put the form text on * @param text the form text to be displayed * @return the created form text * * @see FormToolkit#createFormText(org.eclipse.swt.widgets.Composite, boolean) */ private FormText createFormText(Composite parent, String text) { FormToolkit toolkit= new FormToolkit(getShell().getDisplay()); try { FormText formText= toolkit.createFormText(parent, true); formText.setFont(parent.getFont()); try { formText.setText(text, true, false); } catch (IllegalArgumentException e) { formText.setText(e.getMessage(), false, false); JavaPlugin.log(e); } formText.marginHeight= 2; formText.marginWidth= 0; formText.setBackground(parent.getBackground()); formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); return formText; } finally { toolkit.dispose(); } }
formText.setBackground(null); formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); formText.addHyperlinkListener(new HyperlinkAdapter() {
completionText.setBackground(backgroundColor); final ImageHyperlink completeButton = createButtonWithText( completionComposite,
bodyText.setBackground(itemColor); bodyText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); CheatSheetStopWatch.printLapTime("ViewItem.addItem()", "Time in addItem() after create FormText: "); //$NON-NLS-1$ //$NON-NLS-2$
FormText formText = page.getToolkit().createFormText(buttonComposite, false); formText.setText(labelText, labelText.startsWith(IParserTags.FORM_START_TAG), false); formText.setBackground(itemColor); subItemLabel = formText; } else {