Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.ColorSelector


    // text color label
    Label colorText = new Label(settingsComposite, SWT.NONE);
    colorText.setText("Color:");

    mColorSelector = new ColorSelector(settingsComposite);
    mColorSelector.setEnabled(false);
    mColorSelector.addListener(new IPropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent event) {
        if (mCurrentSelectedAnnotation == null) {
          mCurrentSelectedAnnotation = getDefaultAnnotation();
View Full Code Here


    else
      styleRow2 = createComposite(parent, 6);
    // row 2 - foreground label, button, background label, button, bold,
    // italics?
    fForegroundLabel = createLabel(styleRow2, SSEUIMessages.Foreground_UI_); //$NON-NLS-1$ = "Foreground"
    fForeground = new ColorSelector(styleRow2);
    fForeground.getButton().setLayoutData(new GridData());
    setAccessible(fForeground.getButton(), fForegroundLabel.getText());
    fForeground.getButton().getAccessible().addAccessibleControlListener(foregroundAccListener); // defect
    // 200764
    // -
    // ACC:display
    // values
    // for
    // color
    // buttons
    ((GridData) fForeground.getButton().getLayoutData()).minimumWidth = 20;
    fBackgroundLabel = createLabel(styleRow2, SSEUIMessages.Background_UI_); //$NON-NLS-1$ = "Background"
    fBackground = new ColorSelector(styleRow2);
    fBackground.getButton().setLayoutData(new GridData());
    setAccessible(fBackground.getButton(), fBackgroundLabel.getText());
    fBackground.getButton().getAccessible().addAccessibleControlListener(backgroundAccListener); // defect
    // 200764
    // -
View Full Code Here

    fForegroundLabel = createLabel(editControls, SSEUIMessages.Foreground_UI_);
    ((GridData) fForegroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fForegroundLabel.setEnabled(false);

    fForegroundColorEditor = new ColorSelector(editControls);
    Button fForegroundColor = fForegroundColorEditor.getButton();
    GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fForegroundColor.setLayoutData(gd);
    fForegroundColorEditor.setEnabled(false);

    fBackgroundLabel = createLabel(editControls, SSEUIMessages.Background_UI_);
    ((GridData) fBackgroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fBackgroundLabel.setEnabled(false);

    fBackgroundColorEditor = new ColorSelector(editControls);
    Button fBackgroundColor = fBackgroundColorEditor.getButton();
    gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fBackgroundColor.setLayoutData(gd);
    fBackgroundColorEditor.setEnabled(false);
View Full Code Here

    fForegroundLabel = createLabel(editControls, SSEUIMessages.Foreground_UI_);
    ((GridData) fForegroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fForegroundLabel.setEnabled(false);

    fForegroundColorEditor = new ColorSelector(editControls);
    Button fForegroundColor = fForegroundColorEditor.getButton();
    GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fForegroundColor.setLayoutData(gd);
    fForegroundColorEditor.setEnabled(false);
    fForegroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
      public void getName (final AccessibleEvent e) {
        e.result = SSEUIMessages.Foreground_Color_Selector_Button;
      }
    });

    fBackgroundLabel = createLabel(editControls, SSEUIMessages.Background_UI_);
    ((GridData) fBackgroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fBackgroundLabel.setEnabled(false);

    fBackgroundColorEditor = new ColorSelector(editControls);
    Button fBackgroundColor = fBackgroundColorEditor.getButton();
    gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fBackgroundColor.setLayoutData(gd);
    fBackgroundColorEditor.setEnabled(false);
    fBackgroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
View Full Code Here

        {
            final int index = i;

            errorTypeLabels[i] = BaseWidgetUtils.createLabel( errorComposite, ERROR_TYPES[i], 1 );
            errorTypeLabels[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            errorColorSelectors[i] = new ColorSelector( errorComposite );
            errorBoldButtons[i] = BaseWidgetUtils.createCheckbox( errorComposite, "Bold", 1 );
            errorItalicButtons[i] = BaseWidgetUtils.createCheckbox( errorComposite, "Italic", 1 );

            FontData[] fontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
                .getPreferenceStore(), ERROR_FONT_CONSTANTS[i] );
            RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                ERROR_COLOR_CONSTANTS[i] );
            setErrors( index, fontDatas, rgb );
        }

        BaseWidgetUtils.createSpacer( composite, 1 );
        BaseWidgetUtils.createSpacer( composite, 1 );
        Group otherGroup = BaseWidgetUtils.createGroup( composite, "Quick Filter Colors and Fonts", 1 );
        otherGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        Composite otherComposite = BaseWidgetUtils.createColumnContainer( otherGroup, 4, 1 );
        quickfilterTypeLabel = BaseWidgetUtils.createLabel( otherComposite, "Quick Filter", 1 );
        quickfilterTypeLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        quickfilterForegroundColorSelector = new ColorSelector( otherComposite );
        quickfilterBoldButton = BaseWidgetUtils.createCheckbox( otherComposite, "Bold", 1 );
        quickfilterItalicButton = BaseWidgetUtils.createCheckbox( otherComposite, "Italic", 1 );
        Label quickfilterBgLabel = BaseWidgetUtils.createLabel( otherComposite, "Quick Filter Background", 1 );
        quickfilterBgLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        quickfilterBackgroundColorSelector = new ColorSelector( otherComposite );
        FontData[] qfFontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
            .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_QUICKFILTER_FONT );
        RGB qfBgRgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
            BrowserCommonConstants.PREFERENCE_QUICKFILTER_BACKGROUND_COLOR );
        RGB qfFgRgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
View Full Code Here

        {
            final int index = i;

            attributeTypeLabels[i] = BaseWidgetUtils.createLabel( colorsAndFontsComposite, ATTRIBUTE_TYPES[i], 1 );
            attributeTypeLabels[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            attributeColorSelectors[i] = new ColorSelector( colorsAndFontsComposite );
            attributeBoldButtons[i] = BaseWidgetUtils.createCheckbox( colorsAndFontsComposite, "Bold", 1 );
            attributeItalicButtons[i] = BaseWidgetUtils.createCheckbox( colorsAndFontsComposite, "Italic", 1 );

            FontData[] fontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
                .getPreferenceStore(), ATTRIBUTE_FONT_CONSTANTS[i] );
View Full Code Here

        Composite stylesComposite = BaseWidgetUtils.createColumnContainer( editorComposite, 1, 1 );
        stylesComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
        Composite colorComposite = BaseWidgetUtils.createColumnContainer( stylesComposite, 2, 1 );
        BaseWidgetUtils.createLabel( colorComposite, "Color:", 1 );
        colorSelector = new ColorSelector( colorComposite );
        boldCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Bold", 1 );
        italicCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Italic", 1 );
        strikethroughCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Strikethrough", 1 );
        underlineCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Underline", 1 );
View Full Code Here

        Composite errorComposite = BaseWidgetUtils.createColumnContainer( errorGroup, 4, 1 );
        for ( int i = 0; i < ERROR_TYPES.length; i++ )
        {
            errorTypeLabels[i] = BaseWidgetUtils.createLabel( errorComposite, ERROR_TYPES[i], 1 );
            errorTypeLabels[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            errorColorSelectors[i] = new ColorSelector( errorComposite );
            errorBoldButtons[i] = BaseWidgetUtils.createCheckbox( errorComposite, "Bold", 1 );
            errorItalicButtons[i] = BaseWidgetUtils.createCheckbox( errorComposite, "Italic", 1 );

            FontData[] fontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
                .getPreferenceStore(), ERROR_FONT_CONSTANTS[i] );
            RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                ERROR_COLOR_CONSTANTS[i] );
            setErrors( i, fontDatas, rgb );
        }

        // quick filter
        BaseWidgetUtils.createSpacer( composite, 1 );
        BaseWidgetUtils.createSpacer( composite, 1 );
        Group otherGroup = BaseWidgetUtils.createGroup( composite, "Quick Filter Colors and Fonts", 1 );
        otherGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        Composite otherComposite = BaseWidgetUtils.createColumnContainer( otherGroup, 4, 1 );
        quickfilterTypeLabel = BaseWidgetUtils.createLabel( otherComposite, "Quick Filter", 1 );
        quickfilterTypeLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        quickfilterForegroundColorSelector = new ColorSelector( otherComposite );
        quickfilterBoldButton = BaseWidgetUtils.createCheckbox( otherComposite, "Bold", 1 );
        quickfilterItalicButton = BaseWidgetUtils.createCheckbox( otherComposite, "Italic", 1 );
        Label quickfilterBgLabel = BaseWidgetUtils.createLabel( otherComposite, "Quick Filter Background", 1 );
        quickfilterBgLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        quickfilterBackgroundColorSelector = new ColorSelector( otherComposite );
        FontData[] qfFontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
            .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_QUICKFILTER_FONT );
        RGB qfBgRgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
            BrowserCommonConstants.PREFERENCE_QUICKFILTER_BACKGROUND_COLOR );
        RGB qfFgRgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
            BrowserCommonConstants.PREFERENCE_QUICKFILTER_FOREGROUND_COLOR );
        setQuickfilter( qfFontDatas, qfFgRgb, qfBgRgb );

        // attribute
        BaseWidgetUtils.createSpacer( composite, 1 );
        BaseWidgetUtils.createSpacer( composite, 1 );
        Group colorsAndFontsGroup = BaseWidgetUtils.createGroup( composite, "Attribute Colors and Fonts", 1 );
        colorsAndFontsGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        Composite colorsAndFontsComposite = BaseWidgetUtils.createColumnContainer( colorsAndFontsGroup, 4, 1 );
        for ( int i = 0; i < ATTRIBUTE_TYPES.length; i++ )
        {
            attributeTypeLabels[i] = BaseWidgetUtils.createLabel( colorsAndFontsComposite, ATTRIBUTE_TYPES[i], 1 );
            attributeTypeLabels[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            attributeColorSelectors[i] = new ColorSelector( colorsAndFontsComposite );
            attributeBoldButtons[i] = BaseWidgetUtils.createCheckbox( colorsAndFontsComposite, "Bold", 1 );
            attributeItalicButtons[i] = BaseWidgetUtils.createCheckbox( colorsAndFontsComposite, "Italic", 1 );

            FontData[] fontDatas = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
                .getPreferenceStore(), ATTRIBUTE_FONT_CONSTANTS[i] );
View Full Code Here

        Composite stylesComposite = BaseWidgetUtils.createColumnContainer( editorComposite, 1, 1 );
        stylesComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
        Composite colorComposite = BaseWidgetUtils.createColumnContainer( stylesComposite, 2, 1 );
        BaseWidgetUtils.createLabel( colorComposite, "Color:", 1 );
        colorSelector = new ColorSelector( colorComposite );
        boldCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Bold", 1 );
        italicCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Italic", 1 );
        strikethroughCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Strikethrough", 1 );
        underlineCheckBox = BaseWidgetUtils.createCheckbox( stylesComposite, "Underline", 1 );
View Full Code Here

    fForegroundLabel = createLabel(editControls, SSEUIMessages.Foreground_UI_);
    ((GridData) fForegroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fForegroundLabel.setEnabled(false);

    fForegroundColorEditor = new ColorSelector(editControls);
    Button fForegroundColor = fForegroundColorEditor.getButton();
    GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fForegroundColor.setLayoutData(gd);
    fForegroundColorEditor.setEnabled(false);
    fForegroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
      public void getName (final AccessibleEvent e) {
        e.result = SSEUIMessages.Foreground_Color_Selector_Button;
      }
    });

    fBackgroundLabel = createLabel(editControls, SSEUIMessages.Background_UI_);
    ((GridData) fBackgroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
    fBackgroundLabel.setEnabled(false);

    fBackgroundColorEditor = new ColorSelector(editControls);
    Button fBackgroundColor = fBackgroundColorEditor.getButton();
    gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
    fBackgroundColor.setLayoutData(gd);
    fBackgroundColorEditor.setEnabled(false);
    fBackgroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.ColorSelector

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.