Exemplo n.º 1
0
 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);
   }
 }
Exemplo n.º 2
0
  @Test
  public void testRenderFooterImage() throws IOException {
    Image image = loadImage(display, Fixture.IMAGE_100x50);

    column.setFooterImage(image);
    lca.renderChanges(column);

    TestMessage message = Fixture.getProtocolMessage();
    String imageLocation = ImageFactory.getImagePath(image);
    JsonArray expected = JsonArray.readFrom("[\"" + imageLocation + "\", 100, 50 ]");
    assertEquals(expected, message.findSetProperty(column, "footerImage"));
  }
Exemplo n.º 3
0
 private void setImage() {
   Image image = createImage(descriptor.getImage());
   if (image != null) {
     Rectangle bounds = image.getBounds();
     Object[] imageData =
         new Object[] {
           ImageFactory.getImagePath(image),
           Integer.valueOf(bounds.width),
           Integer.valueOf(bounds.height)
         };
     remoteObject.set(PROPERTY_IMAGE, imageData);
   }
 }