All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.uqbar.ui.jface.controller.NotEmptyObservable Maven / Gradle / Ivy

There is a newer version: 3.6.3
Show newest version
package org.uqbar.ui.jface.controller;

import java.util.Collection;

import org.eclipse.core.databinding.observable.Realm;

public class NotEmptyObservable extends SimpleJavaBeanObservable {

	public NotEmptyObservable(Object object, String propertyName) {
		super(Realm.getDefault(), object, getPropertyDescriptor(object.getClass(), propertyName));
	}

	@Override
	public Object doGetValue() {
		return !((Collection) super.doGetValue()).isEmpty();
	}

	@Override
	public Object getValueType() {
		return Boolean.TYPE;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy