Beispiel #1
0
 public ChannelView(
     List<PlotDataProvider> channels,
     int infoPanelWidth,
     boolean isDrawSelectionCheckBox,
     Color graphAreaBgColor,
     Color infoAreaBgColor) {
   super();
   String names = "";
   for (PlotDataProvider channel : channels) {
     names = names + channel.toString() + ";";
     channelNames.add(channel.toString());
   }
   logger.debug("ChannelView created for list: " + names);
   initialize(infoPanelWidth, isDrawSelectionCheckBox, graphAreaBgColor, infoAreaBgColor);
   setPlotDataProviders(channels);
 }
Beispiel #2
0
 public ChannelView(
     PlotDataProvider channel,
     int infoPanelWidth,
     boolean isDrawSelectionCheckBox,
     Color graphAreaBgColor,
     Color infoAreaBgColor) {
   super();
   logger.debug("ChannelView created for " + channel.toString());
   initialize(infoPanelWidth, isDrawSelectionCheckBox, graphAreaBgColor, infoAreaBgColor);
   List<PlotDataProvider> lst = new ArrayList<PlotDataProvider>();
   lst.add(channel);
   setPlotDataProviders(lst);
 }
Beispiel #3
0
 /**
  * Setter of the property <tt>plotDataProviders</tt>
  *
  * @param channels List of plotDataProviders to draw inside this ChannelView.
  */
 public void setPlotDataProviders(List<PlotDataProvider> channels) {
   if (plotDataProviders != null) {
     for (PlotDataProvider channel : plotDataProviders) {
       channel.deleteObserver(this);
     }
   }
   plotDataProviders = channels;
   for (PlotDataProvider channel : plotDataProviders) {
     channel.addObserver(this);
     logger.debug("Observer for " + channel.toString() + " added");
     if (channel.getMaxValue() > maxValueAllChannels) {
       maxValueAllChannels = channel.getMaxValue();
     }
     if (channel.getMinValue() < minValueAllChannels) {
       minValueAllChannels = channel.getMinValue();
     }
   }
   lastClickedY = Integer.MIN_VALUE;
 }