Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.RGB


  @Test
  public void testHasDefaultForActiveColor() {
    Color activeColor = indicator.getActiveColor();

    assertEquals( activeColor.getRGB(), new RGB( 0, 122, 255 ) );
  }
View Full Code Here


  @Test
  public void testSavesSettedActiveColor() {
    indicator.setActiveColor( new Color( parent.getDisplay(), 0, 0, 0 ) );

    Color activeColor = indicator.getActiveColor();
    assertEquals( activeColor.getRGB(), new RGB( 0, 0, 0 ) );
  }
View Full Code Here

  @Test
  public void testHasDefaultForInactiveColor() {
    Color inactiveColor = indicator.getInactiveColor();

    assertEquals( inactiveColor.getRGB(), new RGB( 192, 192, 192 ) );
  }
View Full Code Here

  @Test
  public void testSavesSettedInactiveColor() {
    indicator.setInactiveColor( new Color( parent.getDisplay(), 255, 0, 0 ) );

    Color inactiveColor = indicator.getInactiveColor();
    assertEquals( inactiveColor.getRGB(), new RGB( 255, 0, 0 ) );
  }
View Full Code Here

  }

  @Test
  public void testSetsForeground() {
    UIConfiguration configuration = new UIConfiguration();
    RGB foreground = new RGB( 233, 233, 233 );

    configuration.setForeground( foreground );

    RGB actualForeground = configuration.getForeground();
    assertEquals( foreground, actualForeground );
  }
View Full Code Here

  public void testSetForegroundWithRGBTriggersUIUpdate() {
    UIUpdater updater = mock( UIUpdater.class );
    UpdateUtil.registerUpdater( updater );
    UIConfiguration configuration = new UIConfiguration();

    configuration.setForeground( new RGB( 100, 100, 100 ) );

    verify( updater, times( 1 ) ).update( configuration );
  }
View Full Code Here

  public void testSetsForegroundWithRGB() {
    UIConfiguration configuration = new UIConfiguration();

    configuration.setForeground( 233, 233, 233 );

    RGB actualForeground = configuration.getForeground();
    assertEquals( new RGB( 233, 233, 233 ), actualForeground );
  }
View Full Code Here

  }

  @Test
  public void testSetsBackground() {
    UIConfiguration configuration = new UIConfiguration();
    RGB background = new RGB( 233, 233, 233 );

    configuration.setBackground( background );

    RGB actualBackground = configuration.getBackground();
    assertEquals( background, actualBackground );
  }
View Full Code Here

  public void testSetBackgroundWithRGBTriggersUIUpdate() {
    UIUpdater updater = mock( UIUpdater.class );
    UpdateUtil.registerUpdater( updater );
    UIConfiguration configuration = new UIConfiguration();

    configuration.setBackground( new RGB( 100, 100, 100 ) );

    verify( updater, times( 1 ) ).update( configuration );
  }
View Full Code Here

  public void testSetsBackgroundWithRGB() {
    UIConfiguration configuration = new UIConfiguration();

    configuration.setBackground( 233, 233, 233 );

    RGB actualBackground = configuration.getBackground();
    assertEquals( new RGB( 233, 233, 233 ), actualBackground );
  }
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.