private Component buildButtons() { HorizontalLayout hl = new HorizontalLayout(); hl.setSpacing(true); // Decision button menu = new ResumeReviewToDoListMenu(grid); menu.setMenuBarEnabled(false); menu.addCommandExecuteListener( new CommandEvent.ExecuteListener() { @Override public void execute(ExecuteEvent event) { perform(event.getInstruction()); } }); hl.addComponent(menu); // Review Profile commandbar = new Commandbar(); Button btnCheck = new Button(termResource.getTerm("Check Details")); btnCheck.setEnabled(false); btnCheck.setIcon(FontAwesome.EYE); Button btnMyFavorite = new Button(termResource.getTerm("To My Favorite")); btnMyFavorite.setEnabled(false); btnMyFavorite.setIcon(FontAwesome.STAR); Button btnCompare = new Button(termResource.getTerm("Add To Compare")); btnCompare.setIcon(FontAwesome.ADJUST); btnCompare.setEnabled(false); commandbar.addCommand(btnCheck, COMMAND.CHECK); commandbar.addCommand(btnMyFavorite, COMMAND.POP_MY_FAVORITE); commandbar.addCommand(btnCompare, COMMAND.COMPARE); commandbar.addCommandExecuteListener( new CommandEvent.ExecuteListener() { @Override public void execute(ExecuteEvent event) { perform(event.getInstruction()); } }); hl.addComponent(commandbar); return hl; }
private Component buildMyFavorite() { VerticalLayout layout = new VerticalLayout(); layout.setWidth("100%"); layout.setHeight(null); layout.setSpacing(true); vfMyFavorite = new ViewerForm("", false); vfMyFavorite.getFieldset().addStyleName("fieldset-3-5"); vfMyFavorite.getFieldset().addStyleName("fieldset-0"); vfMyFavorite.addComboBox(termResource.getTerm("Create In"), "createIn", false); vfMyFavorite.addTextField(termResource.getTerm("New Folder"), "newFolder", false); layout.addComponent(vfMyFavorite); HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("100%"); hl.setHeight(null); Commandbar commandbar = new Commandbar(); commandbar.setSizeUndefined(); Button btnSave = new Button(termResource.getTerm("Save")); btnSave.setIcon(FontAwesome.SAVE); Button btnClose = new Button(termResource.getTerm("Close")); btnClose.setIcon(FontAwesome.TIMES); commandbar.addCommand(btnSave, COMMAND.SAVE_MY_FAVORITE); commandbar.addCommand(btnClose, COMMAND.CLOSE_MY_FAVORITE); commandbar.addCommandExecuteListener( new CommandEvent.ExecuteListener() { @Override public void execute(ExecuteEvent event) { perform(event.getInstruction()); } }); hl.addComponent(commandbar); hl.setComponentAlignment(commandbar, Alignment.MIDDLE_CENTER); layout.addComponent(hl); return layout; }