X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fbinding%2FNumberBinding.java;h=3d001b0598c971c12de978f6f12417a2d6e02c5c;hb=a1696e5257fae039410c924155fdeffc1ce1b3e9;hp=e5cf14e20e907ac7ce4df2539a4c4c2ad3426c56;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/NumberBinding.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/NumberBinding.java index e5cf14e20..3d001b059 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/NumberBinding.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/NumberBinding.java @@ -1,24 +1,24 @@ -/******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in - * Industry THTH ry. - * 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 - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 2010 Association for Decentralized Information Management in + * Industry THTH ry. + * 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 + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.databoard.binding; -import java.util.Set; - -import org.simantics.databoard.accessor.reference.ChildReference; -import org.simantics.databoard.binding.error.BindingException; -import org.simantics.databoard.binding.error.RuntimeBindingException; -import org.simantics.databoard.binding.impl.BindingPrintContext; -import org.simantics.databoard.type.NumberType; -import org.simantics.databoard.util.Range; +import java.util.Set; + +import org.simantics.databoard.accessor.reference.ChildReference; +import org.simantics.databoard.binding.error.BindingException; +import org.simantics.databoard.binding.error.RuntimeBindingException; +import org.simantics.databoard.binding.impl.BindingPrintContext; +import org.simantics.databoard.type.NumberType; +import org.simantics.databoard.util.Range; /** * Super class for number types. @@ -105,35 +105,35 @@ public abstract class NumberBinding extends Binding { } catch (BindingException e) { return new RuntimeBindingException(e); } - } - - @Override - protected void toString(Object value, BindingPrintContext ctx) throws BindingException { - ctx.b.append(getValue(value).toString()); - } - - @Override - public void readFrom(Binding srcBinding, Object src, Object dst) - throws BindingException { - Number v = ((NumberBinding)srcBinding).getValue(src); - setValue(dst, v); - } - - @Override - public Binding getComponentBinding(ChildReference path) { - if (path==null) return this; - throw new IllegalArgumentException(); - } + } + + @Override + protected void toString(Object value, BindingPrintContext ctx) throws BindingException { + ctx.b.append(getValue(value).toString()); + } + + @Override + public void readFrom(Binding srcBinding, Object src, Object dst) + throws BindingException { + Number v = ((NumberBinding)srcBinding).getValue(src); + setValue(dst, v); + } + + @Override + public Binding getComponentBinding(ChildReference path) { + if (path==null) return this; + throw new IllegalArgumentException(); + } + + @Override + public int getComponentCount() { + return 0; + } - @Override - public int getComponentCount() { - return 0; - } - - @Override - public Binding getComponentBinding(int index) { - throw new IllegalArgumentException(); - } + @Override + public Binding getComponentBinding(int index) { + throw new IllegalArgumentException(); + } }