com.vaadin.shared.util.SharedUtil Java Examples
The following examples show how to use
com.vaadin.shared.util.SharedUtil.
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: SockJSPushConnection.java From vertx-vaadin with MIT License | 6 votes |
private void connect() { String baseUrl = connection.translateVaadinUri(url); String extraParams = UIConstants.UI_ID_PARAMETER + "=" + connection.getConfiguration().getUIId(); String pushId = connection.getMessageHandler().getPushId(); if (pushId != null) { extraParams += "&" + ApplicationConstants.PUSH_ID_PARAMETER + "=" + pushId; } // uri is needed to identify the right connection when closing uri = SharedUtil.addGetParameters(baseUrl, extraParams); getLogger().info("Establishing push connection"); socket = doConnect(uri, getConfig()); }
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: 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 #4
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 #5
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); }
Example #6
Source File: AbstractElementCollection.java From viritin with Apache License 2.0 | 5 votes |
protected String getPropertyHeader(String propertyName) { String header = propertyToHeader.get(propertyName); if (header == null) { header = SharedUtil.propertyIdToHumanFriendly(propertyName); } return header; }
Example #7
Source File: StringGenerator.java From vaadin-combobox-multiselect with Apache License 2.0 | 4 votes |
String nextString(boolean capitalize) { if (++this.stringCount >= strings.length) { this.stringCount = 0; } return capitalize ? SharedUtil.capitalize(strings[this.stringCount]) : strings[this.stringCount]; }
Example #8
Source File: StringGenerator.java From vaadin-combobox-multiselect with Apache License 2.0 | 4 votes |
String nextString(boolean capitalize) { if (++this.stringCount >= strings.length) { this.stringCount = 0; } return capitalize ? SharedUtil.capitalize(strings[this.stringCount]) : strings[this.stringCount]; }