List of usage examples for com.vaadin.ui Notification Notification
public Notification(String caption)
From source file:uicomponents.PoolingTable.java
License:Open Source License
private void initDragAndDrop(final ClientSideCriterion acceptCriterion) { poolTable.setDropHandler(new DropHandler() { /**//from w ww . j ava 2 s . c om * */ private static final long serialVersionUID = 4057757595986300434L; @Override public void drop(final DragAndDropEvent dropEvent) { // criteria verify that this is safe final DataBoundTransferable t = (DataBoundTransferable) dropEvent.getTransferable(); if (!(t.getSourceComponent() instanceof Table)) { return; } Table source = (Table) t.getSourceComponent(); Object sourceItemId = t.getItemId(); if (!moveSampleToPool(source, sourceItemId)) { Notification n = new Notification("Sample is already in this pool."); n.setDelayMsec(3000); n.show(Page.getCurrent()); } resizeTable(); } @Override public AcceptCriterion getAcceptCriterion() { return new And(acceptCriterion, AcceptItem.ALL); } }); }