Package com.eclipsesource.tabris.passepartout.internal.instruction

Examples of com.eclipsesource.tabris.passepartout.internal.instruction.ForegroundInstruction


  }

  @Test
  public void testAppliesForeground() {
    Color color = shell.getDisplay().getSystemColor( SWT.COLOR_BLUE );
    Rule rule = PassePartout.when( new AlwaysTrueContidtion() ).then( new ForegroundInstruction( color ) );
    ResourceImpl resource = new ResourceImpl( rule );

    resource.bindTo( shell );

    assertEquals( color, shell.getForeground() );
View Full Code Here


  }

  @Test
  public void testRegistersItselfAsResizeListener() {
    Color color = shell.getDisplay().getSystemColor( SWT.COLOR_BLUE );
    Rule rule = PassePartout.when( new AlwaysTrueContidtion() ).then( new ForegroundInstruction( color ) );
    ResourceImpl resource = new ResourceImpl( rule );

    resource.bindTo( shell );

    boolean hasListener = hasResizeListener( resource );
View Full Code Here

  @Test
  public void testRegistersItselfAsResizeListenerWithItem() {
    ToolBar toolBar = new ToolBar( shell, SWT.NONE );
    ToolItem toolItem = new ToolItem( toolBar, SWT.NONE );
    Color color = shell.getDisplay().getSystemColor( SWT.COLOR_BLUE );
    Rule rule = PassePartout.when( new AlwaysTrueContidtion() ).then( new ForegroundInstruction( color ) );
    ResourceImpl resource = new ResourceImpl( rule );

    resource.bindTo( toolItem );

    boolean hasListener = hasResizeListener( resource );
View Full Code Here

   * </p>
   *
   * @param color the foreground to set. Must not be <code>null</code>.
   */
  public static Instruction foreground( Color color ) {
    return new ForegroundInstruction( color );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.passepartout.internal.instruction.ForegroundInstruction

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.