|
@@ -75,11 +75,11 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
|
|
|
// ******************** Component Propertys ***************//
|
|
|
// Graph
|
|
|
- //this.setPreferredSize(new Dimension(300, 200));
|
|
|
+ // this.setPreferredSize(new Dimension(300, 200));
|
|
|
sGraph.setPreferredSize(new Dimension(200, 200));
|
|
|
sGraph.setMinimumSize(new Dimension(100, 150));
|
|
|
- //this.setMaximumSize(new Dimension(700, 200));
|
|
|
- //this.setMinimumSize(new Dimension(300, 200));
|
|
|
+ // this.setMaximumSize(new Dimension(700, 200));
|
|
|
+ // this.setMinimumSize(new Dimension(300, 200));
|
|
|
|
|
|
// Graph Name
|
|
|
graphNameLabel = new JLabel(graphName);
|
|
@@ -87,7 +87,7 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
|
|
|
// Panel on top (Name and Close Button)
|
|
|
topPanel.setLayout(new BorderLayout(0, 0));
|
|
|
- JPanel topPanelHelp = new JPanel(new BorderLayout(0,0));
|
|
|
+ JPanel topPanelHelp = new JPanel(new BorderLayout(0, 0));
|
|
|
topPanelHelp.add(graphNameLabel, BorderLayout.CENTER);
|
|
|
topPanelHelp.add(savImgButton, BorderLayout.EAST);
|
|
|
topPanel.add(topPanelHelp, BorderLayout.CENTER);
|
|
@@ -234,7 +234,7 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
} else {
|
|
|
b = new JLabel(property);
|
|
|
}
|
|
|
- //b.setBackground(set.getColor());
|
|
|
+ // b.setBackground(set.getColor());
|
|
|
b.setBorder(BorderFactory.createLineBorder(set.getColor()));
|
|
|
int color = Math.max(Math.max(set.getColor().getRed(), set.getColor().getGreen()), set.getColor().getBlue());
|
|
|
|
|
@@ -276,34 +276,42 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
public String getGraphName() {
|
|
|
return this.graphName;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Calls the addValue function of the sGraph
|
|
|
*/
|
|
|
- public void addValues(){
|
|
|
+ public void addValues() {
|
|
|
sGraph.addValues();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Calls the calcMaximum function of the sGraph
|
|
|
*/
|
|
|
- public void calcMaximum(){
|
|
|
+ public void calcMaximum() {
|
|
|
sGraph.calcMaximum();
|
|
|
}
|
|
|
-
|
|
|
- public StatisticGraph getStatGraph(){
|
|
|
+
|
|
|
+ public StatisticGraph getStatGraph() {
|
|
|
return sGraph;
|
|
|
}
|
|
|
-
|
|
|
- public void setStatisticGraph(StatisticGraph sG){
|
|
|
+
|
|
|
+ public void setStatisticGraph(StatisticGraph sG) {
|
|
|
this.sGraph = sG;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * Reset the Graph. Delete all calculated values.
|
|
|
+ * Reset the Graph. Delete all calculated values.
|
|
|
*/
|
|
|
- public void resetGraph(){
|
|
|
+ public void resetGraph() {
|
|
|
sGraph.resetGraph();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * Returns the Legend Panel.
|
|
|
+ * @return legendPanel
|
|
|
+ */
|
|
|
+ public JPanel getLegendPanel(){
|
|
|
+ return legendPanel;
|
|
|
+ }
|
|
|
+
|
|
|
}
|