/** * Creates Heading for a section with the given heading text. * * @param heading * the heading text */ private void createSectionHeading(String heading) { FormText headingText = toolkit.createFormText(mainComposite, false); GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, NUM_COLUMNS, 1); gridData.verticalIndent = 20; headingText.setLayoutData(gridData); headingText.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE)); headingText.setFont("header", JFaceResources.getBannerFont()); headingText.setText("<form><p><span color=\"header\" font=\"header\">" + heading + "</span></p></form>", true, false); }
/** * Create title part based on the sensor configuration being assigned. * * @param parent * Composite to create on. * @param toolkit * {@link FormToolkit} to use. * @return {@link FormText} */ protected FormText createTitle(Composite parent, FormToolkit toolkit) { title = toolkit.createFormText(parent, false); title.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE)); title.setFont("header", JFaceResources.getBannerFont()); return title; }
mainFormText.setColor("info", toolkit.getColors().getColor(IFormColors.TITLE)); mainFormText.setColor("header", getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); mainFormText.setFont("header", JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT)); mainFormText.addHyperlinkListener(new HyperlinkAdapter() { @Override
headingText.setFont("header", JFaceResources.getBannerFont()); headingText.setText("<form><p><span color=\"header\" font=\"header\">Tag Specifications</span></p></form>", true, false); Label infoLabelTags = new Label(main, SWT.RIGHT);
titleFormText.setText("<form><p><span color=\"headingColor\">" + errorCode.getName() + "</span></p></form>", true, false); titleFormText.setColor("headingColor", getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); titleFormText.setFont(JFaceResources.getFont(JFaceResources.HEADER_FONT)); gd = new GridData(SWT.CENTER, SWT.FILL, true, false); titleFormText.setLayoutData(gd); descriptionFormText.setFont("headingFont", JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT)); descriptionFormText.setText(descriptionMessage.toString(), true, false); descriptionFormText.setLayoutData(new TableWrapData(TableWrapData.FILL));
/** * 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(); } }
headingText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, NUM_GRID_COLUMNS - 3, 1)); headingText.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE)); headingText.setFont("header", JFaceResources.getBannerFont()); headingText.setText("<form><p><span color=\"header\" font=\"header\">" + getName() + "</span></p></form>", true, false); addControl(headingText);
try { FormText text = toolkit.createFormText(composite, true); text.setFont(inner.getFont()); if (fParentCanSwitchPage) {
try { FormText text = toolkit.createFormText(composite, true); text.setFont(inner.getFont()); if (fParentCanSwitchPage) {
try { FormText text = toolkit.createFormText(composite, true); text.setFont(inner.getFont()); if (fParentCanSwitchPage) {
upperText.setFont("header", JFaceResources.getHeaderFont()); //$NON-NLS-1$ upperText.setColor("title", toolkit.getColors().getColor(IFormColors.TITLE)); //$NON-NLS-1$ lowerText.marginWidth = 5;
FormText title = toolkit.createFormText(parent, false); title.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE)); title.setFont("header", JFaceResources.getBannerFont()); title.setText("<form><p> <img href=\"titleImage\"/> <span color=\"header\" font=\"header\">" + titleText + "</span></p></form>", true, false); title.setImage("titleImage", titleImage);
IFormColors.TITLE)); codeFont = createCodeFont(parent.getDisplay(), parent.getFont(), JFaceResources.getTextFont()); text.setFont("code", codeFont); //$NON-NLS-1$ String key = IHelpUIConstants.IMAGE_FILE_F1TOPIC; text.setImage(key, HelpUIResources.getImage(key));