X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph.swing%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fswing%2FLabelNode.java;h=1ddcf0cd82ca50c5fd29d7aa4a0ad05fab5adcf6;hb=4881fb88d55e80473a6f3117b0d0b8265a3b66b2;hp=df173b8f34092eed889e0bffa8eff61f28cbb564;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph.swing/src/org/simantics/scenegraph/swing/LabelNode.java b/bundles/org.simantics.scenegraph.swing/src/org/simantics/scenegraph/swing/LabelNode.java index df173b8f3..1ddcf0cd8 100644 --- a/bundles/org.simantics.scenegraph.swing/src/org/simantics/scenegraph/swing/LabelNode.java +++ b/bundles/org.simantics.scenegraph.swing/src/org/simantics/scenegraph/swing/LabelNode.java @@ -1,45 +1,45 @@ -/******************************************************************************* - * 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.swing; - -import javax.swing.JLabel; - -import org.simantics.scenegraph.ExportableWidget.OutputWidget; - -@OutputWidget("value") -public class LabelNode extends ComponentNode { - /** - * - */ - private static final long serialVersionUID = 7073028693751719102L; - - protected String value = ""; - - @Override - public void init() { - component = new JLabel(value); - super.init(); - } - - @SyncField("value") - public void setText(String value) { - this.value = value; - // RemoteViewer does not have component initialized - if (component != null) { - component.setText(value); - } - } - - public String getText() { - return value; - } -} +/******************************************************************************* + * 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.swing; + +import javax.swing.JLabel; + +import org.simantics.scenegraph.ExportableWidget.OutputWidget; + +@OutputWidget("value") +public class LabelNode extends ComponentNode { + /** + * + */ + private static final long serialVersionUID = 7073028693751719102L; + + protected String value = ""; + + @Override + public void init() { + component = new JLabel(value); + super.init(); + } + + @SyncField("value") + public void setText(String value) { + this.value = value; + // RemoteViewer does not have component initialized + if (component != null) { + component.setText(value); + } + } + + public String getText() { + return value; + } +}