Commit b7cb46b7 authored by Locatelli's avatar Locatelli
Browse files

Add multiple y axis

parent 3adc3424
......@@ -23,6 +23,7 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
......
......@@ -55,10 +55,10 @@ SYSTEMVERSION=`uname -a | grep x86_64`
if [ -n "$SYSTEMVERSION" ]
then
# 64 bits, we set the variable SWT_GTK3 here so that we can change it
java $args -DSWT_GTK3=0 -Djava.library.path=lib64/gtk:lib64/common/calculator:/usr/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/jni -Djava.util.logging.config.file=conf/client/logging.properties -jar lib64/nomadgui-gtk.linux.x86_64.jar $1 2> $TEMP_FILE 1>&2
java $args -DSWT_GTK3=1 -Djava.library.path=lib64/gtk:lib64/common/calculator:/usr/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/jni -Djava.util.logging.config.file=conf/client/logging.properties -jar lib64/nomadgui-gtk.linux.x86_64.jar $1 2> $TEMP_FILE 1>&2
else
# 32 bits
java $args -DSWT_GTK3=0 -Djava.library.path=lib/gtk:lib/common/calculator:/usr/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/jni -Djava.util.logging.config.file=conf/client/logging.properties -jar lib/nomadgui-gtk.linux.x86.jar $1 2> $TEMP_FILE 1>&2
java $args -DSWT_GTK3=1 -Djava.library.path=lib/gtk:lib/common/calculator:/usr/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/jni -Djava.util.logging.config.file=conf/client/logging.properties -jar lib/nomadgui-gtk.linux.x86.jar $1 2> $TEMP_FILE 1>&2
fi
STATUS=$?
......
......@@ -78,6 +78,7 @@ cscan,5,command
flqscan,5,command
flscan,3,command
flsscan,4,command
vana,4,command
for,3,keyword
endfor,6,keyword
break,5,keyword
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadgui</artifactId>
<version>4.0.132</version>
<version>4.0.133</version>
<name>NomadGUI</name>
<description>Graphical user interface for Nomad</description>
<scm>
......@@ -64,7 +64,7 @@
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>${swt.artifactId}</artifactId>
<version>4.5</version>
<version>4.21</version>
</dependency>
</dependencies>
</profile>
......@@ -140,7 +140,7 @@
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadcommandsystem</artifactId>
<version>4.0.51</version>
<version>4.0.52</version>
</dependency>
<dependency> <!-- For CollectionUtils -->
<groupId>org.apache.commons</groupId>
......
......@@ -142,6 +142,7 @@ public class ControllerViewParser extends GenericParser {
private final static String ATTRIBUTE_DISPLAY_PROGRESSION = "displayProgression";
private final static String ATTRIBUTE_SPACING = "spacing";
private final static String ATTRIBUTE_MARGIN = "margin";
private final static String ATTRIBUTE_MULTIPLEYAXIS = "multiple_y_axis";
public final static String ATTRIBUTE_TITLE_PROPERTY = "titleProperty";
public final static String ATTRIBUTE_X_AXIS_TITLE_PROPERTY = "xAxisTitleProperty";
......@@ -429,8 +430,15 @@ public class ControllerViewParser extends GenericParser {
widgetDescriptor.setTitleProperty(getAttribute(attributes, ATTRIBUTE_TITLE_PROPERTY));
widgetDescriptor.setXAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_X_AXIS_TITLE_PROPERTY));
widgetDescriptor.setYAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_Y_AXIS_TITLE_PROPERTY));
if (attributeIsPresent(attributes, ATTRIBUTE_MULTIPLEYAXIS)) {
try {
widgetDescriptor.setMultipleYAxis(Boolean.valueOf(getAttribute(attributes, ATTRIBUTE_MULTIPLEYAXIS)));
} catch (ClassCastException e) {
widgetDescriptor.setMultipleYAxis(false);
}
}
setWidgetAttributes(attributes);
} else if (qName.equals(TAG_PLOT_LAUNCHER)) {
widgetDescriptor = new WidgetDescriptor(TAG_PLOT_LAUNCHER);
widgetDescriptor.setHeight(getAttribute(attributes, ATTRIBUTE_HEIGHT));
......@@ -439,8 +447,15 @@ public class ControllerViewParser extends GenericParser {
widgetDescriptor.setTitleProperty(getAttribute(attributes, ATTRIBUTE_TITLE_PROPERTY));
widgetDescriptor.setXAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_X_AXIS_TITLE_PROPERTY));
widgetDescriptor.setYAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_Y_AXIS_TITLE_PROPERTY));
if (attributeIsPresent(attributes, ATTRIBUTE_MULTIPLEYAXIS)) {
try {
widgetDescriptor.setMultipleYAxis(Boolean.valueOf(getAttribute(attributes, ATTRIBUTE_MULTIPLEYAXIS)));
} catch (ClassCastException e) {
widgetDescriptor.setMultipleYAxis(false);
}
}
setWidgetAttributes(attributes);
} else if (qName.equals(TAG_DYNAMIC_PLOT)) {
widgetDescriptor = new WidgetDescriptor(TAG_DYNAMIC_PLOT);
widgetDescriptor.setHeight(getAttribute(attributes, ATTRIBUTE_HEIGHT));
......@@ -450,8 +465,15 @@ public class ControllerViewParser extends GenericParser {
widgetDescriptor.setTitleProperty(getAttribute(attributes, ATTRIBUTE_TITLE_PROPERTY));
widgetDescriptor.setXAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_X_AXIS_TITLE_PROPERTY));
widgetDescriptor.setYAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_Y_AXIS_TITLE_PROPERTY));
if (attributeIsPresent(attributes, ATTRIBUTE_MULTIPLEYAXIS)) {
try {
widgetDescriptor.setMultipleYAxis(Boolean.valueOf(getAttribute(attributes, ATTRIBUTE_MULTIPLEYAXIS)));
} catch (ClassCastException e) {
widgetDescriptor.setMultipleYAxis(false);
}
}
setWidgetAttributes(attributes);
} else if (qName.equals(TAG_DYNAMIC_PLOT_LAUNCHER)) {
widgetDescriptor = new WidgetDescriptor(TAG_DYNAMIC_PLOT_LAUNCHER);
widgetDescriptor.setHeight(getAttribute(attributes, ATTRIBUTE_HEIGHT));
......@@ -460,6 +482,13 @@ public class ControllerViewParser extends GenericParser {
widgetDescriptor.setTitleProperty(getAttribute(attributes, ATTRIBUTE_TITLE_PROPERTY));
widgetDescriptor.setXAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_X_AXIS_TITLE_PROPERTY));
widgetDescriptor.setYAxisTitleProperty(getAttribute(attributes, ATTRIBUTE_Y_AXIS_TITLE_PROPERTY));
if (attributeIsPresent(attributes, ATTRIBUTE_MULTIPLEYAXIS)) {
try {
widgetDescriptor.setMultipleYAxis(Boolean.valueOf(getAttribute(attributes, ATTRIBUTE_MULTIPLEYAXIS)));
} catch (ClassCastException e) {
widgetDescriptor.setMultipleYAxis(false);
}
}
setWidgetAttributes(attributes);
} else if (qName.equals(TAG_IMAGE_BUTTON)) {
......
......@@ -32,6 +32,7 @@ public class PlotDataDescriptor {
private boolean use_errorbar = false;
private boolean use_rgb = false;
private boolean multiple_y_axis = false;
private String lineSymbolType = "none";
......@@ -114,6 +115,16 @@ public class PlotDataDescriptor {
public boolean getUseRGB() {
return use_rgb;
}
public void setMultipleYAxis(String flag) {
if (flag.contains("true")) {
multiple_y_axis = true;
}
}
public boolean getMultipleYAxis() {
return multiple_y_axis;
}
public String getLineSymbolType() {
return lineSymbolType;
......
......@@ -92,6 +92,8 @@ public class WidgetDescriptor extends AbstractDescriptor {
// For file_text widget
private boolean changeDirectory = false;
private String startingDirectory = "";
private boolean multipleYAxis = false;
public WidgetDescriptor(String type) {
......@@ -668,6 +670,14 @@ public class WidgetDescriptor extends AbstractDescriptor {
return synchro;
}
public void setMultipleYAxis(Boolean multipleYAxis) {
this.multipleYAxis = multipleYAxis;
}
public boolean isMultipleYAxis() {
return multipleYAxis;
}
public void setSelectorType(String selectorType) {
this.selectorType = selectorType;
}
......
......@@ -36,11 +36,12 @@ public abstract class PlotData {
private boolean use_errorbar;
private boolean use_rgb;
private boolean multiple_y_axis;
private boolean plotDataSelectedInLegend;
private String lineSymbolType = "none";
public PlotData(String key, String plotLegendKey, int red, int green, int blue, boolean use_errorbar, String lineSymbolType, boolean use_rgb) {
public PlotData(String key, String plotLegendKey, int red, int green, int blue, boolean use_errorbar, String lineSymbolType, boolean use_rgb, boolean multiple_y_axis) {
this.key = key;
if (plotLegendKey != null) {
this.plotLegend = ConfigManager.getInstance().getString(plotLegendKey);
......@@ -51,6 +52,7 @@ public abstract class PlotData {
this.use_errorbar = use_errorbar;
this.lineSymbolType = lineSymbolType;
this.use_rgb = use_rgb;
this.multiple_y_axis = multiple_y_axis;
}
/**
......@@ -84,6 +86,14 @@ public abstract class PlotData {
this.use_rgb= useRGB;
}
public boolean getMultipleYAxis() {
return multiple_y_axis;
}
public void setMultipleYAxis(boolean multiple_y_axis) {
this.multiple_y_axis= multiple_y_axis;
}
public boolean getUseRGB() {
return use_rgb;
}
......
......@@ -55,7 +55,7 @@ public class PlotyManager {
PlotyInstance.getInstance().closePlots();
}
public void plot(String plotkey, List<PlotData> plotDatas, String windowTitle, String plotTitle, String xAxisTitle, String yAxisTitle, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty) {
public void plot(String plotkey, List<PlotData> plotDatas, String windowTitle, String plotTitle, String xAxisTitle, String yAxisTitle, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, boolean multipleYAxis) {
List<String> key = new ArrayList<String>();
List<String> legend_key = new ArrayList<String>();
......@@ -208,7 +208,7 @@ public class PlotyManager {
roiSelectedX0_prop_name, roiSelectedY0_prop_name, roiSelectedX1_prop_name, roiSelectedY1_prop_name,
roiCommandAdd_prop_name, roiCommandValidate_prop_name, roiCommandRaz_prop_name,
countActivated_prop_name, RemoteControlManager.getInstance().getRemoteControlState(),
TokenManager.getInstance().tokenIsFree(), TokenManager.getInstance().tokenIsOwnedByMe(), useRgbs);
TokenManager.getInstance().tokenIsFree(), TokenManager.getInstance().tokenIsOwnedByMe(), useRgbs, multipleYAxis);
}
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ public class ProjectionPlotData extends PlotData {
* @param isXProjection
*/
public ProjectionPlotData(String key, int red, int green, int blue, PropertyPlotData plotData, boolean isXProjection) {
super(key, "", red, green, blue, false, "", false);
super(key, "", red, green, blue, false, "", false, false);
this.plotData = plotData;
this.isXProjection = isXProjection;
updateProjections();
......
......@@ -104,7 +104,7 @@ public class PropertyPlotData extends PlotData implements IPropertyChangeListene
private double aspectRatio = 1.0;
public PropertyPlotData(PlotDataDescriptor plotDataDescriptor) {
super(plotDataDescriptor.getKey(), plotDataDescriptor.getLegendKey(), plotDataDescriptor.getRed(), plotDataDescriptor.getGreen(), plotDataDescriptor.getBlue(), plotDataDescriptor.getUseErrorBar(), plotDataDescriptor.getLineSymbolType(), plotDataDescriptor.getUseRGB());
super(plotDataDescriptor.getKey(), plotDataDescriptor.getLegendKey(), plotDataDescriptor.getRed(), plotDataDescriptor.getGreen(), plotDataDescriptor.getBlue(), plotDataDescriptor.getUseErrorBar(), plotDataDescriptor.getLineSymbolType(), plotDataDescriptor.getUseRGB(), plotDataDescriptor.getMultipleYAxis());
this.plotDataState = new SimplePlotDataState();
}
......
......@@ -41,7 +41,7 @@ public class SurveyPlotData extends PlotData {
private SurveyPlotDataState state;
public SurveyPlotData(String key, String plotLegendKey, int red, int green, int blue, String lineSymbolType, Int32Array dataX, Float64Array dataY, SurveyWindow surveyWindow, String controllerName) {
super(key, plotLegendKey, red, green, blue, false, lineSymbolType, false);
super(key, plotLegendKey, red, green, blue, false, lineSymbolType, false, false);
this.dataX = dataX;
this.dataY = dataY;
this.state = new SurveyUnselectedPlotDataState(this);
......
......@@ -121,11 +121,11 @@ public abstract class PWidgetFactory {
public abstract PlotWidget createPlotWidget(PContainer parent, List plotDatas, String title, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty);
public abstract PlotLauncherImageButton createPlotLauncherImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty);
public abstract PlotLauncherImageButton createPlotLauncherImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis);
public abstract PlotLauncher createPlotLauncherButton(PContainer parent, int height, List<PlotData> plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty);
public abstract PlotLauncher createPlotLauncherButton(PContainer parent, int height, List<PlotData> plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis);
public abstract PlotLauncherExternImageButton createPlotLauncherExternImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty);
public abstract PlotLauncherExternImageButton createPlotLauncherExternImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis);
public abstract CButton createCButton(ControllerPlugin controllerPlugin, PContainer parent, CommandAction commandAction, WidgetDescriptor widgetDescriptor);
......
......@@ -717,23 +717,23 @@ public class SWTPWidgetFactory extends PWidgetFactory {
}
public PlotLauncherImageButton createPlotLauncherImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty) {
public PlotLauncherImageButton createPlotLauncherImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
if (height == 0) {
height = ConfigManager.getInstance().getInt("defaultPlotImageHeight");
}
return new SWTPlotLauncherImageButton(parent, height, plotDatas, title, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
return new SWTPlotLauncherImageButton(parent, height, plotDatas, title, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, multipleYAxis);
}
public PlotLauncherExternImageButton createPlotLauncherExternImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty) {
public PlotLauncherExternImageButton createPlotLauncherExternImageButton(PContainer parent, List<PlotData> plotDatas, String title, int width, int height, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
if (height == 0) {
height = ConfigManager.getInstance().getInt("defaultPlotImageHeight");
}
return new SWTPlotLauncherExternImageButton(parent, height, plotDatas, title, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
return new SWTPlotLauncherExternImageButton(parent, height, plotDatas, title, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, multipleYAxis);
}
public PlotLauncherButton createPlotLauncherButton(PContainer parent, int height, List plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty) {
public PlotLauncherButton createPlotLauncherButton(PContainer parent, int height, List plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
Composite composite = ((SWTPContainer) parent).getComposite();
return new SWTPlotLauncherButton(convertToPContainer(composite), height, plotDatas, titleKey, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
return new SWTPlotLauncherButton(convertToPContainer(composite), height, plotDatas, titleKey, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, multipleYAxis);
}
public NomadWindow createNomadWindow(String windowTitle) {
......
......@@ -1079,10 +1079,10 @@ public abstract class ControllerPluginPeer extends PluginPeer {
if (plotDatas != null) {
Property numorProperty = controllerPlugin.getNumorProperty();
if (ConfigManager.getInstance().getPlotyVersion() == 1) {
widget = PWidgetFactory.getInstance().createPlotLauncherImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
widget = PWidgetFactory.getInstance().createPlotLauncherImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, widgetDescriptor.isMultipleYAxis());
}
else if (ConfigManager.getInstance().getPlotyVersion() == 2) {
widget = PWidgetFactory.getInstance().createPlotLauncherExternImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
widget = PWidgetFactory.getInstance().createPlotLauncherExternImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, widgetDescriptor.isMultipleYAxis());
}
if (plotWidgets == null) {
plotWidgets = new ArrayList<NomadWidget>();
......@@ -1100,7 +1100,7 @@ public abstract class ControllerPluginPeer extends PluginPeer {
numorProperty.setAutoApply();
}
widget = PWidgetFactory.getInstance().createPlotLauncherButton(pContainer, widgetDescriptor.getHeight(), plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
widget = PWidgetFactory.getInstance().createPlotLauncherButton(pContainer, widgetDescriptor.getHeight(), plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, widgetDescriptor.isMultipleYAxis());
}
} else if (widgetDescriptor.getType().equals(ControllerViewParser.TAG_DYNAMIC_PLOT)) {
......@@ -1114,7 +1114,7 @@ public abstract class ControllerPluginPeer extends PluginPeer {
}
}
if (found ==false) {
widget = PWidgetFactory.getInstance().createPlotLauncherExternImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
widget = PWidgetFactory.getInstance().createPlotLauncherExternImageButton(pContainer, plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getWidth(), widgetDescriptor.getHeight(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, widgetDescriptor.isMultipleYAxis());
if (plotWidgets == null) {
plotWidgets = new ArrayList<NomadWidget>();
}
......@@ -1138,7 +1138,7 @@ public abstract class ControllerPluginPeer extends PluginPeer {
}
}
if (found ==false) {
widget = PWidgetFactory.getInstance().createPlotLauncherButton(pContainer, widgetDescriptor.getHeight(), plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
widget = PWidgetFactory.getInstance().createPlotLauncherButton(pContainer, widgetDescriptor.getHeight(), plotDatas, widgetDescriptor.getTitle(), widgetDescriptor.getXAxisTitle(), widgetDescriptor.getYAxisTitle(), titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, widgetDescriptor.isMultipleYAxis());
}
dynamicPlotCreationInProgress = false;
}
......
......@@ -55,11 +55,13 @@ public abstract class PlotLauncher extends NomadWidget implements IPlotDataHolde
Property yAxisTitleProperty = null;
Property numorProperty = null;
boolean multipleYAxis = false;
protected List<PlotData> previousplotDatas = null;
protected PlotLauncher(PContainer parent, int height, List<PlotData> plotDatas, String titleKey,
String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty,
Property yAxisTitleProperty, Property numorProperty) {
Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
super(parent);
this.imageHeight = height;
this.plotDatas = new ArrayList<PlotData>(plotDatas);
......@@ -71,6 +73,7 @@ public abstract class PlotLauncher extends NomadWidget implements IPlotDataHolde
this.yAxisTitleProperty = yAxisTitleProperty;
this.numorProperty = numorProperty;
this.previousplotDatas = new ArrayList<PlotData>(plotDatas);
this.multipleYAxis = multipleYAxis;
}
protected void onClick() {
......@@ -84,7 +87,7 @@ public abstract class PlotLauncher extends NomadWidget implements IPlotDataHolde
WidgetFactory.CURRENT_MODE = previousMode;
}
else if (ConfigManager.getInstance().getPlotyVersion() == 2) {
PlotyManager.getInstance().plot(PlotManager.getInstance().computePlotTabKey(plotDatas), plotDatas, title, title, xAxisTitle, yAxisTitle, titleProperty, xAxisTitleProperty, yAxisTitleProperty);
PlotyManager.getInstance().plot(PlotManager.getInstance().computePlotTabKey(plotDatas), plotDatas, title, title, xAxisTitle, yAxisTitle, titleProperty, xAxisTitleProperty, yAxisTitleProperty, multipleYAxis);
}
}
......
......@@ -33,8 +33,8 @@ public abstract class PlotLauncherButton extends PlotLauncher {
protected int height = 0;
protected int width;
protected PlotLauncherButton(PContainer parent, int height, List plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty) {
super(parent, height, plotDatas, titleKey, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty);
protected PlotLauncherButton(PContainer parent, int height, List plotDatas, String titleKey, String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty, Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
super(parent, height, plotDatas, titleKey, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty, yAxisTitleProperty, numorProperty, multipleYAxis);
}
public void plotDataChanged(PlotDataEvent event) {
......
......@@ -42,9 +42,9 @@ public abstract class PlotLauncherExternImageButton extends PlotLauncher impleme
protected PlotLauncherExternImageButton(PContainer parent, int height, List<PlotData> plotDatas, String titleKey,
String xAxisTitleKey, String yAxisTitleKey, Property titleProperty, Property xAxisTitleProperty,
Property yAxisTitleProperty, Property numorProperty) {
Property yAxisTitleProperty, Property numorProperty, boolean multipleYAxis) {
super(parent, height, plotDatas, titleKey, xAxisTitleKey, yAxisTitleKey, titleProperty, xAxisTitleProperty,
yAxisTitleProperty, numorProperty);
yAxisTitleProperty, numorProperty, multipleYAxis);
this.height = height;
this.width = height;
// String key = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment