X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Fquery%2FChartAndSubscriptionItemData.java;fp=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Fquery%2FChartAndSubscriptionItemData.java;h=f022dcce0591438d90b6679f1a103d49451635ad;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/query/ChartAndSubscriptionItemData.java b/bundles/org.simantics.charts/src/org/simantics/charts/query/ChartAndSubscriptionItemData.java new file mode 100644 index 000000000..f022dcce0 --- /dev/null +++ b/bundles/org.simantics.charts/src/org/simantics/charts/query/ChartAndSubscriptionItemData.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 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.charts.query; + +import org.simantics.charts.ui.ChartAndSubscriptionItemDialog; +import org.simantics.databoard.annotations.Optional; +import org.simantics.databoard.util.Bean; +import org.simantics.trend.configuration.Scale; +import org.simantics.trend.configuration.TrendItem.DrawMode; + +/** + * This class wraps Chart Item and referenced Subscription Item data. + * + * @author toni.kalajainen + */ +public class ChartAndSubscriptionItemData extends Bean { + + // Input + public int index; + @Optional public String chartName; + @Optional public String variableReference; + @Optional public String label; + @Optional public String[] subscriptions; + + public boolean binaryMode; + public boolean hasSubscriptionItem; + + /** + * Workaround: there's currently no proper support for modifying the following attributes + * + * on the fly so by default we simply do not allow it. Set this to + * true before opening {@link ChartAndSubscriptionItemDialog} + * to allow the user to edit the listed values. + */ + public boolean mutableCollectionSettings = false; + + // Output + @Optional public String subscription = "Default"; + @Optional public String unit = ""; + @Optional public Double min, max, deadband, interval, gain, bias; + @Optional public DrawMode drawmode; + @Optional public Scale scale; + + @Optional public Float strokeWidth; + @Optional public float[] color; + +}