Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.vphakala; import com.vaadin.server.FontAwesome; import com.vaadin.ui.*; /** * * @author fivelhaka */ public class Toolbar extends HorizontalLayout { public Toolbar(String windowName, Button read, Button create, Button update, Button delete) { setSpacing(true); create.setIcon(FontAwesome.USER_PLUS); create.setDescription("Create a new " + windowName + "."); read.setIcon(FontAwesome.USER); read.setDescription("Read the " + windowName + ". Insert NAME."); update.setIcon(FontAwesome.SAVE); update.setDescription("Store the " + windowName + " data."); delete.setIcon(FontAwesome.TRASH); delete.setDescription("Remove the " + windowName); addComponents(read, create, update, delete); } }