code: private void addVector(VectorLayer layer, int ruleIndex, String title) {
  		HLayout layout = new HLayout(WidgetLayout.marginSmall);
  		layout.setHeight(WidgetLayout.legendVectorRowHeight);
  		UrlBuilder urlBuilder = new UrlBuilder(Geomajas.getDispatcherUrl());
  		urlBuilder.addPath("legendgraphic");
  		urlBuilder.addPath(layer.getServerLayerId());
  		urlBuilder.addPath(layer.getLayerInfo().getNamedStyleInfo().getName());
  		urlBuilder.addPath(ruleIndex + ".png");
  		Img icon = new Img(urlBuilder.toString(), WidgetLayout.legendRasterIconWidth,
  				WidgetLayout.legendRasterIconHeight);
  		icon.setLayoutAlign(Alignment.LEFT);
  		layout.addMember(icon);
  		Label label = new Label(title);
  		label.setWrap(false);
  		label.setLayoutAlign(Alignment.LEFT);
  		layout.addMember(label);
  		addMember(layout);
  	}
docs: -------------------------------------------------------------------------