Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.ColorSelector


    final Composite rootControl = new Composite(parent, SWT.NONE);
    rootControl.setLayout(createGaplessGridLayout(2, false));

    Label label = new Label(rootControl, SWT.NONE);
    label.setText("Name color:");
    nameColorSelector = new ColorSelector(rootControl);
    nameColorSelector.setColorValue(new RGB(0, 0, 0));
    nameColorSelector.setEnabled(false);

    label = new Label(rootControl, SWT.NONE);
    label.setText("Row background color:");
    rowColorSelector = new ColorSelector(rootControl);
    rowColorSelector.setColorValue(new RGB(255, 255, 255));
    rowColorSelector.setEnabled(false);
   
    return rootControl;
  }
View Full Code Here


    final Composite rootControl = new Composite(parent, SWT.NONE);
    rootControl.setLayout(createGaplessGridLayout(2, false));

    Label label = new Label(rootControl, SWT.NONE);
    label.setText("Name color:");
    nameColorSelector = new ColorSelector(rootControl);
    nameColorSelector.addListener(new IPropertyChangeListener() {
      @Override
      public void propertyChange(PropertyChangeEvent event) {
        if (event.getProperty().equals("colorValue")) {
          tagModified = true;
        }
      }
    });

    label = new Label(rootControl, SWT.NONE);
    label.setText("Row background color:");
    rowColorSelector = new ColorSelector(rootControl);
    rowColorSelector.addListener(new IPropertyChangeListener() {
      @Override
      public void propertyChange(PropertyChangeEvent event) {
        if (event.getProperty().equals("colorValue")) {
          tagModified = true;
View Full Code Here

        consoleGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );

        // Debug
        Label debugLabel = new Label( consoleGroup, SWT.NONE );
        debugLabel.setText( "Debug:" );
        debugColorButton = new ColorSelector( consoleGroup );
        debugColorButton.getButton().setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false ) );
        debugBoldCheckbox = new Button( consoleGroup, SWT.CHECK );
        debugBoldCheckbox.setText( "Bold" );
        debugItalicCheckbox = new Button( consoleGroup, SWT.CHECK );
        debugItalicCheckbox.setText( "Italic" );

        // Info
        Label infoLabel = new Label( consoleGroup, SWT.NONE );
        infoLabel.setText( "Info:" );
        infoColorButton = new ColorSelector( consoleGroup );
        infoColorButton.getButton().setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false ) );
        infoBoldCheckbox = new Button( consoleGroup, SWT.CHECK );
        infoBoldCheckbox.setText( "Bold" );
        infoItalicCheckbox = new Button( consoleGroup, SWT.CHECK );
        infoItalicCheckbox.setText( "Italic" );

        // Warn
        Label warnLabel = new Label( consoleGroup, SWT.NONE );
        warnLabel.setText( "Warn:" );
        warnColorButton = new ColorSelector( consoleGroup );
        warnColorButton.getButton().setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false ) );
        warnBoldCheckbox = new Button( consoleGroup, SWT.CHECK );
        warnBoldCheckbox.setText( "Bold" );
        warnItalicCheckbox = new Button( consoleGroup, SWT.CHECK );
        warnItalicCheckbox.setText( "Italic" );

        // Error
        Label errorLabel = new Label( consoleGroup, SWT.NONE );
        errorLabel.setText( "Error:" );
        errorColorButton = new ColorSelector( consoleGroup );
        errorColorButton.getButton().setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false ) );
        errorBoldCheckbox = new Button( consoleGroup, SWT.CHECK );
        errorBoldCheckbox.setText( "Bold" );
        errorItalicCheckbox = new Button( consoleGroup, SWT.CHECK );
        errorItalicCheckbox.setText( "Italic" );

        // Fatal
        Label fatalLabel = new Label( consoleGroup, SWT.NONE );
        fatalLabel.setText( "Fatal:" );
        fatalColorButton = new ColorSelector( consoleGroup );
        fatalColorButton.getButton().setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false ) );
        fatalBoldCheckbox = new Button( consoleGroup, SWT.CHECK );
        fatalBoldCheckbox.setText( "Bold" );
        fatalItalicCheckbox = new Button( consoleGroup, SWT.CHECK );
        fatalItalicCheckbox.setText( "Italic" );
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

        fColorEditorLabel.setText(Messages.SyntaxColoringPreferencePage_color);
        gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
        gd.horizontalIndent= 20;
        fColorEditorLabel.setLayoutData(gd);
   
        fSyntaxForegroundColorEditor= new ColorSelector(stylesComposite);
        Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton();
        gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
        foregroundColorButton.setLayoutData(gd);
       
        fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
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

    // 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) {
        AnnotationStyle style = getWorkingCopyAnnotationStyle( getSelectedType());
View Full Code Here

    itemEditorComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).margins(0, 0).create());
   
    SWTFactoryUtil.createLabel(itemEditorComposite, SWT.LEFT,
      PreferencesMessages.EditorPreferencePage_color, new GridData());
   
    colorEditor = new ColorSelector(itemEditorComposite);
    Button colorEditorButton = colorEditor.getButton();
    colorEditorButton.setLayoutData(GridDataFactory.swtDefaults().grab(true, false).create());
    colorEditorButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
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( BrowserUIPlugin.getDefault()
                .getPreferenceStore(), ERROR_FONT_CONSTANTS[i] );
            RGB rgb = PreferenceConverter.getColor( BrowserUIPlugin.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( BrowserUIPlugin.getDefault()
            .getPreferenceStore(), BrowserUIConstants.PREFERENCE_QUICKFILTER_FONT );
        RGB qfBgRgb = PreferenceConverter.getColor( BrowserUIPlugin.getDefault().getPreferenceStore(),
            BrowserUIConstants.PREFERENCE_QUICKFILTER_BACKGROUND_COLOR );
        RGB qfFgRgb = PreferenceConverter.getColor( BrowserUIPlugin.getDefault().getPreferenceStore(),
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.