Package org.eclipse.ui.forms

Examples of org.eclipse.ui.forms.FormColors


        {
            super( parent, Section.TITLE_BAR );
           
            final FormToolkit toolkit = managedForm.getToolkit();
           
            FormColors colors = toolkit.getColors();
            this.setMenu(parent.getMenu());
            toolkit.adapt(this, true, true);
            if (this.toggle != null) {
                this.toggle.setHoverDecorationColor(colors
                        .getColor(IFormColors.TB_TOGGLE_HOVER));
                this.toggle.setDecorationColor(colors
                        .getColor(IFormColors.TB_TOGGLE));
            }
            this.setFont(createBoldFont(colors.getDisplay(), this.getFont()));
            colors.initializeSectionToolBarColors();
            this.setTitleBarBackground(colors.getColor(IFormColors.TB_BG));
            this.setTitleBarBorderColor(colors
                    .getColor(IFormColors.TB_BORDER));
            this.setTitleBarForeground(colors
                    .getColor(IFormColors.TB_TOGGLE));
           
            this.marginWidth = 10;
            this.marginHeight = 10;
            setLayoutData( gdfill() );
View Full Code Here


  public ScrolledCompositeImpl(Composite parent, int style) {
    super(parent, style);

    setFont(parent.getFont());

    FormColors colors = new FormColors(parent.getDisplay());
    colors.setBackground(null);
    colors.setForeground(null);

    fToolkit = new FormToolkit(colors);

    setExpandHorizontal(true);
    setExpandVertical(true);
View Full Code Here

    return resultImg;
  }

  public FormColors getFormColors(Display display) {
    if (formColors == null) {
      formColors = new FormColors(display);
      formColors.markShared();
    }
    return formColors;
  }
View Full Code Here

  public void createPart(Composite parent) {
    init(parent.getDisplay());
    toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
    form = toolkit.createScrolledForm(parent);   
    form.setLayoutData(new GridData(GridData.FILL_BOTH));
    FormColors colors = toolkit.getColors();
    /*
    colors.initializeSectionToolBarColors();
    Color gbg = colors.getColor(FormColors.TB_GBG);
    Color bg = colors.getBackground();
    form.getForm().setTextBackground(new Color[]{bg, gbg}, new int [] {100}, true);
    form.getForm().setSeparatorColor(colors.getColor(FormColors.TB_BORDER));
    form.getForm().setSeparatorVisible(true);
    */
    toolkit.decorateFormHeading(form.getForm());
    mform = new ManagedForm(toolkit, form);
    GridLayout glayout = new GridLayout();
    glayout.marginHeight = 0;
    glayout.marginWidth = 0;
    form.getBody().setLayout(glayout);
    final SashForm sash = new SashForm(form.getBody(), SWT.NULL);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 10;
    gd.heightHint = 10;
    sash.setLayoutData(gd);
    sash.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Point size = sash.getSize();
        if (size.x>size.y)
          sash.setOrientation(SWT.HORIZONTAL);
        else
          sash.setOrientation(SWT.VERTICAL);
        updateSashPanelMargins(sash);
      }
    });
    sash.setBackground(colors.getColor(IFormColors.TB_BG));
   
    Composite explorerPanel = new Composite(sash, SWT.NULL);
    explorerPanel.setBackground(colors.getColor(IFormColors.TB_BORDER));
    GridLayout playout = new GridLayout();
    playout.marginWidth = 0;
    playout.marginTop = 2;
    playout.marginBottom = 0;
    explorerPanel.setLayout(playout);
    toolkit.adapt(explorerPanel);
    explorerContainer = new PageBook(explorerPanel, SWT.NULL);
    explorerContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
    Composite editorPanel = new Composite(sash, SWT.NULL);
    playout = new GridLayout();
    playout.marginWidth = 0;
    playout.marginHeight = 0;
    editorPanel.setLayout(playout);
    editorPanel.setBackground(colors.getColor(IFormColors.TB_BORDER));   
    taskEditorContainer = new PageBook(editorPanel, SWT.NULL);
    toolkit.adapt(taskEditorContainer);
    taskEditorContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
  }
View Full Code Here

   
    this.getShell().setText("Add custom converter");
   
    //FIXME thats way too ugly. have to figure out how this works better
    FormToolkit oldToolkit = DozerUiUtils.getToolKit();
    FormToolkit toolkit = new FormToolkit(new FormColors(parent.getDisplay()));
    toolkit.setBackground(parent.getBackground());
    DozerUiUtils.setToolKit(toolkit);
   
    IObservableValue customConverter = DozerUiUtils.createLabelClassBrowse(
        composite,
View Full Code Here

 
  private FormToolkit fDialogsFormToolkit;
 
  public FormToolkit getDialogsFormToolkit() {
    if (fDialogsFormToolkit == null) {
      FormColors colors= new FormColors(Display.getCurrent());
      colors.setBackground(null);
      colors.setForeground(null);
      fDialogsFormToolkit= new FormToolkit(colors);
    }
    return fDialogsFormToolkit;
  }
View Full Code Here

    }
  }

  public FormColors getFormColors(Display display) {
    if (formColors == null) {
      formColors = new FormColors(display);
      formColors.markShared();
    }
    return formColors;
  }
View Full Code Here

    busy.setLayoutData(gd);
  }

  private void addHeadingGradient(FormToolkit toolkit, ScrolledForm form,
      boolean add) {
    FormColors colors = toolkit.getColors();
    Color top = colors.getColor(IFormColors.H_GRADIENT_END);
    Color bot = colors.getColor(IFormColors.H_GRADIENT_START);
    if (add)
      form.getForm().setTextBackground(new Color[] { top, bot },
          new int[] { 100 }, true);
    else {
      form.getForm().setTextBackground(null, null, false);
      form.getForm().setBackground(colors.getBackground());
    }
    form.getForm().setHeadColor(IFormColors.H_BOTTOM_KEYLINE1,
        add ? colors.getColor(IFormColors.H_BOTTOM_KEYLINE1) : null);
    form.getForm().setHeadColor(IFormColors.H_BOTTOM_KEYLINE2,
        add ? colors.getColor(IFormColors.H_BOTTOM_KEYLINE2) : null);
    form.getForm().setHeadColor(IFormColors.H_HOVER_LIGHT,
        add ? colors.getColor(IFormColors.H_HOVER_LIGHT) : null);
    form.getForm().setHeadColor(IFormColors.H_HOVER_FULL,
        add ? colors.getColor(IFormColors.H_HOVER_FULL) : null);
    form.getForm().setHeadColor(IFormColors.TB_TOGGLE,
        add ? colors.getColor(IFormColors.TB_TOGGLE) : null);
    form.getForm().setHeadColor(IFormColors.TB_TOGGLE_HOVER,
        add ? colors.getColor(IFormColors.TB_TOGGLE_HOVER) : null);
    form.getForm().setSeparatorVisible(add);
    form.reflow(true);
    form.redraw();
  }
View Full Code Here

     * @param display
     * @return
     */
    public FormColors getRuleBuilderFormColors(Display display) {
        if ( ruleBuilderFormColors == null ) {
            ruleBuilderFormColors = new FormColors( display );
            ruleBuilderFormColors.markShared();
        }
        return ruleBuilderFormColors;
    }
View Full Code Here

  }

  protected Composite createToolTipContentArea(Event event, Composite parent) {

    FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    FormColors colors = toolkit.getColors();
    Color top = colors.getColor(IFormColors.H_GRADIENT_END);
    Color bot = colors.getColor(IFormColors.H_GRADIENT_START);

    // create the base form
    Form form = toolkit.createForm(parent);
    form.setText(title);
    form.setTextBackground(new Color[] { top, bot }, new int[] { 100 }, true);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.FormColors

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.