View Javadoc

1   package hoplugins.seriesstats;
2   
3   
4   /***
5    * Model für das StatistikPanel
6    */
7   
8   public class GraphicData
9   {
10      private double[]        m_clWerte               =   null;
11      private String          m_sName                 =   "";
12      private boolean         m_bShow                 =   true;
13      private java.awt.Color  m_clColor               =   java.awt.Color.blue;
14      private java.text.NumberFormat m_clFormat       =   null;
15      private double          m_dFaktor               =   1;
16      
17      public GraphicData( double[] werte, String name, boolean show, java.awt.Color farbe, java.text.NumberFormat format )
18      {
19          this( werte, name, show, farbe, format, 1 );
20      }
21      
22      public GraphicData( double[] werte, String name, boolean show, java.awt.Color farbe, java.text.NumberFormat format, double faktor )
23      {
24          m_clWerte               =   werte;
25          m_sName                 =   name;
26          m_bShow                 =   show;
27          m_clColor               =   farbe;
28          m_clFormat              =   format;
29          m_dFaktor               =   faktor;
30      }
31  
32      /*** Getter for property m_clWerte.
33       * @return Value of property m_clWerte.
34       */
35      public double[] getWerte ()
36      {
37          return this.m_clWerte;
38      }
39      
40      /*** Setter for property m_clWerte.
41       * @param m_clWerte New value of property m_clWerte.
42       */
43      public void setWerte (double[] m_clWerte)
44      {
45          this.m_clWerte = m_clWerte;
46      }
47      
48      /*** Getter for property m_bShow.
49       * @return Value of property m_bShow.
50       */
51      public boolean isShow ()
52      {
53          return m_bShow;
54      }
55      
56      /*** Setter for property m_bShow.
57       * @param m_bShow New value of property m_bShow.
58       */
59      public void setShow (boolean m_bShow)
60      {
61          this.m_bShow = m_bShow;
62      }
63      
64      /*** Getter for property m_clColor.
65       * @return Value of property m_clColor.
66       */
67      public java.awt.Color getColor ()
68      {
69          return m_clColor;
70      }
71      
72      /*** Setter for property m_clColor.
73       * @param m_clColor New value of property m_clColor.
74       */
75      public void setColor (java.awt.Color m_clColor)
76      {
77          this.m_clColor = m_clColor;
78      }
79      
80      /*** Getter for property m_sName.
81       * @return Value of property m_sName.
82       */
83      public java.lang.String getName ()
84      {
85          return m_sName;
86      }
87      
88      /*** Setter for property m_sName.
89       * @param m_sName New value of property m_sName.
90       */
91      public void setName (java.lang.String m_sName)
92      {
93          this.m_sName = m_sName;
94      }
95      
96      //-----------------------------------
97      
98      public double getMaxValue()
99      {
100         double max = 0;
101         for(int i=0; m_clWerte != null && i < m_clWerte.length; i++)
102         {
103                 if ( m_clWerte[i] > max ) max = m_clWerte[i];
104         }
105         return (max);        
106     }
107     
108     public double getMinValue()
109     {
110         double min = 0;
111         for(int i=0; m_clWerte != null && i < m_clWerte.length; i++)
112         {
113                 if ( m_clWerte[i] < min ) min = m_clWerte[i];
114         }
115         return (min);        
116     }
117     
118     /*** Getter for property m_clFormat.
119      * @return Value of property m_clFormat.
120      */
121     public java.text.NumberFormat getFormat ()
122     {
123         return m_clFormat;
124     }
125     
126     /*** Setter for property m_clFormat.
127      * @param m_clFormat New value of property m_clFormat.
128      */
129     public void setFormat (java.text.NumberFormat m_clFormat)
130     {
131         this.m_clFormat = m_clFormat;
132     }
133     
134     /*** Getter for property m_iFaktor.
135      * @return Value of property m_iFaktor.
136      *
137      */
138     public double getFaktor ()
139     {
140         return m_dFaktor;
141     }
142     
143     /*** Setter for property m_iFaktor.
144      * @param m_iFaktor New value of property m_iFaktor.
145      *
146      */
147     public void setFaktor (double m_dFaktor)
148     {
149         this.m_dFaktor = m_dFaktor;
150     }
151     
152 }