A {@link AbstractCell} used to render an image. The String value is the urlof the image.
If the images being displayed are static or available at compile time, using {@link ImageResourceCell} will usually be more efficient.
41504151415241534154415541564157415841594160
// Add a text column to show the getClan_emblem_url(). Column<ItemsDataClan, String> emblemColumn = new Column<ItemsDataClan, String>(new ImageCell()) { @Override public String getValue(ItemsDataClan object) { return object.getClan_emblem_url();
41304131413241334134413541364137413841394140
186187188189190191192193194195196
} }); this.slotsGrid.addColumn(priceColumn, constants.price()); this.slotsGrid.setColumnWidth(priceColumn, 60, Unit.PT); // Is configured. Column<SlotSummaryDTO, String> isConfiguredColumn = new Column<SlotSummaryDTO, String>(new ImageCell()) { @Override public String getValue(SlotSummaryDTO object) { return object.isConfigured() ? paths.check() : paths.warning(); } };
127128129130131132133134135
titleCell.setFont( new Font( ui.getDisplay(), new FontData( "Verdana", 18, SWT.NONE ) ) ); titleCell.setForeground( new Color( ui.getDisplay(), new RGB( 74, 74, 74 ) ) ); } private static void addImageCell( Template template ) { ImageCell imageCell = new ImageCell( template ); imageCell.setBindingIndex( 0 ); imageCell.setLeft( 10 ).setWidth( 32 ).setTop( 10 ).setHeight( 48 ); }