/** * Adds a <code>FocusListener</code> to the Component which gets fired * when a <code>Field</code> receives keyboard focus. * * @param listener The focus listener to add * @return this (for method chaining) * @see #addFocusListener(com.vaadin.event.FieldEvents.FocusListener) */ public default S withFocusListener(FocusListener listener) { ((FocusNotifier) this).addFocusListener(listener); return (S) this; }
/** * Adds a <code>BlurListener</code> to the Component which gets fired * when a <code>Field</code> loses keyboard focus. * * @param listener The blur listener to add * @return this (for method chaining) * @see #addBlurListener(com.vaadin.event.FieldEvents.BlurListener) */ public default S withBlurListener(BlurListener listener) { ((BlurNotifier) this).addBlurListener(listener); return (S) this; }
/** * A {@link Collection} of all the itemIds that became selected. * <p> * <em>Note:</em> this excludes all itemIds that might have been previously * selected. * * @return a Collection of the itemIds that became selected */ public Set<Object> getAdded() { return setDifference(newSelection, oldSelection); }
/** * @return the entity(~row) that was clicked. */ public T getEntity() { return (T) orig.getItemId(); }
@Override public boolean isDoubleClick() { return orig.isDoubleClick(); }
@Override public MouseEventDetails.MouseButton getButton() { return orig.getButton(); }
@Override public void evaluate() throws Exception { // manually clicking sth else again (i.e. where our NPE originated from) itemClickListener.getValue().itemClick(new ItemClickEvent(tree, null, "foo", null, mock(MouseEventDetails.class))); } }, throwsNothing());
@Override public boolean isShiftKey() { return orig.isShiftKey(); }
@Override public Table getSourceComponent() { return (Table) super.getSourceComponent(); }
@Override public boolean isCtrlKey() { return orig.isCtrlKey(); }
@Override public int getClientX() { return orig.getClientX(); }
@Override public int getRelativeY() { return orig.getRelativeY(); }
@Override public int getClientY() { return orig.getClientY(); }
@Override public int getRelativeX() { return orig.getRelativeX(); }
@Override public boolean isMetaKey() { return orig.isMetaKey(); }
@Override public boolean isAltKey() { return orig.isAltKey(); }
@Override public AbstractTextField getComponent() { return (AbstractTextField) super.getComponent(); }
public RowClickEvent(ItemClickEvent orig) { super(orig.getComponent(), null); this.orig = orig; }
/** * Adds a <code>TextChangeListener</code> to the Component which gets * fired when the text of the <code>Field</code> changes. * * @param listener The text change listener to add * @return this (for method chaining) * @see * #addTextChangeListener(FieldEvents.TextChangeListener) */ public default S withTextChangeListener(TextChangeListener listener) { ((TextChangeNotifier) this).addTextChangeListener(listener); return (S) this; }
/** * A {@link Collection} of all the itemIds that became deselected. * <p> * <em>Note:</em> this excludes all itemIds that might have been previously * deselected. * * @return a Collection of the itemIds that became deselected */ public Set<Object> getRemoved() { return setDifference(oldSelection, newSelection); }