Package org.eclipse.rap.json

Examples of org.eclipse.rap.json.JsonArray


  private void setImage() {
    Image image = createImage( descriptor.getImage() );
    if( image != null ) {
      Rectangle bounds = image.getBounds();
      JsonArray imageData = new JsonArray();
      imageData.add( ImageFactory.getImagePath( image ) );
      imageData.add( bounds.width );
      imageData.add( bounds.height );
      remoteObject.set( PROPERTY_IMAGE, imageData );
    }
  }
View Full Code Here


    }
    throw new IllegalStateException( "RemotePage with id " + pageRendererId + " does not exist." );
  }

  private void setColor( String name, Color color ) {
    JsonArray jsonArray = new JsonArray();
    jsonArray.add( color.getRed() );
    jsonArray.add( color.getGreen() );
    jsonArray.add( color.getBlue() );
    remoteObject.set( name, jsonArray );
  }
View Full Code Here

    restoreLastSettings( lineWidth, foreground, alpha );
  }

  private void dispatchOperations() {
    for( int i = 0; i < drawings.size(); i++ ) {
      JsonArray operation = drawings.get( i ).asArray();
      dispatchOperation( operation );
    }
  }
View Full Code Here

    gc.setAlpha( alpha );
  }

  private void dispatchOperation( JsonArray operation ) {
    String operationType = operation.get( 0 ).asString();
    JsonArray parameters = operation.get( 1 ).asArray();
    if( PROPERTY_LINE_WIDTH.equals( operationType ) ) {
      dispatchLineWidth( parameters );
    } else if( PROPERTY_FOREGROUND.equals( operationType ) ) {
      dispatchSetForeground( parameters );
    } else if( PROPERTY_PATH.equals( operationType ) ) {
View Full Code Here

TOP

Related Classes of org.eclipse.rap.json.JsonArray

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.