Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.RGB


        // attribute type
        if ( attribute != null )
        {
            if ( attribute.isObjectClassAttribute() )
            {
                RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                    BrowserCommonConstants.PREFERENCE_OBJECTCLASS_COLOR );
                return BrowserCommonActivator.getDefault().getColor( rgb );
            }
            else if ( attribute.isMustAttribute() )
            {
                RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                    BrowserCommonConstants.PREFERENCE_MUSTATTRIBUTE_COLOR );
                return BrowserCommonActivator.getDefault().getColor( rgb );
            }
            else if ( attribute.isOperationalAttribute() )
            {
                RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                    BrowserCommonConstants.PREFERENCE_OPERATIONALATTRIBUTE_COLOR );
                return BrowserCommonActivator.getDefault().getColor( rgb );
            }
            else
            {
                RGB rgb = PreferenceConverter.getColor( BrowserCommonActivator.getDefault().getPreferenceStore(),
                    BrowserCommonConstants.PREFERENCE_MAYATTRIBUTE_COLOR );
                return BrowserCommonActivator.getDefault().getColor( rgb );
            }
        }
        else
View Full Code Here


    when( remoteUI.getPageParent() ).thenReturn( shell );
    when( remoteUI.getActionsParent() ).thenReturn( shell );
    Controller controller = new Controller( remoteUI, uiDescriptor );
    controller.setUI( ui );
    UIConfiguration configuration = mock( UIConfiguration.class );
    when( configuration.getBackground() ).thenReturn( new RGB( 100, 100, 100 ) );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( uiDescriptor );

    controller.update( configuration );

    verify( remoteUI ).setBackground( eq( new Color( ui.getDisplay(), 100, 100, 100 ) ) );
View Full Code Here

    when( remoteUI.getPageParent() ).thenReturn( shell );
    when( remoteUI.getActionsParent() ).thenReturn( shell );
    Controller controller = new Controller( remoteUI, uiDescriptor );
    controller.setUI( ui );
    UIConfiguration configuration = mock( UIConfiguration.class );
    when( configuration.getForeground() ).thenReturn( new RGB( 100, 100, 100 ) );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( uiDescriptor );

    controller.update( configuration );

    verify( remoteUI ).setForeground( eq( new Color( ui.getDisplay(), 100, 100, 100 ) ) );
View Full Code Here

  }

  private void handleSyntaxColorListSelection() {
    int i= fSyntaxColorList.getSelectionIndex();
    String key= fSyntaxColorListModel[i][1];
    RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
    fSyntaxForegroundColorEditor.setColorValue(rgb);
    fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD));
    fItalicCheckBox.setSelection(fOverlayStore.getBoolean(key + ITALIC));
  }
View Full Code Here

  }

  private void handleAppearanceColorListSelection() {
    int i= fAppearanceColorList.getSelectionIndex();
    String key= fAppearanceColorListModel[i][1];
    RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
    fAppearanceColorEditor.setColorValue(rgb);
  }
View Full Code Here

     * store. Returns <code>null</code> if there is no such information
     * available.
     */
  private Color createColor(IPreferenceStore store, String key, Display display) {

    RGB rgb= null;

    if (store.contains(key)) {

      if (store.isDefault(key))
        rgb= PreferenceConverter.getDefaultColor(store, key);
View Full Code Here

    Iterator e= fColorButtons.keySet().iterator();
    while (e.hasNext()) {
      ColorEditor c= (ColorEditor) e.next();
      String key= (String) fColorButtons.get(c);
      RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
      c.setColorValue(rgb);
    }

    e= fCheckBoxes.keySet().iterator();
    while (e.hasNext()) {
View Full Code Here

        assistant.enableAutoInsert(true);
        assistant.setAutoActivationDelay(prefs.getInt(CodeAssistPreferences.AUTO_ACTIVATION_DELAY));
        assistant.setProposalPopupOrientation(ContentAssistant.PROPOSAL_OVERLAY);
        assistant.setContextInformationPopupOrientation(ContentAssistant.CONTEXT_INFO_ABOVE);
        assistant.setContextInformationPopupBackground(
            PerlEditorPlugin.getDefault().getColor(new RGB(0, 0, 0)));
        assistant.setProposalSelectorBackground(
            PerlEditorPlugin.getDefault().getColor(new RGB(255, 255, 255)));
        assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
       
        return assistant;
    }
View Full Code Here

    fButton.setImage(fImage);
    fButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        ColorDialog colorDialog= new ColorDialog(fButton.getShell());
        colorDialog.setRGB(fColorValue);
        RGB newColor = colorDialog.open();
        if (newColor != null) {
          fColorValue= newColor;
          updateColorImage();
        }
      }
View Full Code Here

  private UIConfiguration createConfiguration() {
    UIConfiguration configuration = new UIConfiguration();
    configuration.setImage( UITestUtil.class.getResourceAsStream( "testImage.png" ) );
    configuration.addPageConfiguration( new PageConfiguration( "foo1", TestPage.class ).setTopLevel( true ) );
    configuration.addPageConfiguration( new PageConfiguration( "foo2", TestPage.class ).setTopLevel( true ) );
    configuration.setBackground( new RGB( 100, 100, 100 ) );
    configuration.setForeground( new RGB( 200, 200, 200 ) );
    return configuration;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.RGB

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.