当前位置: 首页>>代码示例>>Java>>正文


Java SharedUtil.equals方法代码示例

本文整理汇总了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);
}
 
开发者ID:bonprix,项目名称:vaadin-combobox-multiselect,代码行数:20,代码来源:VComboBoxMultiselect.java

示例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;
}
 
开发者ID:metasfresh,项目名称:metasfresh-procurement-webui,代码行数:17,代码来源:TextOverlay.java

示例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);
	}
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:15,代码来源:AbstractViewComponent.java

示例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);
}
 
开发者ID:blackbluegl,项目名称:calendar-component,代码行数:40,代码来源:CalendarConnector.java

示例5: setSource

import com.vaadin.shared.util.SharedUtil; //导入方法依赖的package包/类
@Override
public void setSource(Resource resource) {
    if (SharedUtil.equals(this.resource, resource)) {
        return;
    }
    updateValue(resource);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:WebAbstractResourceView.java

示例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();
        }
    }
}
 
开发者ID:maxschuster,项目名称:Vaadin-SignatureField,代码行数:15,代码来源:SignatureFieldExtension.java

示例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();
   }

}
 
开发者ID:vkazhdan,项目名称:vaadin-crichtextarea,代码行数:59,代码来源:CRichTextAreaConnector.java


注:本文中的com.vaadin.shared.util.SharedUtil.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。