/** * Sets the foreground color of the form. This color will also be used for * the body. */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (content != null) { // also set in setContent() content.setForeground(fg); } }
/** * Sets the foreground color of the form. This color will also be used for * the body. */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (content != null) { // also set in setContent() content.setForeground(fg); } }
/** * Creates a form widget in the provided parent. Note that this widget does * not scroll its content, so make sure there is a scrolled composite up the * parent chain. If you require scrolling, use 'createScrolledForm' instead. * * @param parent * the form parent * @return the form that does not scroll * @see #createScrolledForm */ public Form createForm(Composite parent) { Form formContent = new Form(parent, orientation); formContent.setBackground(colors.getBackground()); formContent.setForeground(colors.getColor(IFormColors.TITLE)); formContent.setFont(JFaceResources.getHeaderFont()); return formContent; }
/** * Creates a form widget in the provided parent. Note that this widget does * not scroll its content, so make sure there is a scrolled composite up the * parent chain. If you require scrolling, use 'createScrolledForm' instead. * * @param parent * the form parent * @return the form that does not scroll * @see #createScrolledForm */ public Form createForm(Composite parent) { checkDisposed(); Form formContent = new Form(parent, orientation); formContent.setBackground(colors.getBackground()); formContent.setForeground(colors.getColor(IFormColors.TITLE)); formContent.setFont(JFaceResources.getHeaderFont()); return formContent; }
private void dynamicCreatePartControl(Composite container) { // Create single toolkit instance, which is disposed of on dispose of // intro part. also define background of all presentation. toolkit = new FormToolkit(container.getDisplay()); // Define presentation title color Color bg = sharedStyleManager.getColor(toolkit, "bg"); //$NON-NLS-1$ if (bg != null) { toolkit.setBackground(bg); } toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode( HyperlinkSettings.UNDERLINE_HOVER); // Define presentation title color and image. Form mainForm = toolkit.createForm(container); Color fg = sharedStyleManager.getColor(toolkit, "title.fg"); //$NON-NLS-1$ if (fg != null) mainForm.setForeground(fg); Image bgImage = sharedStyleManager.getImage("title.image", null, null); //$NON-NLS-1$ if (bgImage != null) { mainForm.setBackgroundImage(bgImage); String repeat = sharedStyleManager .getProperty("title.image.repeat"); //$NON-NLS-1$ if (repeat != null && repeat.equalsIgnoreCase("true")) //$NON-NLS-1$ mainForm.setBackgroundImageTiled(true); } mainPageBook = createMainPageBook(toolkit, mainForm); // Add this presentation as a listener to model. getModel().addPropertyListener(this); addToolBarActions(); }