WebImage

General

A WebImage is a component that displays an image provided as a file in any browser-readable format (like gif, jpeg, png etc.).

WebImage encapsulates the HTML <img> tag.

Example

Below fou find an example of how to use a WebImage. You can try this example online: http://www.innoopract.com/w4content/

Properties of the WebImage Component can be easily set in the Property-Editor of the W4T Eclipse Perspective. This example shows how to set the width of a WebImage or its visibility programmatically. The code is located in the in the event handler section and executed when buttons or checkboxes are clicked.

The example WebImage is named wimExample.

  private void doWcbVisibleControlWebItemStateChanged( WebEvent e ) throws Exception {
    boolean visible = wcbVisibleControl.isSelected();
    wimExample.setVisible( visible );
  }
  private void doWbtWidthControlWebActionPerformed( WebEvent e ) throws Exception {
    String width = wslWidthControl.getValue();
    wimExample.setWidth( width );
  }
  

API documentation

The API documentation for WebImage can be found here.