001    package org.hackystat.projectbrowser.page.telemetry.datapanel;
002    
003    import java.io.Serializable;
004    
005    /**
006     * Class that represent an Y axis of some Telemetry Streams.
007     * @author Shaoxuan Zhang
008     *
009     */
010    public class TelemetryStreamYAxis implements Serializable {
011      /** Support serialization. */
012      public static final long serialVersionUID = 1L;
013      /** the unit name of this axis. */
014      private String unitName;
015      /** the maximum of this axis. */
016      private double maximum;
017      /** the minimum of this axis. */
018      private double minimum;
019      /** the color of this axis. */
020      private String color;
021      
022      /**
023       * @param unitName the unit of this axis.
024       */
025      public TelemetryStreamYAxis(String unitName) {
026        this.unitName = unitName;
027      }
028      /**
029       * @return the unitName
030       */
031      public String getUnitName() {
032        return unitName;
033      }
034      /**
035       * @param maximum the maximum to set
036       */
037      public void setMaximum(double maximum) {
038        this.maximum = maximum;
039      }
040      /**
041       * @return the maximum
042       */
043      public double getMaximum() {
044        return maximum;
045      }
046      /**
047       * @param minimum the minimum to set
048       */
049      public void setMinimum(double minimum) {
050        this.minimum = minimum;
051        if (this.minimum < 0) {
052          this.minimum = 0;
053        }
054      }
055      /**
056       * @return the minimum
057       */
058      public double getMinimum() {
059        if (this.minimum < 0) {
060          this.minimum = 0;
061        }
062        return minimum;
063      }
064      /**
065       * @param color the color to set
066       */
067      public void setColor(String color) {
068        this.color = color;
069      }
070      /**
071       * @return the color
072       */
073      public String getColor() {
074        return color;
075      }
076    }