Java Code Examples for com.vaadin.shared.util.SharedUtil#equals()
The following examples show how to use
com.vaadin.shared.util.SharedUtil#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 6 votes |
@Override public boolean equals(Object obj) { if (!(obj instanceof ComboBoxMultiselectSuggestion)) { return false; } ComboBoxMultiselectSuggestion other = (ComboBoxMultiselectSuggestion) obj; if (this.key == null && other.key != null || this.key != null && !this.key.equals(other.key)) { return false; } if (this.caption == null && other.caption != null || this.caption != null && !this.caption.equals(other.caption)) { return false; } if (!SharedUtil.equals(this.untranslatedIconUri, other.untranslatedIconUri)) { return false; } return SharedUtil.equals(this.style, other.style); }
Example 2
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 6 votes |
@Override public boolean equals(Object obj) { if (!(obj instanceof ComboBoxMultiselectSuggestion)) { return false; } ComboBoxMultiselectSuggestion other = (ComboBoxMultiselectSuggestion) obj; if (this.key == null && other.key != null || this.key != null && !this.key.equals(other.key)) { return false; } if (this.caption == null && other.caption != null || this.caption != null && !this.caption.equals(other.caption)) { return false; } if (!SharedUtil.equals(this.untranslatedIconUri, other.untranslatedIconUri)) { return false; } return SharedUtil.equals(this.style, other.style); }
Example 3
Source File: CalendarConnector.java From calendar-component with Apache License 2.0 | 5 votes |
@Override public void onStateChanged(StateChangeEvent stateChangeEvent) { super.onStateChanged(stateChangeEvent); CalendarState state = getState(); VCalendar widget = getWidget(); // Enable or disable the forward and backward navigation buttons widget.setForwardNavigationEnabled(hasEventListener(CalendarEventId.FORWARD)); widget.setBackwardNavigationEnabled(hasEventListener(CalendarEventId.BACKWARD)); widget.set24HFormat(state.format24H); widget.setDayNames(state.dayNames); widget.setMonthNames(state.monthNames); widget.setFirstDayNumber(state.firstVisibleDayOfWeek); widget.setLastDayNumber(state.lastVisibleDayOfWeek); widget.setFirstHourOfTheDay(state.firstHourOfDay); widget.setLastHourOfTheDay(state.lastHourOfDay); widget.setDisabled(!state.enabled); widget.setRangeSelectAllowed(hasEventListener(CalendarEventId.RANGESELECT)); widget.setRangeMoveAllowed(hasEventListener(CalendarEventId.ITEM_MOVE)); widget.setItemMoveAllowed(hasEventListener(CalendarEventId.ITEM_MOVE)); widget.setItemResizeAllowed(hasEventListener(CalendarEventId.ITEM_RESIZE)); widget.setItemCaptionAsHtml(state.itemCaptionAsHtml); CalendarState.ItemSortOrder oldOrder = getWidget().getSortOrder(); if (!SharedUtil.equals(oldOrder, getState().itemSortOrder)) { getWidget().setSortOrder(getState().itemSortOrder); } updateView(); updateSizes(); registerEventToolTips(state.items); updateActionMap(state.actions); }
Example 4
Source File: WebAbstractResourceView.java From cuba with Apache License 2.0 | 5 votes |
@Override public void setSource(Resource resource) { if (SharedUtil.equals(this.resource, resource)) { return; } updateValue(resource); }