33 lines
869 B
Java
33 lines
869 B
Java
package flintstones.domain.numeric.real;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
import org.eclipse.e4.core.services.nls.Translation;
|
|
|
|
import flintstones.domain.numeric.NumericDomain;
|
|
import flintstones.domain.numeric.real.messages.Messages;
|
|
import flintstones.helper.data.wxml.WNode;
|
|
|
|
@SuppressWarnings("javadoc")
|
|
public class NumericRealDomain extends NumericDomain {
|
|
|
|
@Inject
|
|
@Translation
|
|
private Messages messages;
|
|
|
|
public static final String ID = "flintstones.domain.numeric.real"; //$NON-NLS-1$
|
|
|
|
@Override
|
|
public void read(WNode node) {
|
|
this.inRange = Boolean.parseBoolean(node.getAttribute(NumericDomain.Fields.inRange));
|
|
if (!this.inRange) {
|
|
this.min = 0.0d;
|
|
this.max = 0.0d;
|
|
} else {
|
|
this.min = Double.parseDouble(node.getAttribute(NumericDomain.Fields.min));
|
|
this.max = Double.parseDouble(node.getAttribute(NumericDomain.Fields.max));
|
|
}
|
|
}
|
|
|
|
}
|