本文整理汇总了Java中com.vaadin.shared.util.SharedUtil.equals方法的典型用法代码示例。如果您正苦于以下问题:Java SharedUtil.equals方法的具体用法?Java SharedUtil.equals怎么用?Java SharedUtil.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.shared.util.SharedUtil
的用法示例。
在下文中一共展示了SharedUtil.equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
@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);
}
示例2: updateTextFromDataSource
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
private final void updateTextFromDataSource()
{
if (dataSource == null)
{
return;
}
// Update the internal value from the data source
final String newValue = getDataSourceValue();
if (SharedUtil.equals(newValue, getState(false).text))
{
return;
}
getState().text = newValue;
}
示例3: updateValueFromDataSource
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
/**
* Update component value using data source value
*/
private void updateValueFromDataSource() {
// Update the internal value from the data source
T newConvertedValue = getDataSourceValue();
if (!SharedUtil.equals(newConvertedValue, value)) {
value = newConvertedValue;
// update internal component
updateValue(value);
// fire value change
fireValueChange(value);
}
}
示例4: onStateChanged
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
@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);
}
示例5: setSource
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
@Override
public void setSource(Resource resource) {
if (SharedUtil.equals(this.resource, resource)) {
return;
}
updateValue(resource);
}
示例6: setSignature
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
/**
* Set signature current signature value.
* @param signature Signature
* @param repaintIsNotNeeded Repaint is not needed
*/
public void setSignature(String signature, boolean repaintIsNotNeeded) {
String oldSignature = this.signature;
if (!SharedUtil.equals(oldSignature, signature)) {
this.signature = signature;
if (!repaintIsNotNeeded) {
updateSignature();
}
}
}
示例7: updateFromUIDL
import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
@Override
public void updateFromUIDL(final UIDL uidl, ApplicationConnection client) {
getWidget().client = client;
getWidget().id = uidl.getId();
if (uidl.hasAttribute("fontName")) {
RichTextArea.FontSize fontSize = null;
if (uidl.hasAttribute("fontSize")) {
int fontSizeValue = uidl.getIntAttribute("fontSize");
for (RichTextArea.FontSize fontSizesConstant : fontSizesConstants) {
if (fontSizesConstant.getNumber() == fontSizeValue) {
fontSize = fontSizesConstant;
}
}
}
getWidget().setFont(uidl.getStringAttribute("fontName"), fontSize);
}
if (uidl.hasAttribute("insertHtml")) {
getWidget().insertHtml(uidl.getStringAttribute("insertHtml"));
}
if (uidl.hasVariable("text")) {
String newValue = uidl.getStringVariable("text");
if (!SharedUtil.equals(newValue, cachedValue)) {
getWidget().setValue(newValue);
cachedValue = newValue;
}
}
if (!isRealUpdate(uidl)) {
return;
}
getWidget().setEnabled(isEnabled());
getWidget().setReadOnly(isReadOnly());
getWidget().immediate = getState().immediate;
int newMaxLength = uidl.hasAttribute("maxLength") ? uidl
.getIntAttribute("maxLength") : -1;
if (newMaxLength >= 0) {
if (getWidget().maxLength == -1) {
getWidget().keyPressHandler = getWidget().rta
.addKeyPressHandler(getWidget());
}
getWidget().maxLength = newMaxLength;
} else if (getWidget().maxLength != -1) {
getWidget().getElement().setAttribute("maxlength", "");
getWidget().maxLength = -1;
getWidget().keyPressHandler.removeHandler();
}
if (uidl.hasAttribute("selectAll")) {
getWidget().selectAll();
}
}