This change aims to reduce the number of false positives when comparing Vaadin 7 compatibility package in Vaadin 8 and actual Vaadin 7.7 branch. Conflicting parts are moved to imports as much as possible. Files have been formatted with same Eclipse version.
*/
public interface ComponentConnector extends ServerConnector {
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.client.VPaintable#getState()
- */
@Override
public AbstractComponentState getState();
import com.vaadin.client.metadata.TypeDataStore;
import com.vaadin.client.renderers.Renderer;
import com.vaadin.client.widgets.Grid.Column;
+import com.vaadin.shared.communication.SharedState;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
/**
* An abstract base class for renderer connectors. A renderer connector is used
- * to link a client-side {@link Renderer} to a server-side
- * {@link com.vaadin.ui.components.grid.Renderer Renderer}. As a connector, it
- * can use the regular Vaadin RPC and shared state mechanism to pass additional
- * state and information between the client and the server. This base class
- * itself only uses the basic {@link com.vaadin.shared.communication.SharedState
- * SharedState} and no RPC interfaces.
+ * to link a client-side {@link Renderer} to a server-side <code>Renderer</code>
+ * . As a connector, it can use the regular Vaadin RPC and shared state
+ * mechanism to pass additional state and information between the client and the
+ * server. This base class itself only uses the basic {@link SharedState} and no
+ * RPC interfaces.
*
* @param <T>
* the presentation type of the renderer
/**
* Connects the client side {@link Grid} widget with the server side
- * {@link com.vaadin.ui.components.grid.Grid} component.
+ * <code>Grid</code> component.
* <p>
* The Grid is typed to JSONObject. The structure of the JSONObject is described
* at {@link com.vaadin.shared.data.DataProviderRpc#setRowData(int, List)
} else {
Collection<Column<?, JsonObject>> errorColumns;
if (errorColumnsIds != null) {
- errorColumns = new ArrayList<Grid.Column<?, JsonObject>>();
+ errorColumns = new ArrayList<Column<?, JsonObject>>();
for (String colId : errorColumnsIds) {
errorColumns.add(columnIdToColumn.get(colId));
}
@Override
public void setUserSelectionAllowed(boolean userSelectionAllowed) {
this.userSelectionAllowed = userSelectionAllowed;
- for (Column<?, ?> c : getGrid().getColumns()) {
+ for (Column<?, JsonObject> c : getGrid().getColumns()) {
if (c instanceof SelectionColumn) {
((SelectionColumn) c)
.setUserSelectionAllowed(userSelectionAllowed);
public void setUserSelectionAllowed(boolean userSelectionAllowed) {
this.userSelectionAllowed = userSelectionAllowed;
}
-
}
-}
\ No newline at end of file
+}
* @param <R>
* the row type of the containing Grid
*
- * @see {@link ButtonRenderer#addClickHandler(RendererClickHandler)}
+ * @see ButtonRenderer#addClickHandler(RendererClickHandler)
*/
public interface RendererClickHandler<R> extends EventHandler {
Element el = DOM.getFirstChild(getElement());
while (el != null) {
- DOM.sinkEvents(el,
- (DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS));
+ DOM.sinkEvents(el, DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS);
el = DOM.getNextSibling(el);
}
@Override
public void onBrowserEvent(Event event) {
- if (icon != null && (event.getTypeInt() == Event.ONCLICK)
- && (DOM.eventGetTarget(event) == icon.getElement())) {
+ if (icon != null && event.getTypeInt() == Event.ONCLICK
+ && DOM.eventGetTarget(event) == icon.getElement()) {
// Click on icon should do nothing if widget is disabled
if (isEnabled()) {
setValue(!getValue());
* selector.
*
* <b>Note:</b> To change the keyboard assignments used in the popup dialog you
- * should extend <code>com.vaadin.client.ui.VCalendarPanel</code> and then pass
- * set it by calling the <code>setCalendarPanel(VCalendarPanel panel)</code>
- * method.
+ * should extend <code>VCalendarPanel</code> and then pass set it by calling the
+ * <code>setCalendarPanel(VCalendarPanel panel)</code> method.
*
*/
public class VPopupCalendar extends VTextualDate
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.google.gwt.user.client.ui.UIObject#setStyleName(java.lang.String)
- */
@Override
public void setStyleName(String style) {
super.setStyleName(style);
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event
- * .dom.client.ClickEvent)
- */
@Override
public void onClick(ClickEvent event) {
if (event.getSource() == calendarToggle && isEnabled()) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google.gwt
- * .event.logical.shared.CloseEvent)
- */
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (event.getSource() == popup) {
/**
* For internal use only. May be removed or replaced in the future.
*
- * @see com.vaadin.client.ui.VTextualDate#buildDate()
+ * @see VTextualDate#buildDate()
*/
@Override
public void buildDate() {
buildDate();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.client.ui.VDateField#onBrowserEvent(com.google
- * .gwt.user.client.Event)
- */
@Override
public void onBrowserEvent(com.google.gwt.user.client.Event event) {
super.onBrowserEvent(event);
* </br>
* Returns the maximum indent of the hierarcyColumn, if applicable.
*
- * @see {@link VScrollTable#getHierarchyColumnIndex()}
+ * @see VScrollTable#getHierarchyColumnIndex()
*
* @return maximum indent in pixels
*/
@Override
public void execute() {
final Element p = getElement();
- if (p.getPropertyInt(domProperty) > (MIN_SIZE + 5)
+ if (p.getPropertyInt(domProperty) > MIN_SIZE + 5
|| propertyNotNullOrEmpty(styleAttribute, p)) {
if (isVertical()) {
setHeight();
increaseValue(true);
} else if (DOM.eventGetType(event) == Event.MOUSEEVENTS) {
processBaseEvent(event);
- } else if ((BrowserInfo.get().isGecko()
- && DOM.eventGetType(event) == Event.ONKEYPRESS)
- || (!BrowserInfo.get().isGecko()
- && DOM.eventGetType(event) == Event.ONKEYDOWN)) {
+ } else if (BrowserInfo.get().isGecko()
+ && DOM.eventGetType(event) == Event.ONKEYPRESS
+ || !BrowserInfo.get().isGecko()
+ && DOM.eventGetType(event) == Event.ONKEYDOWN) {
if (handleNavigation(event.getKeyCode(), event.getCtrlKey(),
event.getShiftKey())) {
}
if (isVertical()) {
- v = ((baseSize - (coord - baseOffset))
- / (double) (baseSize - handleSize)) * (max - min) + min;
+ v = (baseSize - (coord - baseOffset))
+ / (double) (baseSize - handleSize) * (max - min) + min;
} else {
- v = ((coord - baseOffset) / (double) (baseSize - handleSize))
+ v = (coord - baseOffset) / (double) (baseSize - handleSize)
* (max - min) + min;
}
return false;
}
- if ((keycode == getNavigationUpKey() && isVertical())
- || (keycode == getNavigationRightKey() && !isVertical())) {
+ if (keycode == getNavigationUpKey() && isVertical()
+ || keycode == getNavigationRightKey() && !isVertical()) {
if (shift) {
for (int a = 0; a < acceleration; a++) {
increaseValue(false);
}
return true;
} else if (keycode == getNavigationDownKey() && isVertical()
- || (keycode == getNavigationLeftKey() && !isVertical())) {
+ || keycode == getNavigationLeftKey() && !isVertical()) {
if (shift) {
for (int a = 0; a < acceleration; a++) {
decreaseValue(false);
: "offsetWidth";
final int handleSize = handle.getPropertyInt(domProperty);
final int baseSize = base.getPropertyInt(domProperty)
- - (2 * BASE_BORDER_WIDTH);
+ - 2 * BASE_BORDER_WIDTH;
final int range = baseSize - handleSize;
double v = value.doubleValue();
private boolean disabled = false;
private int height;
private final Element[] slotElements;
- private final List<DateCellSlot> slots = new ArrayList<DateCell.DateCellSlot>();
+ private final List<DateCellSlot> slots = new ArrayList<DateCellSlot>();
private int[] slotElementHeights;
private int startingSlotHeight;
private Date today;
/**
* A class that defines an implementation for a color picker connector. Connects
- * the server side {@link com.vaadin.ui.ColorPickerArea} with the client side
- * counterpart {@link VColorPickerArea}
+ * the server side {@link ColorPickerArea} with the client side counterpart
+ * {@link VColorPickerArea}
*
* @since 7.0.0
*/
/**
* A class that defines default implementation for a color picker connector.
- * Connects the server side {@link com.vaadin.ui.ColorPicker} with the client
- * side counterpart {@link VColorPicker}
+ * Connects the server side {@link ColorPicker} with the client side counterpart
+ * {@link VColorPicker}
*
* @since 7.0.0
*/
/**
* A class that defines the default implementation for a color picker gradient
- * connector. Connects the server side
- * {@link com.vaadin.ui.components.colorpicker.ColorPickerGradient} with the
+ * connector. Connects the server side {@link ColorPickerGradient} with the
* client side counterpart {@link VColorPickerGradient}
*
* @since 7.0.0
/**
* A class that defines the default implementation for a color picker grid
- * connector. Connects the server side
- * {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the client
+ * connector. Connects the server side {@link ColorPickerGrid} with the client
* side counterpart {@link VColorPickerGrid}
*
* @since 7.0.0
@Connect(DateField.class)
public class DateFieldConnector extends TextualDateConnector {
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.client.ui.AbstractConnector#init()
- */
@Override
protected void init() {
getWidget().popup.addCloseHandler(new CloseHandler<PopupPanel>() {
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.TableRowElement;
import com.google.gwt.dom.client.TableSectionElement;
+import com.vaadin.client.widgets.Escalator;
/**
* A representation of the rows in each of the sections (header, body and
- * footer) in an {@link com.vaadin.client.widgets.Escalator}.
+ * footer) in an {@link Escalator}.
*
* @since 7.4
* @author Vaadin Ltd
- * @see com.vaadin.client.widgets.Escalator#getHeader()
- * @see com.vaadin.client.widgets.Escalator#getBody()
- * @see com.vaadin.client.widgets.Escalator#getFooter()
+ * @see Escalator#getHeader()
+ * @see Escalator#getBody()
+ * @see Escalator#getFooter()
* @see SpacerContainer
*/
public interface RowContainer {
/**
- * The row container for the body section in an
- * {@link com.vaadin.client.widgets.Escalator}.
+ * The row container for the body section in an {@link Escalator}.
* <p>
* The body section can contain both rows and spacers.
*
* @since 7.5.0
* @author Vaadin Ltd
- * @see com.vaadin.client.widgets.Escalator#getBody()
+ * @see Escalator#getBody()
*/
public interface BodyRowContainer extends RowContainer {
/**
* A representation of a spacer element in a
- * {@link com.vaadin.client.widget.escalator.RowContainer.BodyRowContainer}.
+ * {@link RowContainer.BodyRowContainer}.
*
* @since 7.5.0
* @author Vaadin Ltd
* the event that occurred
*/
public void onEvent(GridEvent<T> event);
-}
\ No newline at end of file
+}
import com.vaadin.client.DeferredWorker;
import com.vaadin.client.Focusable;
import com.vaadin.client.WidgetUtil;
+import com.vaadin.client.data.AbstractRemoteDataSource;
import com.vaadin.client.data.DataChangeHandler;
import com.vaadin.client.data.DataSource;
import com.vaadin.client.data.DataSource.RowHandle;
import com.vaadin.client.renderers.ComplexRenderer;
+import com.vaadin.client.renderers.ProgressBarRenderer;
import com.vaadin.client.renderers.Renderer;
+import com.vaadin.client.renderers.TextRenderer;
import com.vaadin.client.renderers.WidgetRenderer;
import com.vaadin.client.ui.FocusUtil;
import com.vaadin.client.ui.SubPartAware;
import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.client.widget.grid.RowReference;
import com.vaadin.client.widget.grid.RowStyleGenerator;
+import com.vaadin.client.widget.grid.datasources.ListDataSource;
import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler;
import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler;
import com.vaadin.client.widget.grid.events.BodyClickHandler;
* <p>
* Each column also has a Renderer. Its function is to take the value that is
* given by the {@code GridColumn} and display it to the user. A simple column
- * might have a {@link com.vaadin.client.renderers.TextRenderer TextRenderer}
- * that simply takes in a {@code String} and displays it as the cell's content.
- * A more complex renderer might be
- * {@link com.vaadin.client.renderers.ProgressBarRenderer ProgressBarRenderer}
- * that takes in a floating point number, and displays a progress bar instead,
- * based on the given number.
+ * might have a {@link TextRenderer} that simply takes in a {@code String} and
+ * displays it as the cell's content. A more complex renderer might be
+ * {@link ProgressBarRenderer} that takes in a floating point number, and
+ * displays a progress bar instead, based on the given number.
* <p>
* <em>See:</em> {@link #addColumn(Column)}, {@link #addColumn(Column, int)} and
* {@link #addColumns(Column...)}. <em>Also</em>
* <p>
* Grid gets its data from a {@link DataSource}, providing row objects to Grid
* from a user-defined endpoint. It can be either a local in-memory data source
- * (e.g. {@link com.vaadin.client.widget.grid.datasources.ListDataSource
- * ListDataSource}) or even a remote one, retrieving data from e.g. a REST API
- * (see {@link com.vaadin.client.data.AbstractRemoteDataSource
- * AbstractRemoteDataSource}).
+ * (e.g. {@link ListDataSource}) or even a remote one, retrieving data from e.g.
+ * a REST API (see {@link AbstractRemoteDataSource}).
*
*
* @param <T>
}
}
+ private final List<GridEventHandler<T>> browserEventHandlers = new ArrayList<GridEventHandler<T>>();
+
+ private CellStyleGenerator<T> cellStyleGenerator;
+ private RowStyleGenerator<T> rowStyleGenerator;
+ private RowReference<T> rowReference = new RowReference<T>(this);
+ private CellReference<T> cellReference = new CellReference<T>(rowReference);
+ private RendererCellReference rendererCellReference = new RendererCellReference(
+ (RowReference<Object>) rowReference);
+
public final class SelectionColumn extends Column<Boolean, T>
implements GridEnabledHandler {
private AutoScroller autoScroller = new AutoScroller(this);
+ private ColumnResizeMode columnResizeMode = ColumnResizeMode.ANIMATED;
+
private DragAndDropHandler.DragAndDropCallback headerCellDndCallback = new DragAndDropCallback() {
private final AutoScrollerCallback autoScrollerCallback = new AutoScrollerCallback() {
};
- private final List<GridEventHandler<T>> browserEventHandlers = new ArrayList<GridEventHandler<T>>();
-
- private CellStyleGenerator<T> cellStyleGenerator;
- private RowStyleGenerator<T> rowStyleGenerator;
- private RowReference<T> rowReference = new RowReference<T>(this);
- private CellReference<T> cellReference = new CellReference<T>(rowReference);
- private RendererCellReference rendererCellReference = new RendererCellReference(
- (RowReference<Object>) rowReference);
-
/**
* Enumeration for easy setting of selection mode.
*/
fireEvent(new GridEnabledEvent(enabled));
}
- private ColumnResizeMode columnResizeMode = ColumnResizeMode.ANIMATED;
-
/**
* Sets the column resize mode to use. The default mode is
* {@link ColumnResizeMode.ANIMATED}.
*
* @param mode
* a selection mode value
- * @see {@link SelectionMode}.
+ * @see SelectionMode
*/
public void setSelectionMode(SelectionMode mode) {
SelectionModel<T> model = mode.createModel();
/**
* Deselect all rows using the current selection model.
*
- * @param row
- * a row object
* @return <code>true</code> iff the current selection changed
* @throws IllegalStateException
* if the current selection model is not an instance of
* <p>
* The children must be first explicitly removed with
* {@link #setParent(Object itemId, Object newParentId)}or
- * {@link com.vaadin.data.Container#removeItem(Object itemId)}.
+ * {@link Container#removeItem(Object itemId)}.
* </p>
*
* <p>
/**
* Tests if the Item specified with <code>itemId</code> is a root Item.
* The hierarchical container can have more than one root and must have
- * at least one unless it is empty. The {@link #getParent(Object itemId)}
- * method always returns <code>null</code> for root Items.
+ * at least one unless it is empty. The
+ * {@link #getParent(Object itemId)} method always returns
+ * <code>null</code> for root Items.
*
* @param itemId
* ID of the Item whose root status is to be tested
* Adding items (if supported) to a filtered {@link Ordered} or
* {@link Indexed} container should insert them immediately after the
* indicated visible item. The unfiltered position of items added at index
- * 0, at index {@link com.vaadin.data.Container#size()} or at an undefined
- * position is up to the implementation.
+ * 0, at index {@link Container#size()} or at an undefined position is up to
+ * the implementation.
* </p>
* <p>
* The functionality of SimpleFilterable can be implemented using the
* Adding items (if supported) to a filtered {@link Ordered} or
* {@link Indexed} container should insert them immediately after the
* indicated visible item. However, the unfiltered position of items added
- * at index 0, at index {@link com.vaadin.data.Container#size()} or at an
- * undefined position is up to the implementation.
+ * at index 0, at index {@link Container#size()} or at an undefined position
+ * is up to the implementation.
* </p>
*
* <p>
* {@link #removePropertySetChangeListener(PropertySetChangeListener)}
**/
@Deprecated
- public void removeListener(Container.PropertySetChangeListener listener);
+ public void removeListener(
+ Container.PropertySetChangeListener listener);
}
}
*
* @author Vaadin Ltd.
* @since 3.0
- * @see com.vaadin.data.Validator
+ * @see Validator
*/
public interface Validatable extends Serializable {
* Interface that implements a method for validating if an {@link Object} is
* valid or not.
* <p>
- * Implementors of this class can be added to any
- * {@link com.vaadin.data.Validatable Validatable} implementor to verify its
- * value.
+ * Implementors of this class can be added to any {@link Validatable}
+ * implementor to verify its value.
* </p>
* <p>
* {@link #validate(Object)} can be used to check if a value is valid. An
*
*/
public FieldGroup() {
-
}
/**
/**
* Binds all fields to the properties in the item in use.
- *
+ *
* @since 7.7.5
*/
protected void bindFields() {
* Clears field and any possible existing binding.
*
* @param field
- * The field to be cleared
- *
+ * The field to be cleared
+ *
* @since 7.7.5
*/
protected void clearField(Field<?> field) {
* public class MyForm extends VerticalLayout {
* private TextField firstName = new TextField("First name");
* @PropertyId("last")
- * private TextField lastName = new TextField("Last name");
+ * private TextField lastName = new TextField("Last name");
* private TextField age = new TextField("Age"); ... }
*
- * MyForm myForm = new MyForm();
- * ...
+ * MyForm myForm = new MyForm();
+ * ...
* fieldGroup.bindMemberFields(myForm);
* </pre>
*
* public class MyForm extends VerticalLayout {
* private TextField firstName = new TextField("First name");
* @PropertyId("last")
- * private TextField lastName = new TextField("Last name");
+ * private TextField lastName = new TextField("Last name");
* private TextField age;
*
- * MyForm myForm = new MyForm();
- * ...
+ * MyForm myForm = new MyForm();
+ * ...
* fieldGroup.buildAndBindMemberFields(myForm);
* </pre>
*
model = BeanItem.getPropertyDescriptors((Class<BEANTYPE>) type);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getType(java.lang.Object)
- */
@Override
public Class<?> getType(Object propertyId) {
VaadinPropertyDescriptor<BEANTYPE> descriptor = model.get(propertyId);
return type;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerPropertyIds()
- */
@Override
public Collection<String> getContainerPropertyIds() {
return model.keySet();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeAllItems()
- */
@Override
public boolean removeAllItems() {
int origSize = size();
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getItem(java.lang.Object)
- */
@Override
public BeanItem<BEANTYPE> getItem(Object itemId) {
// TODO return only if visible?
return itemIdToItem.get(itemId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getItemIds()
- */
@Override
@SuppressWarnings("unchecked")
public List<IDTYPE> getItemIds() {
return (List<IDTYPE>) super.getItemIds();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
- * java.lang.Object)
- */
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
Item item = getItem(itemId);
return item.getItemProperty(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeItem(java.lang.Object)
- */
@Override
public boolean removeItem(Object itemId) {
// TODO should also remove items that are filtered out
filterAll();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Container.Filterable#addContainerFilter(java.lang.Object,
- * java.lang.String, boolean, boolean)
- */
@Override
public void addContainerFilter(Object propertyId, String filterString,
boolean ignoreCase, boolean onlyMatchPrefix) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Filterable#removeAllContainerFilters()
- */
@Override
public void removeAllContainerFilters() {
if (!getFilters().isEmpty()) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Container.Filterable#removeContainerFilters(java.lang
- * .Object)
- */
@Override
public void removeContainerFilters(Object propertyId) {
Collection<Filter> removedFilters = super.removeFilters(propertyId);
removeFilter(filter);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.AbstractInMemoryContainer#hasContainerFilters()
- */
@Override
public boolean hasContainerFilters() {
return super.hasContainerFilters();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
- */
@Override
public Collection<Filter> getContainerFilters() {
return super.getContainerFilters();
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
- */
@Override
public Collection<?> getSortableContainerPropertyIds() {
return getSortablePropertyIds();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
- * boolean[])
- */
@Override
public void sort(Object[] propertyId, boolean[] ascending) {
sortContainer(propertyId, ascending);
* added at the very end of the unfiltered container and not after the last
* visible item if filtering is used.
*
- * @see com.vaadin.data.Container#addItem(Object)
+ * @see Container#addItem(Object)
*/
protected BeanItem<BEANTYPE> addItem(IDTYPE itemId, BEANTYPE bean) {
if (!validateBean(bean)) {
/**
* Adds the bean after the given bean.
*
- * @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
+ * @see Container.Ordered#addItemAfter(Object, Object)
*/
protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId,
IDTYPE newItemId, BEANTYPE bean) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Deprecated
@Override
* {@link PropertySetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
*
- * @see PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
+ * @see PropertySetChangeNotifier#addListener(Container.PropertySetChangeListener)
*/
protected void addPropertySetChangeListener(
Container.PropertySetChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Deprecated
protected void addListener(Container.PropertySetChangeListener listener) {
* {@link PropertySetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
*
- * @see PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.
+ * @see PropertySetChangeNotifier#removeListener(Container.
* PropertySetChangeListener)
*/
protected void removePropertySetChangeListener(
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Deprecated
protected void removeListener(
* {@link ItemSetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
*
- * @see ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
+ * @see ItemSetChangeNotifier#addListener(Container.ItemSetChangeListener)
*/
protected void addItemSetChangeListener(
Container.ItemSetChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Deprecated
protected void addListener(Container.ItemSetChangeListener listener) {
* {@link ItemSetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
*
- * @see ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
+ * @see ItemSetChangeNotifier#removeListener(Container.ItemSetChangeListener)
*/
protected void removeItemSetChangeListener(
Container.ItemSetChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Deprecated
protected void removeListener(Container.ItemSetChangeListener listener) {
* <code>sort(Object[], boolean[])</code>.
*
* To implement {@link Filterable}, subclasses need to implement the methods
- * {@link Filterable#addContainerFilter(com.vaadin.data.Container.Filter)}
- * (calling {@link #addFilter(Filter)}),
- * {@link Filterable#removeAllContainerFilters()} (calling
- * {@link #removeAllFilters()}) and
- * {@link Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)}
- * (calling {@link #removeFilter(com.vaadin.data.Container.Filter)}).
+ * {@link Filterable#addContainerFilter(Container.Filter)} (calling
+ * {@link #addFilter(Filter)}), {@link Filterable#removeAllContainerFilters()}
+ * (calling {@link #removeAllFilters()}) and
+ * {@link Filterable#removeContainerFilter(Container.Filter)} (calling
+ * {@link #removeFilter(Container.Filter)}).
*
* To implement {@link SimpleFilterable}, subclasses also need to implement the
* methods
* {@link SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)}
* and {@link SimpleFilterable#removeContainerFilters(Object)} calling
- * {@link #addFilter(com.vaadin.data.Container.Filter)} and
- * {@link #removeFilters(Object)} respectively.
+ * {@link #addFilter(Container.Filter)} and {@link #removeFilters(Object)}
+ * respectively.
*
* @param <ITEMIDTYPE>
* the class of item identifiers in the container, use Object if can
// ItemSetChangeNotifier
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Deprecated
@Override
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #removeItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Deprecated
@Override
* be in-memory filterable.
*
* This can be used to implement
- * {@link Filterable#addContainerFilter(com.vaadin.data.Container.Filter)}
- * and optionally also
+ * {@link Filterable#addContainerFilter(Container.Filter)} and optionally
+ * also
* {@link SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)}
* (with {@link SimpleStringFilter}).
*
return !getContainerFilters().isEmpty();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Filterable#getContainerFilters()
- */
protected Collection<Filter> getContainerFilters() {
return Collections.unmodifiableCollection(filters);
}
* Remove a specific container filter and re-filter the view (if necessary).
*
* This can be used to implement
- * {@link Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)}
- * .
+ * {@link Filterable#removeContainerFilter(Container.Filter)} .
*/
protected void removeFilter(Filter filter) {
for (Iterator<Filter> iterator = getFilters().iterator(); iterator
* Subclasses should call this from a public
* {@link #sort(Object[], boolean[])} method when implementing Sortable.
*
- * @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
- * boolean[])
+ * @see Container.Sortable#sort(java.lang.Object[], boolean[])
*/
protected void sortContainer(Object[] propertyId, boolean[] ascending) {
if (!(this instanceof Sortable)) {
* Set the internal collection of filters without performing filtering.
*
* This method is mostly for internal use, use
- * {@link #addFilter(com.vaadin.data.Container.Filter)} and
- * <code>remove*Filter*</code> (which also re-filter the container) instead
- * when possible.
+ * {@link #addFilter(Container.Filter)} and <code>remove*Filter*</code>
+ * (which also re-filter the container) instead when possible.
*
* @param filters
*/
/**
* @deprecated As of 7.0, replaced by
- * {@link #addReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ * {@link #addReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ * {@link #removeReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #addValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #removeValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
import java.util.Collection;
+import com.vaadin.data.Container;
+
/**
* An in-memory container for JavaBeans.
*
*
* <p>
* If a bean id resolver is set using
- * {@link #setBeanIdResolver(com.vaadin.data.util.AbstractBeanContainer.BeanIdResolver)}
+ * {@link #setBeanIdResolver(AbstractBeanContainer.BeanIdResolver)}
* or {@link #setBeanIdProperty(Object)}, the methods {@link #addBean(Object)},
* {@link #addBeanAfter(Object, Object)}, {@link #addBeanAt(int, Object)} and
* {@link #addAll(java.util.Collection)} can be used to add items to the
/**
* Adds the bean to the Container.
*
- * @see com.vaadin.data.Container#addItem(Object)
+ * @see Container#addItem(Object)
*/
@Override
public BeanItem<BEANTYPE> addItem(IDTYPE itemId, BEANTYPE bean) {
/**
* Adds the bean after the given item id.
*
- * @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
+ * @see Container.Ordered#addItemAfter(Object, Object)
*/
@Override
public BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId,
* <p>
* Changing the bean will fire value change events for all properties of
* type {@link MethodProperty} or {@link NestedMethodProperty}.
- *
+ *
* @param bean
* The new bean to use for this item, not <code>null</code>
* @since 7.7.7
import java.util.Collection;
+import com.vaadin.data.Container;
+
/**
* An in-memory container for JavaBeans.
*
* @param newItemId
* the bean (of type BT) to add (not null)
*
- * @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
+ * @see Container.Ordered#addItemAfter(Object, Object)
*/
@Override
@SuppressWarnings("unchecked")
*
* The bean is used both as the item contents and as the item identifier.
*
- * @see com.vaadin.data.Container#addItem(Object)
+ * @see Container#addItem(Object)
*/
@Override
@SuppressWarnings("unchecked")
*
* The bean is used both as the item contents and as the item identifier.
*
- * @see com.vaadin.data.Container#addItem(Object)
+ * @see Container#addItem(Object)
*/
@Override
public BeanItem<BEANTYPE> addBean(BEANTYPE bean) {
/**
* <p>
* A wrapper class for adding external hierarchy to containers not implementing
- * the {@link com.vaadin.data.Container.Hierarchical} interface.
+ * the {@link Container.Hierarchical} interface.
* </p>
*
* <p>
* this method fails and <code>false</code> is returned; the children must
* be first explicitly removed with
* {@link #setParent(Object itemId, Object newParentId)} or
- * {@link com.vaadin.data.Container#removeItem(Object itemId)}.
+ * {@link Container#removeItem(Object itemId)}.
* </p>
*
* @param itemId
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #removeItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* <p>
* A wrapper class for adding external ordering to containers not implementing
- * the {@link com.vaadin.data.Container.Ordered} interface.
+ * the {@link Container.Ordered} interface.
* </p>
*
* <p>
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #removeItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
removePropertySetChangeListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
- * java.lang.Object)
- */
@Override
public Item addItemAfter(Object previousItemId, Object newItemId)
throws UnsupportedOperationException {
return item;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
- */
@Override
public Object addItemAfter(Object previousItemId)
throws UnsupportedOperationException {
/**
* Filesystem container does not support adding new properties.
*
- * @see com.vaadin.data.Item#addItemProperty(Object, Property)
+ * @see Item#addItemProperty(Object, Property)
*/
@Override
public boolean addItemProperty(Object id, Property property)
/**
* Filesystem container does not support removing properties.
*
- * @see com.vaadin.data.Item#removeItemProperty(Object)
+ * @see Item#removeItemProperty(Object)
*/
@Override
public boolean removeItemProperty(Object id)
this.recursive = recursive;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
- * java.lang.Class, java.lang.Object)
- */
@Override
public boolean addContainerProperty(Object propertyId, Class<?> type,
Object defaultValue) throws UnsupportedOperationException {
"File system container does not support this operation");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addItem()
- */
@Override
public Object addItem() throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addItem(java.lang.Object)
- */
@Override
public Item addItem(Object itemId) throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeAllItems()
- */
@Override
public boolean removeAllItems() throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeItem(java.lang.Object)
- */
@Override
public boolean removeItem(Object itemId)
throws UnsupportedOperationException {
"File system container does not support this operation");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object )
- */
@Override
public boolean removeContainerProperty(Object propertyId)
throws UnsupportedOperationException {
* this method fails and <code>false</code> is returned; the children must
* be first explicitly removed with
* {@link #setParent(Object itemId, Object newParentId)} or
- * {@link com.vaadin.data.Container#removeItem(Object itemId)}.
+ * {@link Container#removeItem(Object itemId)}.
* </p>
*
* @param itemId
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#addItem()
- */
@Override
public Object addItem() {
disableContentsChangeEvents();
}
@Override
- protected void fireItemSetChange(
- com.vaadin.data.Container.ItemSetChangeEvent event) {
+ protected void fireItemSetChange(Container.ItemSetChangeEvent event) {
if (contentsChangeEventsOn()) {
super.fireItemSetChange(event);
} else {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#addItem(java.lang.Object)
- */
@Override
public Item addItem(Object itemId) {
disableContentsChangeEvents();
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#removeAllItems()
- */
@Override
public boolean removeAllItems() {
disableContentsChangeEvents();
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#removeItem(java.lang.Object )
- */
@Override
public boolean removeItem(Object itemId) {
disableContentsChangeEvents();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#doSort()
- */
@Override
protected void doSort() {
super.doSort();
}
}
- /*
- * Overridden to provide filtering for root & children items.
- *
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.IndexedContainer#updateContainerFiltering()
- */
@Override
protected boolean doFilterContainer(boolean hasFilters) {
if (!hasFilters) {
private Set<Object> filterOverride = null;
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.IndexedContainer#passesFilters(java.lang.Object)
- */
@Override
protected boolean passesFilters(Object itemId) {
if (filterOverride != null) {
import java.util.Collection;
+import com.vaadin.data.Container;
import com.vaadin.data.Container.Hierarchical;
/**
* A wrapper class for adding external ordering to containers not implementing
- * the {@link com.vaadin.data.Container.Ordered} interface while retaining
- * {@link Hierarchical} features.
+ * the {@link Container.Ordered} interface while retaining {@link Hierarchical}
+ * features.
*
* @see ContainerOrderedWrapper
*/
* <li>Sends all needed events on content changes.
* </ul>
*
- * @see com.vaadin.data.Container
+ * @see Container
*
* @author Vaadin Ltd.
* @since 3.0
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerPropertyIds()
- */
@Override
public Collection<?> getContainerPropertyIds() {
return Collections.unmodifiableCollection(propertyIds);
return types.get(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
- * java.lang.Object)
- */
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
// map lookup more efficient than propertyIds if there are many
return new IndexedContainerProperty(itemId, propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
- * java.lang.Class, java.lang.Object)
- */
@Override
public boolean addContainerProperty(Object propertyId, Class<?> type,
Object defaultValue) {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeAllItems()
- */
@Override
public boolean removeAllItems() {
int origSize = size();
return id;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addItem(java.lang.Object)
- */
@Override
public Item addItem(Object itemId) {
Item item = internalAddItemAtEnd(itemId,
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeItem(java.lang.Object)
- */
@Override
public boolean removeItem(Object itemId) {
if (itemId == null || items.remove(itemId) == null) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object )
- */
@Override
public boolean removeContainerProperty(Object propertyId) {
/* Container.Ordered methods */
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
- * java.lang.Object)
- */
@Override
public Item addItemAfter(Object previousItemId, Object newItemId) {
return internalAddItemAfter(previousItemId, newItemId,
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Indexed#addItemAt(int, java.lang.Object)
- */
@Override
public Item addItemAt(int index, Object newItemId) {
return internalAddItemAt(index, newItemId,
super(source);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property.ValueChangeEvent#getProperty()
- */
@Override
public Property getProperty() {
return (Property) getSource();
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Deprecated
@Override
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Deprecated
@Override
removePropertySetChangeListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.
- * vaadin.data.Property.ValueChangeListener)
- */
@Override
public void addValueChangeListener(Property.ValueChangeListener listener) {
if (propertyValueChangeListeners == null) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #addValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
addValueChangeListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com
- * .vaadin.data.Property.ValueChangeListener)
- */
@Override
public void removeValueChangeListener(
Property.ValueChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #removeValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
/* Internal Item and Property implementations */
- /*
- * A class implementing the com.vaadin.data.Item interface to be contained
- * in the list.
+ /**
+ * A class implementing the {@link Item} interface to be contained in the
+ * list.
*
* @author Vaadin Ltd.
*
this.itemId = itemId;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Item#getItemProperty(java.lang.Object)
- */
@Override
public Property getItemProperty(Object id) {
if (!propertyIds.contains(id)) {
* properties at container level. See
* {@link IndexedContainer#addContainerProperty(Object, Class, Object)}
*
- * @see com.vaadin.data.Item#addProperty(Object, Property)
+ * @see Item#addProperty(Object, Property)
*/
@Override
public boolean addItemProperty(Object id, Property property)
* properties at container level. See
* {@link IndexedContainer#removeContainerProperty(Object)}
*
- * @see com.vaadin.data.Item#removeProperty(Object)
+ * @see Item#removeProperty(Object)
*/
@Override
public boolean removeItemProperty(Object id)
this.itemId = itemId;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property#getType()
- */
@Override
public Class<T> getType() {
return (Class<T>) types.get(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property#getValue()
- */
@Override
public T getValue() {
return (T) items.get(itemId).get(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property#isReadOnly()
- */
@Override
public boolean isReadOnly() {
return readOnlyProperties.contains(this);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property#setReadOnly(boolean)
- */
@Override
public void setReadOnly(boolean newStatus) {
if (newStatus) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property#setValue(java.lang.Object)
- */
@Override
public void setValue(Object newValue)
throws Property.ReadOnlyException {
&& lp.itemId.equals(itemId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property.ValueChangeNotifier#addListener(
- * com.vaadin.data.Property.ValueChangeListener)
- */
@Override
public void addValueChangeListener(
Property.ValueChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #addValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
addValueChangeListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Property.ValueChangeNotifier#removeListener
- * (com.vaadin.data.Property.ValueChangeListener)
- */
@Override
public void removeValueChangeListener(
Property.ValueChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #removeValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
- * boolean[])
- */
@Override
public void sort(Object[] propertyId, boolean[] ascending) {
sortContainer(propertyId, ascending);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds
- * ()
- */
@Override
public Collection<?> getSortableContainerPropertyIds() {
return getSortablePropertyIds();
removeFilter(filter);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
- */
@Override
public boolean hasContainerFilters() {
return super.hasContainerFilters();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
- */
@Override
public Collection<Filter> getContainerFilters() {
return super.getContainerFilters();
/**
* The instance used by this property
- *
+ *
* @return the instance used for fetching the property value
* @since 7.7.7
*/
* <p>
* To be consistent with {@link #setValue(Object)}, this method will fire a
* value change event even if the value stays the same
- *
+ *
* @param instance
* the instance to use
* @since 7.7.7
/**
* A simple data object containing one typed value. This class is a
- * straightforward implementation of the the {@link com.vaadin.data.Property}
- * interface.
+ * straightforward implementation of the the {@link Property} interface.
*
* @author Vaadin Ltd.
* @since 3.0
* This should not be called directly.
*/
@Override
- public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
+ public void valueChange(Property.ValueChangeEvent event) {
fireValueChange();
}
* This should not be called directly.
*/
@Override
- public void readOnlyStatusChange(
- com.vaadin.data.Property.ReadOnlyStatusChangeEvent event) {
+ public void readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent event) {
fireReadOnlyStatusChange();
}
/**
* Class for handling a set of identified Properties. The elements contained in
- * a </code>MapItem</code> can be referenced using locally unique identifiers.
+ * a <code>MapItem</code> can be referenced using locally unique identifiers.
* The class supports listeners who are interested in changes to the Property
* set managed by the class.
*
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Item.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Item.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Item.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Item.PropertySetChangeListener)}
**/
@Override
@Deprecated
* fired at the end of a successful transaction, whereas listeners attached to
* the underlying property may receive multiple value change events.
*
- * @see com.vaadin.data.Property.Transactional
+ * @see Property.Transactional
*
* @author Vaadin Ltd
* @since 7.0
@Override
public MODEL convertToModel(PRESENTATION value,
Class<? extends MODEL> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return realConverter.convertToPresentation(value, targetType, locale);
}
@Override
public PRESENTATION convertToPresentation(MODEL value,
Class<? extends PRESENTATION> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return realConverter.convertToModel(value, targetType, locale);
}
@Override
public BigDecimal convertToModel(String value,
Class<? extends BigDecimal> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return (BigDecimal) convertToNumber(value, BigDecimal.class, locale);
}
@Override
public BigInteger convertToModel(String value,
Class<? extends BigInteger> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
BigDecimal bigDecimalValue = (BigDecimal) convertToNumber(value,
BigDecimal.class, locale);
return f;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
- * java.lang.Class, java.util.Locale)
- */
@Override
public Date convertToModel(String value, Class<? extends Date> targetType,
- Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ Locale locale) throws ConversionException {
if (targetType != getModelType()) {
throw new ConversionException(
"Converter only supports " + getModelType().getName()
return parsedValue;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
- * .Object, java.lang.Class, java.util.Locale)
- */
@Override
public String convertToPresentation(Date value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
if (value == null) {
return null;
}
return getFormat(locale).format(value);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.converter.Converter#getModelType()
- */
@Override
public Class<Date> getModelType() {
return Date.class;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.util.converter.Converter#getPresentationType()
- */
@Override
public Class<String> getPresentationType() {
return String.class;
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#containsId(java.lang.Object)
- */
-
@Override
public boolean containsId(Object itemId) {
if (itemId == null) {
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
- * java.lang.Object)
- */
-
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
Item item = getItem(itemId);
return item.getItemProperty(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getContainerPropertyIds()
- */
-
@Override
public Collection<?> getContainerPropertyIds() {
return Collections.unmodifiableCollection(propertyIds);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getItem(java.lang.Object)
- */
-
@Override
public Item getItem(Object itemId) {
if (!cachedItems.containsKey(itemId)) {
return Collections.unmodifiableCollection(ids);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#getType(java.lang.Object)
- */
-
@Override
public Class<?> getType(Object propertyId) {
if (!propertyIds.contains(propertyId)) {
return propertyTypes.get(propertyId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#size()
- */
-
@Override
public int size() {
updateCount();
return size + sizeOfAddedItems() - removedItems.size();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeItem(java.lang.Object)
- */
-
@Override
public boolean removeItem(Object itemId)
throws UnsupportedOperationException {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeAllItems()
- */
-
@Override
public boolean removeAllItems() throws UnsupportedOperationException {
if (autoCommit) {
return !getContainerFilters().isEmpty();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Filterable#getContainerFilters()
- */
@Override
public Collection<Filter> getContainerFilters() {
return Collections.unmodifiableCollection(filters);
/** Methods from interface Container.Indexed **/
/**********************************************/
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Indexed#indexOfId(java.lang.Object)
- */
-
@Override
public int indexOfId(Object itemId) {
// First check if the id is in the added items
return -1;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Indexed#getIdByIndex(int)
- */
-
@Override
public Object getIdByIndex(int index) {
if (index < 0) {
/** Methods from interface Container.Ordered **/
/**********************************************/
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object)
- */
-
@Override
public Object nextItemId(Object itemId) {
int index = indexOfId(itemId) + 1;
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object)
- */
-
@Override
public Object prevItemId(Object itemId) {
int prevIndex = indexOfId(itemId) - 1;
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#firstItemId()
- */
-
@Override
public Object firstItemId() {
updateCount();
return itemIndexes.get(0);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#lastItemId()
- */
-
@Override
public Object lastItemId() {
if (addedItems.isEmpty()) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object)
- */
-
@Override
public boolean isFirstId(Object itemId) {
return firstItemId().equals(itemId);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object)
- */
-
@Override
public boolean isLastId(Object itemId) {
return lastItemId().equals(itemId);
/** Methods from interface Container.Sortable **/
/***********************************************/
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
- * boolean[])
- */
-
@Override
public void sort(Object[] propertyId, boolean[] ascending) {
sorters.clear();
refresh();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
- */
-
@Override
public Collection<?> getSortableContainerPropertyIds() {
return getContainerPropertyIds();
/** UNSUPPORTED CONTAINER FEATURES **/
/************************************/
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
- * java.lang.Class, java.lang.Object)
- */
-
@Override
public boolean addContainerProperty(Object propertyId, Class<?> type,
Object defaultValue) throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object)
- */
-
@Override
public boolean removeContainerProperty(Object propertyId)
throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#addItem(java.lang.Object)
- */
-
@Override
public Item addItem(Object itemId) throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
- * java.lang.Object)
- */
-
@Override
public Item addItemAfter(Object previousItemId, Object newItemId)
throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Indexed#addItemAt(int, java.lang.Object)
- */
-
@Override
public Item addItemAt(int index, Object newItemId)
throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Indexed#addItemAt(int)
- */
-
@Override
public Object addItemAt(int index) throws UnsupportedOperationException {
throw new UnsupportedOperationException();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
- */
-
@Override
public Object addItemAfter(Object previousItemId)
throws UnsupportedOperationException {
/** ITEMSETCHANGENOTIFIER IMPLEMENTATION **/
/******************************************/
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin
- * .data.Container.ItemSetChangeListener)
- */
-
@Override
public void addItemSetChangeListener(
Container.ItemSetChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
addItemSetChangeListener(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin
- * .data.Container.ItemSetChangeListener)
- */
-
@Override
public void removeItemSetChangeListener(
Container.ItemSetChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #removeItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
fetchMetaData();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#getCount()
- */
@Override
public int getCount() throws SQLException {
getLogger().log(Level.FINE, "Fetching count...");
return count;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#getResults(int,
- * int)
- */
@Override
public ResultSet getResults(int offset, int pagelength)
throws SQLException {
return executeQuery(sh);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#
- * implementationRespectsPagingLimits()
- */
@Override
public boolean implementationRespectsPagingLimits() {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#storeRow(com.vaadin
- * .addon.sqlcontainer.RowItem)
- */
@Override
public int storeRow(RowItem row)
throws UnsupportedOperationException, SQLException {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#setFilters(java.util
- * .List)
- */
@Override
public void setFilters(List<Filter> filters)
throws UnsupportedOperationException {
this.filters = Collections.unmodifiableList(filters);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#setOrderBy(java.util
- * .List)
- */
@Override
public void setOrderBy(List<OrderBy> orderBys)
throws UnsupportedOperationException {
this.orderBys = Collections.unmodifiableList(orderBys);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#beginTransaction()
- */
@Override
public void beginTransaction()
throws UnsupportedOperationException, SQLException {
super.beginTransaction();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#commit()
- */
@Override
public void commit() throws UnsupportedOperationException, SQLException {
getLogger().log(Level.FINE, "DB -> commit");
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#rollback()
- */
@Override
public void rollback() throws UnsupportedOperationException, SQLException {
getLogger().log(Level.FINE, "DB -> rollback");
super.rollback();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#getPrimaryKeyColumns()
- */
@Override
public List<String> getPrimaryKeyColumns() {
return Collections.unmodifiableList(primaryKeyColumns);
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#removeRow(com.vaadin
- * .addon.sqlcontainer.RowItem)
- */
@Override
public boolean removeRow(RowItem row)
throws UnsupportedOperationException, SQLException {
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.sqlcontainer.query.QueryDelegate#containsRowWithKey(
- * java.lang.Object[])
- */
@Override
public boolean containsRowWithKey(Object... keys) throws SQLException {
ArrayList<Filter> filtersAndKeys = new ArrayList<Filter>();
@Override
public void addRowIdChangeListener(RowIdChangeListener listener) {
if (rowIdChangeListeners == null) {
- rowIdChangeListeners = new LinkedList<QueryDelegate.RowIdChangeListener>();
+ rowIdChangeListeners = new LinkedList<RowIdChangeListener>();
}
rowIdChangeListeners.add(listener);
}
/**
* @deprecated As of 7.0, replaced by
- * {@link #addRowIdChangeListener(com.vaadin.data.util.sqlcontainer.query.QueryDelegate.RowIdChangeListener)}
+ * {@link #addRowIdChangeListener(QueryDelegate.RowIdChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeRowIdChangeListener(com.vaadin.data.util.sqlcontainer.query.QueryDelegate.RowIdChangeListener)}
+ * {@link #removeRowIdChangeListener(QueryDelegate.RowIdChangeListener)}
**/
@Override
@Deprecated
import com.vaadin.data.Validator;
/**
- * Abstract {@link com.vaadin.data.Validator Validator} implementation that
- * provides a basic Validator implementation except the
- * {@link #isValidValue(Object)} method.
+ * Abstract {@link Validator} implementation that provides a basic Validator
+ * implementation except the {@link #isValidValue(Object)} method.
* <p>
* To include the value that failed validation in the exception message you can
* use "{0}" in the error message. This will be replaced with the failed value
/**
* String validator for a double precision floating point number. See
- * {@link com.vaadin.data.validator.AbstractStringValidator} for more
- * information.
+ * {@link AbstractStringValidator} for more information.
*
* @author Vaadin Ltd.
* @since 5.4
* complete according to RFC 822 but handles the vast majority of valid e-mail
* addresses correctly.
*
- * See {@link com.vaadin.data.validator.AbstractStringValidator} for more
- * information.
+ * See {@link AbstractStringValidator} for more information.
*
* <p>
* An empty string or a null is always accepted - use the required flag on
import com.vaadin.data.util.converter.StringToIntegerConverter;
/**
- * String validator for integers. See
- * {@link com.vaadin.data.validator.AbstractStringValidator} for more
+ * String validator for integers. See {@link AbstractStringValidator} for more
* information.
*
* @author Vaadin Ltd.
* {@link java.util.regex.Pattern#sum}
* </p>
* <p>
- * See {@link com.vaadin.data.validator.AbstractStringValidator} for more
- * information.
+ * See {@link AbstractStringValidator} for more information.
* </p>
* <p>
* An empty string or a null is always accepted - use the required flag on
* (identified by its Id) and optionally also a property identifier (e.g. a
* table column identifier when transferring a single table cell).
*
- * The component must implement the interface
- * {@link com.vaadin.data.Container.Viewer}.
+ * The component must implement the interface {@link Container.Viewer}.
*
* In most cases, receivers of data transfers should depend on this class
* instead of its concrete subclasses.
/**
* Returns the container data source from which the transfer occurs.
*
- * {@link com.vaadin.data.Container.Viewer#getContainerDataSource()} is used
- * to obtain the underlying container of the source component.
+ * {@link Container.Viewer#getContainerDataSource()} is used to obtain the
+ * underlying container of the source component.
*
* @return Container
*/
import java.io.Serializable;
import java.lang.reflect.Method;
+import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.data.Property;
import com.vaadin.event.MouseEvents.ClickEvent;
/**
*
- * Click event fired by a {@link Component} implementing
- * {@link com.vaadin.data.Container} interface. ItemClickEvents happens on an
- * {@link Item} rendered somehow on terminal. Event may also contain a specific
- * {@link Property} on which the click event happened.
+ * Click event fired by a {@link Component} implementing {@link Container}
+ * interface. ItemClickEvents happens on an {@link Item} rendered somehow on
+ * terminal. Event may also contain a specific {@link Property} on which the
+ * click event happened.
*
* @since 5.3
*
String id = AC_BASE + session.getId();
Date expire = new Date(
- started + (getMaxInactiveIntervalSeconds(session) * 1000));
+ started + getMaxInactiveIntervalSeconds(session) * 1000);
Expiration expires = Expiration.onDate(expire);
memcache.put(id, bytes, expires);
DesignAttributeHandler.writeAttribute("color", attribute,
color.getCSS(), Color.WHITE.getCSS(), String.class);
DesignAttributeHandler.writeAttribute("popup-style", attribute,
- (popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple"),
+ popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple",
"normal", String.class);
DesignAttributeHandler.writeAttribute("position", attribute,
positionX + "," + positionY, "0,0", String.class);
* <p>
* Abstract field component for implementing buffered property editors. The
* field may hold an internal value, or it may be connected to any data source
- * that implements the {@link com.vaadin.data.Property}interface.
- * <code>AbstractField</code> implements that interface itself, too, so
- * accessing the Property value represented by it is straightforward.
+ * that implements the {@link Property}interface. <code>AbstractField</code>
+ * implements that interface itself, too, so accessing the Property value
+ * represented by it is straightforward.
* </p>
*
* <p>
- * AbstractField also provides the {@link com.vaadin.data.Buffered} interface
- * for buffering the data source value. By default the Field is in write
- * through-mode and {@link #setWriteThrough(boolean)}should be called to enable
- * buffering.
+ * AbstractField also provides the {@link Buffered} interface for buffering the
+ * data source value. By default the Field is in write through-mode and
+ * {@link #setWriteThrough(boolean)}should be called to enable buffering.
* </p>
*
* <p>
- * The class also supports {@link com.vaadin.data.Validator validators} to make
- * sure the value contained in the field is valid.
+ * The class also supports {@link Validator validators} to make sure the value
+ * contained in the field is valid.
* </p>
*
* @author Vaadin Ltd.
@Override
public boolean isReadOnly() {
return super.isReadOnly()
- || (dataSource != null && dataSource.isReadOnly());
+ || dataSource != null && dataSource.isReadOnly();
}
/**
/**
* Tests if the invalid data is committed to datasource.
*
- * @see com.vaadin.data.BufferedValidatable#isInvalidCommitted()
+ * @see BufferedValidatable#isInvalidCommitted()
*/
@Override
public boolean isInvalidCommitted() {
/**
* Sets if the invalid data should be committed to datasource.
*
- * @see com.vaadin.data.BufferedValidatable#setInvalidCommitted(boolean)
+ * @see BufferedValidatable#setInvalidCommitted(boolean)
*/
@Override
public void setInvalidCommitted(boolean isCommitted) {
public void commit()
throws Buffered.SourceException, InvalidValueException {
if (dataSource != null && !dataSource.isReadOnly()) {
- if ((isInvalidCommitted() || isValid())) {
+ if (isInvalidCommitted() || isValid()) {
try {
// Commits the value to datasource.
* </p>
*
* <p>
- * If the data source implements
- * {@link com.vaadin.data.Property.ValueChangeNotifier} and/or
- * {@link com.vaadin.data.Property.ReadOnlyStatusChangeNotifier}, the field
- * registers itself as a listener and updates itself according to the events
- * it receives. To avoid memory leaks caused by references to a field no
- * longer in use, the listener registrations are removed on
- * {@link AbstractField#detach() detach} and re-added on
- * {@link AbstractField#attach() attach}.
+ * If the data source implements {@link Property.ValueChangeNotifier} and/or
+ * {@link Property.ReadOnlyStatusChangeNotifier}, the field registers itself
+ * as a listener and updates itself according to the events it receives. To
+ * avoid memory leaks caused by references to a field no longer in use, the
+ * listener registrations are removed on {@link AbstractField#detach()
+ * detach} and re-added on {@link AbstractField#attach() attach}.
* </p>
*
* <p>
// Fires value change if the value has changed
T value = getInternalValue();
- if ((value != oldValue) && ((value != null && !value.equals(oldValue))
+ if (value != oldValue && (value != null && !value.equals(oldValue)
|| value == null)) {
fireValueChange(false);
}
* is required and empty this method throws an EmptyValueException with the
* error message set using {@link #setRequiredError(String)}.
*
- * @see com.vaadin.data.Validatable#validate()
+ * @see Validatable#validate()
*/
@Override
public void validate() throws Validator.InvalidValueException {
* because the field otherwise visually forget the user input immediately.
*
* @return true iff the invalid values are allowed.
- * @see com.vaadin.data.Validatable#isInvalidAllowed()
+ * @see Validatable#isInvalidAllowed()
*/
@Override
public boolean isInvalidAllowed() {
* datasource is set.
* </p>
*
- * @see com.vaadin.data.Validatable#setInvalidAllowed(boolean)
+ * @see Validatable#setInvalidAllowed(boolean)
*/
@Override
public void setInvalidAllowed(boolean invalidAllowed)
/**
* @deprecated As of 7.0, replaced by
- * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #addValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #removeValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #addReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ * {@link #addReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener)}
**/
@Override
@Deprecated
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ * {@link #removeReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener)}
**/
@Override
@Deprecated
@Override
public boolean isEmpty() {
- return (getFieldValue() == null);
+ return getFieldValue() == null;
}
@Override
/**
* <p>
* A class representing a selection of items the user has selected in a UI. The
- * set of choices is presented as a set of {@link com.vaadin.data.Item}s in a
- * {@link com.vaadin.data.Container}.
+ * set of choices is presented as a set of {@link Item}s in a {@link Container}.
* </p>
*
* <p>
/**
* Item caption mode: Index of the item is used as caption. The index
* mode can only be used with the containers implementing the
- * {@link com.vaadin.data.Container.Indexed} interface.
+ * {@link Container.Indexed} interface.
*/
INDEX,
/**
/**
* Invoked when the value of a variable has changed.
*
- * @see com.vaadin.ui.AbstractComponent#changeVariables(java.lang.Object,
- * java.util.Map)
+ * @see AbstractComponent#changeVariables(java.lang.Object, java.util.Map)
*/
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
/**
* Gets the selected item id or in multiselect mode a set of selected ids.
*
- * @see com.vaadin.ui.AbstractField#getValue()
+ * @see AbstractField#getValue()
*/
@Override
public Object getValue() {
*
* @param newValue
* the New selected item or collection of selected items.
- * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
+ * @see AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(Object newValue) throws Property.ReadOnlyException {
* True if caller is sure that repaint is not needed.
* @param ignoreReadOnly
* True if read-only check should be omitted.
- * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object,
- * java.lang.Boolean)
+ * @see AbstractField#setValue(java.lang.Object, java.lang.Boolean)
*/
@Override
protected void setValue(Object newFieldValue, boolean repaintIsNotNeeded,
- boolean ignoreReadOnly)
- throws com.vaadin.data.Property.ReadOnlyException,
+ boolean ignoreReadOnly) throws Property.ReadOnlyException,
ConversionException, InvalidValueException {
if (isMultiSelect()) {
if (newFieldValue == null) {
*
* @param propertyId
* the Id identifying the property.
- * @see com.vaadin.data.Container#getType(java.lang.Object)
+ * @see Container#getType(java.lang.Object)
*/
@Override
public Class<?> getType(Object propertyId) {
return items.getType(propertyId);
}
- /*
+ /**
* Gets the number of items in the container.
*
* @return the Number of items in the container.
*
- * @see com.vaadin.data.Container#size()
+ * @see Container#size()
*/
@Override
public int size() {
* Gets the Property identified by the given itemId and propertyId from the
* Container
*
- * @see com.vaadin.data.Container#getContainerProperty(Object, Object)
+ * @see Container#getContainerProperty(Object, Object)
*/
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
* returns false.
*
* @return True if the operation succeeded.
- * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
- * java.lang.Class, java.lang.Object)
+ * @see Container#addContainerProperty(java.lang.Object, java.lang.Class,
+ * java.lang.Object)
*/
@Override
public boolean addContainerProperty(Object propertyId, Class<?> type,
* returns false.
*
* @return True if the operation succeeded.
- * @see com.vaadin.data.Container#removeAllItems()
+ * @see Container#removeAllItems()
*/
@Override
public boolean removeAllItems() throws UnsupportedOperationException {
* method. if the creation fails, null is returned.
*
* @return the Id of the created item or null in case of failure.
- * @see com.vaadin.data.Container#addItem()
+ * @see Container#addItem()
*/
@Override
public Object addItem() throws UnsupportedOperationException {
* @param itemId
* the Identification of the item to be created.
* @return the Created item with the given id, or null in case of failure.
- * @see com.vaadin.data.Container#addItem(java.lang.Object)
+ * @see Container#addItem(java.lang.Object)
*/
@Override
public Item addItem(Object itemId) throws UnsupportedOperationException {
addItems(itemIds.toArray());
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container#removeItem(java.lang.Object)
- */
@Override
public boolean removeItem(Object itemId)
throws UnsupportedOperationException {
* returns false.
*
* @return True if the operation succeeded.
- * @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object)
+ * @see Container#removeContainerProperty(java.lang.Object)
*/
@Override
public boolean removeContainerProperty(Object propertyId)
* As a side-effect the fields value (selection) is set to null due old
* selection not necessary exists in new Container.
*
- * @see com.vaadin.data.Container.Viewer#setContainerDataSource(Container)
+ * @see Container.Viewer#setContainerDataSource(Container)
*
* @param newDataSource
* the new data source.
/**
* Gets the viewing data-source container.
*
- * @see com.vaadin.data.Container.Viewer#getContainerDataSource()
+ * @see Container.Viewer#getContainerDataSource()
*/
@Override
public Container getContainerDataSource() {
/**
* Notifies this listener that the Containers contents has changed.
*
- * @see com.vaadin.data.Container.PropertySetChangeListener#containerPropertySetChange(com.vaadin.data.Container.PropertySetChangeEvent)
+ * @see Container.PropertySetChangeListener#containerPropertySetChange(Container.PropertySetChangeEvent)
*/
@Override
public void containerPropertySetChange(
/**
* Adds a new Property set change listener for this Container.
*
- * @see com.vaadin.data.Container.PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
+ * @see Container.PropertySetChangeNotifier#addListener(Container.PropertySetChangeListener)
*/
@Override
public void addPropertySetChangeListener(
Container.PropertySetChangeListener listener) {
if (propertySetEventListeners == null) {
- propertySetEventListeners = new LinkedHashSet<Container.PropertySetChangeListener>();
+ propertySetEventListeners = new LinkedHashSet<PropertySetChangeListener>();
}
propertySetEventListeners.add(listener);
}
/**
* @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #addPropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* Removes a previously registered Property set change listener.
*
- * @see com.vaadin.data.Container.PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.PropertySetChangeListener)
+ * @see Container.PropertySetChangeNotifier#removeListener(Container.PropertySetChangeListener)
*/
@Override
public void removePropertySetChangeListener(
/**
* @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ * {@link #removePropertySetChangeListener(Container.PropertySetChangeListener)}
**/
@Override
@Deprecated
/**
* Adds an Item set change listener for the object.
*
- * @see com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
+ * @see Container.ItemSetChangeNotifier#addListener(Container.ItemSetChangeListener)
*/
@Override
public void addItemSetChangeListener(
/**
* @deprecated As of 7.0, replaced by
- * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* Removes the Item set change listener from the object.
*
- * @see com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
+ * @see Container.ItemSetChangeNotifier#removeListener(Container.ItemSetChangeListener)
*/
@Override
public void removeItemSetChangeListener(
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ * {@link #removeItemSetChangeListener(Container.ItemSetChangeListener)}
**/
@Override
@Deprecated
/**
* Lets the listener know a Containers Item set has changed.
*
- * @see com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent)
+ * @see Container.ItemSetChangeListener#containerItemSetChange(Container.ItemSetChangeEvent)
*/
@Override
public void containerItemSetChange(Container.ItemSetChangeEvent event) {
/**
* Gets the Property where the event occurred.
*
- * @see com.vaadin.data.Container.ItemSetChangeEvent#getContainer()
+ * @see Container.ItemSetChangeEvent#getContainer()
*/
@Override
public Container getContainer() {
/**
* Retrieves the Container whose contents have been modified.
*
- * @see com.vaadin.data.Container.PropertySetChangeEvent#getContainer()
+ * @see Container.PropertySetChangeEvent#getContainer()
*/
@Override
public Container getContainer() {
/**
* Notifies the component that it is connected to an application.
*
- * @see com.vaadin.ui.AbstractField#attach()
+ * @see AbstractField#attach()
*/
@Override
public void attach() {
/**
* Detaches the component from application.
*
- * @see com.vaadin.ui.AbstractComponent#detach()
+ * @see AbstractComponent#detach()
*/
@Override
public void detach() {
}
@Override
- public void valueChange(
- com.vaadin.data.Property.ValueChangeEvent event) {
+ public void valueChange(Property.ValueChangeEvent event) {
markAsDirty();
}
@Override
- public void itemPropertySetChange(
- com.vaadin.data.Item.PropertySetChangeEvent event) {
+ public void itemPropertySetChange(Item.PropertySetChangeEvent event) {
markAsDirty();
}
*
* <li>If date range is seven days or shorter, the weekly view is used.</li>
*
- * <li>Calendar queries its events by using a
- * {@link com.vaadin.addon.calendar.event.CalendarEventProvider
- * CalendarEventProvider}. By default, a
- * {@link com.vaadin.addon.calendar.event.BasicEventProvider BasicEventProvider}
- * is used.</li>
+ * <li>Calendar queries its events by using a {@link CalendarEventProvider}. By
+ * default, a {@link BasicEventProvider} is used.</li>
*
* @since 7.1
* @author Vaadin Ltd.
/**
* Sets the locale to be used in the Calendar component.
*
- * @see com.vaadin.ui.AbstractComponent#setLocale(java.util.Locale)
+ * @see AbstractComponent#setLocale(java.util.Locale)
*/
@Override
public void setLocale(Locale newLocale) {
getTimeZone());
Action[] actions = actionHandler.getActions(range, this);
if (actions != null) {
- Set<Action> actionSet = new LinkedHashSet<Action>(Arrays.asList(actions));
+ Set<Action> actionSet = new LinkedHashSet<Action>(
+ Arrays.asList(actions));
actionMap.put(range, actionSet);
}
}
}
/**
- * Set the {@link com.vaadin.addon.calendar.event.CalendarEventProvider
- * CalendarEventProvider} to be used with this calendar. The EventProvider
- * is used to query for events to show, and must be non-null. By default a
- * {@link com.vaadin.addon.calendar.event.BasicEventProvider
- * BasicEventProvider} is used.
+ * Set the {@link CalendarEventProvider} to be used with this calendar. The
+ * EventProvider is used to query for events to show, and must be non-null.
+ * By default a {@link BasicEventProvider} is used.
*
* @param calendarEventProvider
* the calendarEventProvider to set. Cannot be null.
}
/**
- * @return the {@link com.vaadin.addon.calendar.event.CalendarEventProvider
- * CalendarEventProvider} currently used
+ * @return the {@link CalendarEventProvider} currently used
*/
public CalendarEventProvider getEventProvider() {
return calendarEventProvider;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.ui.CalendarEvents.EventChangeListener#
- * eventChange (com.vaadin.addon.calendar.ui.CalendarEvents.EventChange)
- */
@Override
public void eventSetChange(EventSetChangeEvent changeEvent) {
// sanity check
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardHandler)
- */
@Override
public void setHandler(ForwardHandler listener) {
setHandler(ForwardEvent.EVENT_ID, ForwardEvent.class, listener,
ForwardHandler.forwardMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardHandler)
- */
@Override
public void setHandler(BackwardHandler listener) {
setHandler(BackwardEvent.EVENT_ID, BackwardEvent.class, listener,
BackwardHandler.backwardMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.DateClickHandler)
- */
@Override
public void setHandler(DateClickHandler listener) {
setHandler(DateClickEvent.EVENT_ID, DateClickEvent.class, listener,
DateClickHandler.dateClickMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventClickHandler)
- */
@Override
public void setHandler(EventClickHandler listener) {
setHandler(EventClick.EVENT_ID, EventClick.class, listener,
EventClickHandler.eventClickMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.WeekClickHandler)
- */
@Override
public void setHandler(WeekClickHandler listener) {
setHandler(WeekClick.EVENT_ID, WeekClick.class, listener,
WeekClickHandler.weekClickMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeHandler
- * )
- */
@Override
public void setHandler(EventResizeHandler listener) {
setHandler(EventResize.EVENT_ID, EventResize.class, listener,
EventResizeHandler.eventResizeMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.RangeSelectNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.RangeSelectHandler
- * )
- */
@Override
public void setHandler(RangeSelectHandler listener) {
setHandler(RangeSelectEvent.EVENT_ID, RangeSelectEvent.class, listener,
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveHandler)
- */
@Override
public void setHandler(EventMoveHandler listener) {
setHandler(MoveEvent.EVENT_ID, MoveEvent.class, listener,
EventMoveHandler.eventMoveMethod);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.ui.CalendarComponentEvents.
- * CalendarEventNotifier #getHandler(java.lang.String)
- */
@Override
public EventListener getHandler(String eventId) {
return handlers.get(eventId);
this.dropHandler = dropHandler;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map)
- */
@Override
public TargetDetails translateDropTargetDetails(
Map<String, Object> clientVariables) {
* Use this method if you are adding a container which uses the default
* property ids like {@link BeanItemContainer} for instance. If you are
* using custom properties instead use
- * {@link Calendar#setContainerDataSource(com.vaadin.data.Container.Indexed, Object, Object, Object, Object, Object)}
+ * {@link Calendar#setContainerDataSource(Container.Indexed, Object, Object, Object, Object, Object)}
*
* Please note that the container must be sorted by date!
*
setEventProvider(provider);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
- * util.Date, java.util.Date)
- */
@Override
public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
List<CalendarEvent> events = getEventProvider().getEvents(startDate,
return events;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
- * (com.vaadin.addon.calendar.event.CalendarEvent)
- */
@Override
public void addEvent(CalendarEvent event) {
if (getEventProvider() instanceof CalendarEditableEventProvider) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent
- * (com.vaadin.addon.calendar.event.CalendarEvent)
- */
@Override
public void removeEvent(CalendarEvent event) {
if (getEventProvider() instanceof CalendarEditableEventProvider) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.event.Action.Container#removeActionHandler(com.vaadin.event
- * .Action.Handler)
- */
@Override
public void removeActionHandler(Handler actionHandler) {
if (actionHandlers != null && actionHandlers.contains(actionHandler)) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.server.VariableOwner#changeVariables(java.lang.Object,
- * java.util.Map)
- */
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
/*
*/
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.ui.LegacyComponent#paintContent(com.vaadin.server.PaintTarget)
- */
@Override
public void paintContent(PaintTarget target) throws PaintException {
if (dropHandler != null) {
* </p>
* <p>
* Since <code>DateField</code> extends <code>AbstractField</code> it implements
- * the {@link com.vaadin.data.Buffered}interface.
+ * the {@link Buffered} interface.
* </p>
* <p>
* A <code>DateField</code> is in write-through mode by default, so
- * {@link com.vaadin.ui.AbstractField#setWriteThrough(boolean)}must be called to
- * enable buffering.
+ * {@link AbstractField#setWriteThrough(boolean)}must be called to enable
+ * buffering.
* </p>
*
* @author Vaadin Ltd.
* Constructs a new <code>DateField</code> with the given caption and
* initial text contents. The editor constructed this way will not be bound
* to a Property unless
- * {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)}
- * is called to bind it.
+ * {@link Property.Viewer#setPropertyDataSource(Property)} is called to bind
+ * it.
*
* @param caption
* the caption <code>String</code> for the editor.
return Date.class;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractField#setValue(java.lang.Object, boolean)
- */
@Override
protected void setValue(Date newValue, boolean repaintIsNotNeeded)
throws Property.ReadOnlyException {
* @param dateFormat
* the dateFormat to set
*
- * @see com.vaadin.ui.AbstractComponent#setLocale(Locale))
+ * @see AbstractComponent#setLocale(Locale))
*/
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
* invalid if it contains text typed in by the user that couldn't be parsed
* into a Date value.
*
- * @see com.vaadin.ui.AbstractField#validate()
+ * @see AbstractField#validate()
*/
@Override
public void validate() throws InvalidValueException {
* value that the user can change through the user interface.
*
* Field components are built upon the framework defined in the Field interface
- * and the {@link com.vaadin.AbstractField} base class.
- *
- * The Field interface inherits the {@link com.vaadin.ui.Component}
- * superinterface and also the {@link com.vaadin.ui.Property} interface to have
- * a value for the field.
+ * and the {@link AbstractField} base class.
*
+ * The Field interface inherits the {@link Component} superinterface and also
+ * the {@link Property} interface to have a value for the field.
*
* @author Vaadin Ltd.
*
- * @param T
+ * @param <T>
* the type of values in the field, which might not be the same type
* as that of the data source if converters are used
- *
- * @author IT Mill Ltd.
*/
public interface Field<T> extends Component, BufferedValidatable, Property<T>,
Property.ValueChangeNotifier, Property.ValueChangeListener,
*
* <p>
* <code>Form</code> provides customizable editor for classes implementing
- * {@link com.vaadin.data.Item} interface. Also the form itself implements this
- * interface for easier connectivity to other items. To use the form as editor
- * for an item, just connect the item to form with
- * {@link Form#setItemDataSource(Item)}. If only a part of the item needs to be
- * edited, {@link Form#setItemDataSource(Item,Collection)} can be used instead.
- * After the item has been connected to the form, the automatically created
- * fields can be customized and new fields can be added. If you need to connect
- * a class that does not implement {@link com.vaadin.data.Item} interface, most
- * properties of any class following bean pattern, can be accessed trough
- * {@link com.vaadin.data.util.BeanItem}.
+ * {@link Item} interface. Also the form itself implements this interface for
+ * easier connectivity to other items. To use the form as editor for an item,
+ * just connect the item to form with {@link Form#setItemDataSource(Item)}. If
+ * only a part of the item needs to be edited,
+ * {@link Form#setItemDataSource(Item,Collection)} can be used instead. After
+ * the item has been connected to the form, the automatically created fields can
+ * be customized and new fields can be added. If you need to connect a class
+ * that does not implement {@link Item} interface, most properties of any class
+ * following bean pattern, can be accessed trough {@link BeanItem}.
* </p>
*
* @author Vaadin Ltd.
*/
private final ValueChangeListener fieldValueChangeListener = new ValueChangeListener() {
@Override
- public void valueChange(
- com.vaadin.data.Property.ValueChangeEvent event) {
+ public void valueChange(Property.ValueChangeEvent event) {
markAsDirty();
}
};
// Try to commit all
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
try {
- final Field<?> f = (fields.get(i.next()));
+ final Field<?> f = fields.get(i.next());
// Commit only non-readonly fields.
if (!f.isReadOnly()) {
f.commit();
// Try to discard all changes
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
try {
- (fields.get(i.next())).discard();
+ fields.get(i.next()).discard();
} catch (final Buffered.SourceException e) {
if (problems == null) {
problems = new LinkedList<SourceException>();
this.buffered = buffered;
for (final Iterator<Object> i = propertyIds.iterator(); i
.hasNext();) {
- (fields.get(i.next())).setBuffered(buffered);
+ fields.get(i.next()).setBuffered(buffered);
}
}
}
/**
* Adds a new property to form and create corresponding field.
*
- * @see com.vaadin.data.Item#addItemProperty(Object, Property)
+ * @see Item#addItemProperty(Object, Property)
*/
@Override
public boolean addItemProperty(Object id, Property property) {
* source, the field is returned instead of the data source.
* </p>
*
- * @see com.vaadin.data.Item#getItemProperty(Object)
+ * @see Item#getItemProperty(Object)
*/
@Override
public Property getItemProperty(Object id) {
/**
* Removes the property and corresponding field from the form.
*
- * @see com.vaadin.data.Item#removeItemProperty(Object)
+ * @see Item#removeItemProperty(Object)
*/
@Override
public boolean removeItemProperty(Object id) {
* adds all the properties as fields to the form.
* </p>
*
- * @see com.vaadin.data.Item.Viewer#setItemDataSource(Item)
+ * @see Item.Viewer#setItemDataSource(Item)
*/
@Override
public void setItemDataSource(Item newDataSource) {
* order.
* </p>
*
- * @see com.vaadin.data.Item.Viewer#setItemDataSource(Item)
+ * @see Item.Viewer#setItemDataSource(Item)
*/
public void setItemDataSource(Item newDataSource,
Collection<?> propertyIds) {
// expect developer has e.g. PropertyFormatter that he wishes to use and
// assign the property to the Viewer instead.
boolean hasFilterProperty = field.getPropertyDataSource() != null
- && (field.getPropertyDataSource() instanceof Property.Viewer);
+ && field.getPropertyDataSource() instanceof Property.Viewer;
if (hasFilterProperty) {
((Property.Viewer) field.getPropertyDataSource())
.setPropertyDataSource(property);
boolean isMultiselect = false;
for (int i = 0; i < values.length && !found; i++) {
if (values[i] == value
- || (value != null && value.equals(values[i]))) {
+ || value != null && value.equals(values[i])) {
found = true;
}
}
found = false;
for (int i = 0; i < values.length && !found; i++) {
if (values[i] == val
- || (val != null && val.equals(values[i]))) {
+ || val != null && val.equals(values[i])) {
found = true;
}
}
/**
* Checks the validity of the Form and all of its fields.
*
- * @see com.vaadin.data.Validatable#validate()
+ * @see Validatable#validate()
*/
@Override
public void validate() throws InvalidValueException {
super.validate();
for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
- (fields.get(i.next())).validate();
+ fields.get(i.next()).validate();
}
}
/**
* Checks the validabtable object accept invalid values.
*
- * @see com.vaadin.data.Validatable#isInvalidAllowed()
+ * @see Validatable#isInvalidAllowed()
*/
@Override
public boolean isInvalidAllowed() {
/**
* Should the validabtable object accept invalid values.
*
- * @see com.vaadin.data.Validatable#setInvalidAllowed(boolean)
+ * @see Validatable#setInvalidAllowed(boolean)
*/
@Override
public void setInvalidAllowed(boolean invalidValueAllowed)
/**
* Sets the component's to read-only mode to the specified state.
*
- * @see com.vaadin.ui.Component#setReadOnly(boolean)
+ * @see Component#setReadOnly(boolean)
*/
@Override
public void setReadOnly(boolean readOnly) {
super.setReadOnly(readOnly);
for (final Iterator<?> i = propertyIds.iterator(); i.hasNext();) {
- (fields.get(i.next())).setReadOnly(readOnly);
+ fields.get(i.next()).setReadOnly(readOnly);
}
}
/**
* Gets the field type.
*
- * @see com.vaadin.ui.AbstractField#getType()
+ * @see AbstractField#getType()
*/
@Override
public Class<?> getType() {
*
* This is relevant when the Form is used as Field.
*
- * @see com.vaadin.ui.AbstractField#setInternalValue(java.lang.Object)
+ * @see AbstractField#setInternalValue(java.lang.Object)
*/
@Override
protected void setInternalValue(Object newValue) {
/**
* Focuses the first field in the form.
*
- * @see com.vaadin.ui.Component.Focusable#focus()
+ * @see Component.Focusable#focus()
*/
@Override
public void focus() {
/**
* Sets the Tabulator index of this Focusable component.
*
- * @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
+ * @see Component.Focusable#setTabIndex(int)
*/
@Override
public void setTabIndex(int tabIndex) {
super.setTabIndex(tabIndex);
for (final Iterator<?> i = getItemPropertyIds().iterator(); i
.hasNext();) {
- (getField(i.next())).setTabIndex(tabIndex);
+ getField(i.next()).setTabIndex(tabIndex);
}
}
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractField#clear()
- */
@Override
public void clear() {
for (Iterator<Field<?>> i = fields.values().iterator(); i.hasNext();) {
* is {@link Form}. uiContext will not necessary be the parent
* component of the field, but the one that is responsible for
* creating it.
- * @return Field the field suitable for editing the specified data.
+ * @return the field suitable for editing the specified data.
*/
Field<?> createField(Item item, Object propertyId, Component uiContext);
}
* <p>
* Each column has its own {@link Renderer} that displays data into something
* that can be displayed in the browser. That data is first converted with a
- * {@link com.vaadin.data.util.converter.Converter Converter} into something
- * that the Renderer can process. This can also be an implicit step - if a
- * column has a simple data type, like a String, no explicit assignment is
- * needed.
+ * {@link Converter} into something that the Renderer can process. This can also
+ * be an implicit step - if a column has a simple data type, like a String, no
+ * explicit assignment is needed.
* <p>
* Usually a renderer takes some kind of object, and converts it into a
* HTML-formatted string.
* Getting a field before the editor has been opened depends on special
* support from the {@link FieldGroup} in use. Using this method with a
* user-provided <code>FieldGroup</code> might cause
- * {@link com.vaadin.data.fieldgroup.FieldGroup.BindException
- * BindException} to be thrown.
+ * {@link FieldGroup.BindException BindException} to be thrown.
*
* @return the bound field; or <code>null</code> if the respective
* column is not editable
}
/**
- * An abstract base class for server-side
- * {@link com.vaadin.ui.renderers.Renderer Grid renderers}. This class
- * currently extends the AbstractExtension superclass, but this fact should
- * be regarded as an implementation detail and subject to change in a future
- * major or minor Vaadin revision.
+ * An abstract base class for server-side {@link Renderer Grid renderers}.
+ * This class currently extends the AbstractExtension superclass, but this
+ * fact should be regarded as an implementation detail and subject to change
+ * in a future major or minor Vaadin revision.
*
* @param <T>
* the type this renderer knows how to present
Type type = null;
try {
type = (getState(false).getClass()
- .getField(diffStateKey)
- .getGenericType());
+ .getField(diffStateKey).getGenericType());
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (SecurityException e) {
Type type = null;
try {
type = (getState(false).getClass()
- .getField(diffStateKey)
- .getGenericType());
+ .getField(diffStateKey).getGenericType());
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (SecurityException e) {
/**
* Gets the type of the Property.
*
- * @see com.vaadin.data.Property#getType()
+ * @see Property#getType()
*/
@Override
public Class<String> getType() {
* Gets the viewing data-source property.
*
* @return the data source property.
- * @see com.vaadin.data.Property.Viewer#getPropertyDataSource()
+ * @see Property.Viewer#getPropertyDataSource()
*/
@Override
public Property getPropertyDataSource() {
*
* @param newDataSource
* the new data source Property
- * @see com.vaadin.data.Property.Viewer#setPropertyDataSource(com.vaadin.data.Property)
+ * @see Property.Viewer#setPropertyDataSource(Property)
*/
@Override
public void setPropertyDataSource(Property newDataSource) {
/**
* Gets the Property that has been modified.
*
- * @see com.vaadin.data.Property.ValueChangeEvent#getProperty()
+ * @see Property.ValueChangeEvent#getProperty()
*/
@Override
public Property getProperty() {
*
* @param listener
* the Listener to be added.
- * @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.vaadin.data.Property.ValueChangeListener)
+ * @see Property.ValueChangeNotifier#addListener(Property.ValueChangeListener)
*/
@Override
public void addValueChangeListener(Property.ValueChangeListener listener) {
/**
* @deprecated As of 7.0, replaced by
- * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #addValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
*
* @param listener
* the Listener to be removed.
- * @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com.vaadin.data.Property.ValueChangeListener)
+ * @see Property.ValueChangeNotifier#removeListener(Property.ValueChangeListener)
*/
@Override
public void removeValueChangeListener(
/**
* @deprecated As of 7.0, replaced by
- * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ * {@link #removeValueChangeListener(Property.ValueChangeListener)}
**/
@Override
@Deprecated
/**
* Listens the value change events from data source.
*
- * @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
+ * @see Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
*/
@Override
public void valueChange(Property.ValueChangeEvent event) {
import java.util.Collection;
import com.vaadin.data.Container;
+import com.vaadin.data.Item;
/**
* <p>
* A class representing a selection of items the user has selected in a UI. The
- * set of choices is presented as a set of {@link com.vaadin.data.Item}s in a
- * {@link com.vaadin.data.Container}.
+ * set of choices is presented as a set of {@link Item}s in a {@link Container}.
* </p>
*
* <p>
/**
* Row caption mode: Index of the item is used as item caption. The
* index mode can only be used with the containers implementing the
- * {@link com.vaadin.data.Container.Indexed} interface.
+ * {@link Container.Indexed} interface.
*/
INDEX(ItemCaptionMode.INDEX),
/**
/**
* Invoked when the value of a variable has changed.
*
- * @see com.vaadin.ui.Select#changeVariables(java.lang.Object,
- * java.util.Map)
+ * @see Select#changeVariables(java.lang.Object, java.util.Map)
*/
@Override
getVisibleCells();
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractSelect#paintContent(com.vaadin.
- * terminal.PaintTarget)
- */
-
@Override
public void paintContent(PaintTarget target) throws PaintException {
isBeingPainted = true;
*
* Also listens changes in rendered items to refresh content area.
*
- * @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
+ * @see Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
*/
@Override
/**
* Notifies the component that it is connected to an application.
*
- * @see com.vaadin.ui.Component#attach()
+ * @see Component#attach()
*/
@Override
/**
* Notifies the component that it is detached from the application
*
- * @see com.vaadin.ui.Component#detach()
+ * @see Component#detach()
*/
@Override
/**
* Removes all Items from the Container.
*
- * @see com.vaadin.data.Container#removeAllItems()
+ * @see Container#removeAllItems()
*/
@Override
/**
* Removes the Item identified by <code>ItemId</code> from the Container.
*
- * @see com.vaadin.data.Container#removeItem(Object)
+ * @see Container#removeItem(Object)
*/
@Override
/**
* Removes a Property specified by the given Property ID from the Container.
*
- * @see com.vaadin.data.Container#removeContainerProperty(Object)
+ * @see Container#removeContainerProperty(Object)
*/
@Override
* the class of the property.
* @param defaultValue
* the default value given for all existing items.
- * @see com.vaadin.data.Container#addContainerProperty(Object, Class,
- * Object)
+ * @see Container#addContainerProperty(Object, Class, Object)
*/
@Override
* the Alignment of the column. Null implies align left.
* @throws UnsupportedOperationException
* if the operation is not supported.
- * @see com.vaadin.data.Container#addContainerProperty(Object, Class,
- * Object)
+ * @see Container#addContainerProperty(Object, Class, Object)
*/
public boolean addContainerProperty(Object propertyId, Class<?> type,
Object defaultValue, String columnHeader, Resource columnIcon,
* {@link #getPageLength()} may produce good enough estimates in some
* situations.
*
- * @see com.vaadin.ui.Select#getVisibleItemIds()
+ * @see Select#getVisibleItemIds()
*/
@Override
* Container datasource item set change. Table must flush its buffers on
* change.
*
- * @see com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent)
+ * @see Container.ItemSetChangeListener#containerItemSetChange(Container.ItemSetChangeEvent)
*/
@Override
* Container datasource property set change. Table must flush its buffers on
* change.
*
- * @see com.vaadin.data.Container.PropertySetChangeListener#containerPropertySetChange(com.vaadin.data.Container.PropertySetChangeEvent)
+ * @see Container.PropertySetChangeListener#containerPropertySetChange(Container.PropertySetChangeEvent)
*/
@Override
*
* @throws UnsupportedOperationException
* if set to true.
- * @see com.vaadin.ui.Select#setNewItemsAllowed(boolean)
+ * @see Select#setNewItemsAllowed(boolean)
*/
@Override
/**
* Gets the ID of the Item following the Item that corresponds to itemId.
*
- * @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object)
+ * @see Container.Ordered#nextItemId(java.lang.Object)
*/
@Override
* Gets the ID of the Item preceding the Item that corresponds to the
* itemId.
*
- * @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object)
+ * @see Container.Ordered#prevItemId(java.lang.Object)
*/
@Override
/**
* Gets the ID of the first Item in the Container.
*
- * @see com.vaadin.data.Container.Ordered#firstItemId()
+ * @see Container.Ordered#firstItemId()
*/
@Override
/**
* Gets the ID of the last Item in the Container.
*
- * @see com.vaadin.data.Container.Ordered#lastItemId()
+ * @see Container.Ordered#lastItemId()
*/
@Override
* Tests if the Item corresponding to the given Item ID is the first Item in
* the Container.
*
- * @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object)
+ * @see Container.Ordered#isFirstId(java.lang.Object)
*/
@Override
* Tests if the Item corresponding to the given Item ID is the last Item in
* the Container.
*
- * @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object)
+ * @see Container.Ordered#isLastId(java.lang.Object)
*/
@Override
/**
* Adds new item after the given item.
*
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
+ * @see Container.Ordered#addItemAfter(java.lang.Object)
*/
@Override
/**
* Adds new item after the given item.
*
- * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
- * java.lang.Object)
+ * @see Container.Ordered#addItemAfter(java.lang.Object, java.lang.Object)
*/
@Override
* @throws UnsupportedOperationException
* if the container data source does not implement
* Container.Sortable
- * @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
- * boolean[])
+ * @see Container.Sortable#sort(java.lang.Object[], boolean[])
*
*/
* collection.
* </p>
*
- * @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
+ * @see Container.Sortable#getSortableContainerPropertyIds()
*/
@Override
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
+import com.vaadin.data.Buffered;
import com.vaadin.data.Property;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
*
* <p>
* Since <code>TextField</code> extends <code>AbstractField</code> it implements
- * the {@link com.vaadin.data.Buffered} interface. A <code>TextField</code> is
- * in write-through mode by default, so
- * {@link com.vaadin.ui.AbstractField#setWriteThrough(boolean)} must be called
- * to enable buffering.
+ * the {@link Buffered} interface. A <code>TextField</code> is in write-through
+ * mode by default, so {@link AbstractField#setWriteThrough(boolean)} must be
+ * called to enable buffering.
* </p>
*
* @author Vaadin Ltd.
* Constructs a new <code>TextField</code> with the given caption and
* initial text contents. The editor constructed this way will not be bound
* to a Property unless
- * {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)}
- * is called to bind it.
+ * {@link Property.Viewer#setPropertyDataSource(Property)} is called to bind
+ * it.
*
* @param caption
* the caption <code>String</code> for the editor.
/* Component API */
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractSelect#changeVariables(java.lang.Object,
- * java.util.Map)
- */
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
/**
* Paints any needed component-specific things to the given UIDL stream.
*
- * @see com.vaadin.ui.AbstractComponent#paintContent(PaintTarget)
+ * @see AbstractComponent#paintContent(PaintTarget)
*/
@Override
public void paintContent(PaintTarget target) throws PaintException {
/**
* Tests if the Item with given ID can have any children.
*
- * @see com.vaadin.data.Container.Hierarchical#areChildrenAllowed(Object)
+ * @see Container.Hierarchical#areChildrenAllowed(Object)
*/
@Override
public boolean areChildrenAllowed(Object itemId) {
/**
* Gets the IDs of all Items that are children of the specified Item.
*
- * @see com.vaadin.data.Container.Hierarchical#getChildren(Object)
+ * @see Container.Hierarchical#getChildren(Object)
*/
@Override
public Collection<?> getChildren(Object itemId) {
/**
* Gets the ID of the parent Item of the specified Item.
*
- * @see com.vaadin.data.Container.Hierarchical#getParent(Object)
+ * @see Container.Hierarchical#getParent(Object)
*/
@Override
public Object getParent(Object itemId) {
/**
* Tests if the Item specified with <code>itemId</code> has child Items.
*
- * @see com.vaadin.data.Container.Hierarchical#hasChildren(Object)
+ * @see Container.Hierarchical#hasChildren(Object)
*/
@Override
public boolean hasChildren(Object itemId) {
/**
* Tests if the Item specified with <code>itemId</code> is a root Item.
*
- * @see com.vaadin.data.Container.Hierarchical#isRoot(Object)
+ * @see Container.Hierarchical#isRoot(Object)
*/
@Override
public boolean isRoot(Object itemId) {
/**
* Gets the IDs of all Items in the container that don't have a parent.
*
- * @see com.vaadin.data.Container.Hierarchical#rootItemIds()
+ * @see Container.Hierarchical#rootItemIds()
*/
@Override
public Collection<?> rootItemIds() {
/**
* Sets the given Item's capability to have children.
*
- * @see com.vaadin.data.Container.Hierarchical#setChildrenAllowed(Object,
- * boolean)
+ * @see Container.Hierarchical#setChildrenAllowed(Object, boolean)
*/
@Override
public boolean setChildrenAllowed(Object itemId,
return success;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.data.Container.Hierarchical#setParent(java.lang.Object ,
- * java.lang.Object)
- */
@Override
public boolean setParent(Object itemId, Object newParentId) {
final boolean success = ((Container.Hierarchical) items)
/**
* Sets the Container that serves as the data source of the viewer.
*
- * @see com.vaadin.data.Container.Viewer#setContainerDataSource(Container)
+ * @see Container.Viewer#setContainerDataSource(Container)
*/
@Override
public void setContainerDataSource(Container newDataSource) {
}
@Override
- public void containerItemSetChange(
- com.vaadin.data.Container.ItemSetChangeEvent event) {
+ public void containerItemSetChange(Container.ItemSetChangeEvent event) {
super.containerItemSetChange(event);
if (getContainerDataSource() instanceof Filterable) {
boolean hasFilters = !((Filterable) getContainerDataSource())
/**
* Gets the visible item ids.
*
- * @see com.vaadin.ui.Select#getVisibleItemIds()
+ * @see Select#getVisibleItemIds()
*/
@Override
public Collection<?> getVisibleItemIds() {
/**
* Tree does not support <code>setNullSelectionItemId</code>.
*
- * @see com.vaadin.ui.AbstractSelect#setNullSelectionItemId(java.lang.Object)
+ * @see AbstractSelect#setNullSelectionItemId(java.lang.Object)
*/
@Override
public void setNullSelectionItemId(Object nullSelectionItemId)
*
* @throws UnsupportedOperationException
* if set to true.
- * @see com.vaadin.ui.Select#setNewItemsAllowed(boolean)
+ * @see Select#setNewItemsAllowed(boolean)
*/
@Override
public void setNewItemsAllowed(boolean allowNewOptions)
* Concrete implementation of {@link DataBoundTransferable} for data
* transferred from a tree.
*
- * @see {@link DataBoundTransferable}.
+ * @see DataBoundTransferable
*
* @since 6.3
*/
}
@Override
- public void containerItemSetChange(
- com.vaadin.data.Container.ItemSetChangeEvent event) {
+ public void containerItemSetChange(Container.ItemSetChangeEvent event) {
// Can't do partial repaints if items are added or removed during the
// expand/collapse request
toggledItemId = null;
* Adds the upload started event listener.
*
* @param listener
- * the Listener to be added.
+ * the Listener to be added, not null
*/
public void addStartedListener(StartedListener listener) {
addListener(StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
* Adds the upload received event listener.
*
* @param listener
- * the Listener to be added.
+ * the Listener to be added, not null
*/
public void addFinishedListener(FinishedListener listener) {
addListener(FinishedEvent.class, listener, UPLOAD_FINISHED_METHOD);
* Adds the upload interrupted event listener.
*
* @param listener
- * the Listener to be added.
+ * the Listener to be added, not null
*/
public void addFailedListener(FailedListener listener) {
addListener(FailedEvent.class, listener, UPLOAD_FAILED_METHOD);
* Adds the upload success event listener.
*
* @param listener
- * the Listener to be added.
+ * the Listener to be added, not null
*/
public void addSucceededListener(SucceededListener listener) {
addListener(SucceededEvent.class, listener, UPLOAD_SUCCEEDED_METHOD);
* Adds a filename change event listener
*
* @param listener
- * the Listener to add
+ * the Listener to add, not null
*/
public void addChangeListener(ChangeListener listener) {
super.addListener(EventId.CHANGE, ChangeEvent.class, listener,
@Override
public boolean listenProgress() {
- return (progressListeners != null
- && !progressListeners.isEmpty());
+ return progressListeners != null
+ && !progressListeners.isEmpty();
}
@Override
import com.vaadin.ui.Calendar;
/**
- * Drop details for {@link com.vaadin.ui.addon.calendar.ui.Calendar Calendar}.
- * When something is dropped on the Calendar, this class contains the specific
- * details of the drop point. Specifically, this class gives access to the date
- * where the drop happened. If the Calendar was in weekly mode, the date also
- * includes the start time of the slot.
+ * Drop details for {@link Calendar}. When something is dropped on the Calendar,
+ * this class contains the specific details of the drop point. Specifically,
+ * this class gives access to the date where the drop happened. If the Calendar
+ * was in weekly mode, the date also includes the start time of the slot.
*
* @since 7.1
* @author Vaadin Ltd.
}
/**
- * @return the {@link com.vaadin.ui.addon.calendar.ui.Calendar Calendar}
- * instance which was the target of the drop
+ * @return the {@link Calendar} instance which was the target of the drop
*/
public Calendar getTargetCalendar() {
return (Calendar) getTarget();
/**
* Listeners attached to the container
*/
- private final List<EventSetChangeListener> eventSetChangeListeners = new LinkedList<CalendarEventProvider.EventSetChangeListener>();
- private final List<EventChangeListener> eventChangeListeners = new LinkedList<CalendarEvent.EventChangeListener>();
+ private final List<EventSetChangeListener> eventSetChangeListeners = new LinkedList<EventSetChangeListener>();
+ private final List<EventChangeListener> eventChangeListeners = new LinkedList<EventChangeListener>();
/**
* The event cache contains the events previously created by
return event;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
- * util.Date, java.util.Date)
- */
@Override
public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
eventCache.clear();
return Collections.unmodifiableList(eventCache);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.event.CalendarEventProvider.
- * EventSetChangeNotifier
- * #addListener(com.vaadin.addon.calendar.event.CalendarEventProvider.
- * EventSetChangeListener)
- */
@Override
public void addEventSetChangeListener(EventSetChangeListener listener) {
if (!eventSetChangeListeners.contains(listener)) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.event.CalendarEventProvider.
- * EventSetChangeNotifier
- * #removeListener(com.vaadin.addon.calendar.event.CalendarEventProvider.
- * EventSetChangeListener)
- */
@Override
public void removeEventSetChangeListener(EventSetChangeListener listener) {
eventSetChangeListeners.remove(listener);
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#
- * addListener
- * (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener)
- */
@Override
public void addEventChangeListener(EventChangeListener listener) {
if (eventChangeListeners.contains(listener)) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#
- * removeListener
- * (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener)
- */
@Override
public void removeEventChangeListener(EventChangeListener listener) {
eventChangeListeners.remove(listener);
return allDayProperty;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange
- * (com.vaadin.data.Container.ItemSetChangeEvent)
- */
@Override
public void containerItemSetChange(ItemSetChangeEvent event) {
if (event.getContainer() == container) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.data.Property.ValueChangeListener#valueChange(com.vaadin.data
- * .Property.ValueChangeEvent)
- */
@Override
public void valueChange(ValueChangeEvent event) {
/*
*/
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveHandler
- * #eventMove
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.MoveEvent)
- */
@Override
public void eventMove(MoveEvent event) {
CalendarEvent ce = event.getCalendarEvent();
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeHandler
- * #eventResize
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResize)
- */
@Override
public void eventResize(EventResize event) {
CalendarEvent ce = event.getCalendarEvent();
ignoreContainerEvents();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
- * (com.vaadin.addon.calendar.event.CalendarEvent)
- */
@Override
public void addEvent(CalendarEvent event) {
Item item;
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent
- * (com.vaadin.addon.calendar.event.CalendarEvent)
- */
@Override
public void removeEvent(CalendarEvent event) {
container.removeItem(event);
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float.parseFloat(
- event.getProperty().getValue().toString())) / 360f;
- float saturation = (Float
- .parseFloat(saturationSlider.getValue().toString()))
- / 100f;
- float value = (Float
- .parseFloat(valueSlider.getValue().toString()))
- / 100f;
+ float hue = Float.parseFloat(
+ event.getProperty().getValue().toString()) / 360f;
+ float saturation = Float.parseFloat(
+ saturationSlider.getValue().toString()) / 100f;
+ float value = Float.parseFloat(
+ valueSlider.getValue().toString()) / 100f;
// Set the color
Color color = new Color(
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float
- .parseFloat(hueSlider.getValue().toString()))
- / 360f;
- float saturation = (Float.parseFloat(
- event.getProperty().getValue().toString())) / 100f;
- float value = (Float
- .parseFloat(valueSlider.getValue().toString()))
- / 100f;
+ float hue = Float
+ .parseFloat(hueSlider.getValue().toString()) / 360f;
+ float saturation = Float.parseFloat(
+ event.getProperty().getValue().toString()) / 100f;
+ float value = Float.parseFloat(
+ valueSlider.getValue().toString()) / 100f;
Color color = new Color(
Color.HSVtoRGB(hue, saturation, value));
setColor(color);
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float
- .parseFloat(hueSlider.getValue().toString()))
- / 360f;
- float saturation = (Float
- .parseFloat(saturationSlider.getValue().toString()))
- / 100f;
- float value = (Float.parseFloat(
- event.getProperty().getValue().toString())) / 100f;
+ float hue = Float
+ .parseFloat(hueSlider.getValue().toString()) / 360f;
+ float saturation = Float.parseFloat(
+ saturationSlider.getValue().toString()) / 100f;
+ float value = Float.parseFloat(
+ event.getProperty().getValue().toString()) / 100f;
Color color = new Color(
Color.HSVtoRGB(hue, saturation, value));
@Override
public Color calculate(int x, int y) {
- float h = (x / 220f);
+ float h = x / 220f;
float s = 1f;
float v = 1f;
@Override
public Color calculate(int x, int y) {
- float saturation = 1f - (y / 220.0f);
- float value = (x / 220.0f);
+ float saturation = 1f - y / 220.0f;
+ float value = x / 220.0f;
float hue = Float.parseFloat(hueSlider.getValue().toString())
/ 360f;
* An interface for listening to {@link RendererClickEvent renderer click
* events}.
*
- * @see {@link ButtonRenderer#addClickListener(RendererClickListener)}
+ * @see ButtonRenderer#addClickListener(RendererClickListener)
*/
public interface RendererClickListener extends ConnectorEventListener {
* List of primitive classes. Google App Engine has problems
* serializing/deserializing these (#3064).
*/
- private static Class<?>[] primitiveClasses = new Class<?>[] { byte.class,
- short.class, int.class, long.class, float.class, double.class,
- boolean.class, char.class };
+ private static final Class<?>[] primitiveClasses = new Class<?>[] {
+ byte.class, short.class, int.class, long.class, float.class,
+ double.class, boolean.class, char.class };
/**
* Resolves the class given by {@code className}.
@Before
public void setup() {
- testObject = new NestedMethodPropertyTest.Address("some street", 123);
+ testObject = new Address("some street", 123);
}
@Test
container.refresh();
- assertThat(getItem(existingItemId).getItemProperty(NAME).toString(),
- is("foo"));
+ assertThat(getItem(existingItemId).getItemProperty(NAME).getValue()
+ .toString(), is("foo"));
}
@Test
EasyMock.expectLastCall().andReturn(connection);
System.setProperty("java.naming.factory.initial",
- "com.vaadin.data.util.sqlcontainer.connection.MockInitialContextFactory");
+ MockInitialContextFactory.class.getCanonicalName());
Context context = EasyMock.createMock(Context.class);
context.lookup("testDataSource");
EasyMock.expectLastCall().andReturn(ds);
@Test
public void generateSelectQuery_filtersAndOrderingSet_shouldSucceed() {
SQLGenerator sg = new DefaultSQLGenerator();
- List<com.vaadin.data.Container.Filter> f = new ArrayList<Filter>();
+ List<Filter> f = new ArrayList<Filter>();
f.add(new Like("name", "%lle"));
List<OrderBy> ob = Arrays.asList(new OrderBy("name", true));
StatementHelper sh = sg.generateSelectQuery("TABLE", f, ob, 0, 0, null);
@Override
public String convertToModel(Enum value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
if (value == null) {
return null;
}
@Override
public Enum convertToPresentation(String value,
Class<? extends Enum> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
if (value == null) {
return null;
}
@Override
public Integer convertToModel(String value,
Class<? extends Integer> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return 42;
}
@Override
public String convertToPresentation(Integer value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "42";
}
@Override
public String convertToModel(Enum value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
if (value == null) {
return null;
}
@Override
public Enum convertToPresentation(String value,
Class<? extends Enum> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
if (value == null) {
return null;
}
import com.vaadin.shared.ui.datefield.Resolution;
import com.vaadin.tests.design.DeclarativeTestBase;
-import com.vaadin.ui.DateField;
import com.vaadin.ui.PopupDateField;
/**
- * Tests the declarative support for implementations of {@link DateField}.
+ * Tests the declarative support for implementations of {@link PopupDateField}.
*
* @since 7.4
* @author Vaadin Ltd
BeanFieldGroup<MyBean> bfg = new BeanFieldGroup<MyBean>(MyBean.class);
bfg.setItemDataSource(bean);
- com.vaadin.ui.Field<?> helloField = bfg.buildAndBind("Hello string",
+ Field<?> helloField = bfg.buildAndBind("Hello string",
"nestedBean.hello");
assertEquals(bean.nestedBean.hello, helloField.getValue().toString());
}
private final File file = new File(FILE_NAME_BEFORE, FILE_SIZE_BEFORE);
@Before
- public void setup() throws SecurityException, NoSuchMethodException {
+ public void setup() throws SecurityException, NoSuchMethodException {
final BeanItem<Entry> folderItem = new BeanItem<Entry>(folder);
final BeanItem<Entry> childItem = new BeanItem<Entry>(file);
// Item with incomplete property set
fieldGroup.setItemDataSource(
grid.getContainerDataSource().getItem(folder));
- grid.getColumn(PROPERTY_NAME)
- .getEditorField(); // called in grid.doEditItem
+ grid.getColumn(PROPERTY_NAME).getEditorField(); // called in
+ // grid.doEditItem
assertTrue("Properties in item should be bound",
fieldGroup.getBoundPropertyIds().contains(PROPERTY_NAME));
assertFalse("Properties not present in item should not be bound",
testCancel(file, PROPERTY_SIZE, FILE_SIZE_BEFORE, FILE_SIZE_AFTER);
// Row with missing property
- testCancel(folder, PROPERTY_NAME, FOLDER_NAME_BEFORE, FOLDER_NAME_AFTER);
+ testCancel(folder, PROPERTY_NAME, FOLDER_NAME_BEFORE,
+ FOLDER_NAME_AFTER);
}
private void testCancel(Object itemId, String propertyId,
grid.doEditItem();
}
- private class TestContainer extends
- AbstractInMemoryContainer<Object, String, BeanItem> {
+ private class TestContainer
+ extends AbstractInMemoryContainer<Object, String, BeanItem> {
private final List<BeanItem<Entry>> items;
private final List<String> pids;
ValueChangeListener mockListener = createStrictMock(
ValueChangeListener.class);
// record
- mockListener.valueChange(
- anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
+ mockListener.valueChange(anyObject(ValueChangeEvent.class));
// test
underTest.addValueChangeListener(mockListener);
ValueChangeListener mockListener = createStrictMock(
ValueChangeListener.class);
// record
- mockListener.valueChange(
- anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
+ mockListener.valueChange(anyObject(ValueChangeEvent.class));
expect(mockProperty.getType()).andReturn(String.class).atLeastOnce();
expect(mockProperty.getValue()).andReturn("Any").atLeastOnce();
@Override
public String convertToModel(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "model";
}
@Override
public String convertToPresentation(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "presentation";
}
@Override
public BaseClass convertToModel(String value,
Class<? extends BaseClass> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return new BaseClass("model");
}
@Override
public String convertToPresentation(BaseClass value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return null;
}
});
@Override
public DerivedClass convertToModel(String value,
Class<? extends DerivedClass> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return new DerivedClass("derived" + 1001);
}
@Override
public String convertToPresentation(DerivedClass value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return null;
}
});
@Override
public Integer convertToModel(String value,
Class<? extends Integer> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return 11;
}
@Override
public String convertToPresentation(Integer value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "presentation";
}
@Override
public String convertToModel(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "model";
}
@Override
public String convertToPresentation(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "presentation";
}
@Override
public String convertToModel(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "model2";
}
@Override
public String convertToPresentation(String value,
Class<? extends String> targetType, Locale locale)
- throws com.vaadin.data.util.converter.Converter.ConversionException {
+ throws ConversionException {
return "presentation2";
}
public enum ColumnResizeMode {
/**
- * When column resize mode is set to Animated, columns
- * are resized as they are dragged.
+ * When column resize mode is set to Animated, columns are resized as they
+ * are dragged.
*/
ANIMATED,
/**
- * When column resize mode is set to Simple, dragging to resize
- * a column will show a marker, and the column will resize only
- * after the mouse button or touch is released.
+ * When column resize mode is set to Simple, dragging to resize a column
+ * will show a marker, and the column will resize only after the mouse
+ * button or touch is released.
*/
SIMPLE
/**
* Column resize mode in grid.
- *
+ *
* @since 7.7.5
*/
public ColumnResizeMode columnResizeMode = ColumnResizeMode.ANIMATED;