X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Futils%2Fvariable%2FDynamicVariable.java;h=28a98fb832e5c21704ebe1467f12e449c1723910;hb=6c70e409e03187c96b057aa5705d49800c6b8b07;hp=c4beee796d87243ebfde69f280cfabf259786672;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/variable/DynamicVariable.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/variable/DynamicVariable.java index c4beee796..28a98fb83 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/variable/DynamicVariable.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/variable/DynamicVariable.java @@ -1,48 +1,48 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.scenegraph.utils.variable; - -/** - * A container for a single dynamic part of a dynamic-enabled variable of a - * scene graph node. Dynamic-enabled means a variable that potentially has two - * values: one static (~ default) and one dynamic. If the dynamic part has a - * non-null value it should always be used instead of the static value. Use - * {@link #getActiveValue()} to get the current variable value to follow this - * policy in your client code. - * - *

- * Variables generally determine the way a node gets rendered. - * - * @author Tuukka Lehtonen - * - * @param type of the contained field - */ -public class DynamicVariable { - - protected T dynamicValue; - - public T getDynamicValue() { - return dynamicValue; - } - - public void setDynamicValue(T dynamicValue) { - this.dynamicValue = dynamicValue; - } - - /** - * Resets the dynamic part of the variable to null. - */ - public void reset() { - setDynamicValue(null); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 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.scenegraph.utils.variable; + +/** + * A container for a single dynamic part of a dynamic-enabled variable of a + * scene graph node. Dynamic-enabled means a variable that potentially has two + * values: one static (~ default) and one dynamic. If the dynamic part has a + * non-null value it should always be used instead of the static value. Use + * {@link #getActiveValue()} to get the current variable value to follow this + * policy in your client code. + * + *

+ * Variables generally determine the way a node gets rendered. + * + * @author Tuukka Lehtonen + * + * @param type of the contained field + */ +public class DynamicVariable { + + protected T dynamicValue; + + public T getDynamicValue() { + return dynamicValue; + } + + public void setDynamicValue(T dynamicValue) { + this.dynamicValue = dynamicValue; + } + + /** + * Resets the dynamic part of the variable to null. + */ + public void reset() { + setDynamicValue(null); + } + +}