Example usage for com.vaadin.shared.util SharedUtil equals

List of usage examples for com.vaadin.shared.util SharedUtil equals

Introduction

In this page you can find the example usage for com.vaadin.shared.util SharedUtil equals.

Prototype

public static boolean equals(Object o1, Object o2) 

Source Link

Document

Checks if a and b are equals using #equals(Object) .

Usage

From source file:com.example.test.client.VMultiSelectCalendarWidget.java

License:Apache License

public void setMonth(Date month) {
    if (!SharedUtil.equals(displayedMonth, month)) {
        rangeStart = new Date(month.getYear(), month.getMonth(), month.getDate());
        rangeEnd = new Date(month.getYear(), month.getMonth(), DateTimeService.getNumberOfDaysInMonth(month));
        displayedMonth = month;//  w  ww  .  java  2s.co  m
        if (initialRenderDone) {
            renderCalendar();
        }
    }
}

From source file:com.haulmont.cuba.web.gui.components.WebAbstractResourceView.java

License:Apache License

@Override
public void setSource(Resource resource) {
    if (SharedUtil.equals(this.resource, resource)) {
        return;/*from   w w w . ja v  a  2 s.  c o  m*/
    }
    updateValue(resource);
}

From source file:de.metas.procurement.webui.widgetset.TextOverlay.java

License:Open Source License

private final void updateTextFromDataSource() {
    if (dataSource == null) {
        return;//from  w w  w.  ja  va2  s  .c om
    }

    // Update the internal value from the data source
    final String newValue = getDataSourceValue();
    if (SharedUtil.equals(newValue, getState(false).text)) {
        return;
    }

    getState().text = newValue;
}

From source file:org.vaadin.addons.tuningdatefield.TuningDateField.java

License:Apache License

/**
 * @param dateTimeFormatterPattern/* w  w w . java2 s  . c  o m*/
 *            the dateTimeFormatterPattern to set
 */
public void setDateTimeFormatterPattern(final String dateTimeFormatterPattern) {
    // When changing formatter pattern we need to reconvert textfield value
    Object convertedValue = getConvertedValue();
    this.dateTimeFormatterPattern = dateTimeFormatterPattern;
    String newinternalValue = getConverter().convertToPresentation(convertedValue, String.class, getLocale());
    if (!SharedUtil.equals(getInternalValue(), newinternalValue)) {
        setConvertedValue(convertedValue);
    }
}