/* * Copyright (c) 2012 Diamond Light Source Ltd. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package uk.ac.diamond.scisoft.analysis.processing.operations; import org.eclipse.dawnsci.analysis.api.processing.model.AbstractOperationModel; import org.eclipse.dawnsci.analysis.api.processing.model.OperationModelField; import org.eclipse.dawnsci.analysis.api.roi.IROI; public class IntegrationModel extends AbstractOperationModel { @OperationModelField(hint="Define the region of interest", label = "Region of Interest") protected IROI region; public IROI getRegion() { return region; } public void setRegion(IROI region) { firePropertyChange("region", this.region, this.region = region); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((region == null) ? 0 : region.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; IntegrationModel other = (IntegrationModel) obj; if (region == null) { if (other.region != null) return false; } else if (!region.equals(other.region)) return false; return true; } }