|
@@ -15,12 +15,15 @@ import java.awt.BorderLayout;
|
|
|
import java.awt.Color;
|
|
|
import java.awt.Dimension;
|
|
|
import java.awt.FlowLayout;
|
|
|
+import java.awt.LayoutManager;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
|
import java.awt.event.MouseAdapter;
|
|
|
import java.awt.event.MouseEvent;
|
|
|
import java.awt.event.MouseListener;
|
|
|
import java.util.Hashtable;
|
|
|
+import javax.swing.BoxLayout;
|
|
|
+import java.awt.GridLayout;
|
|
|
|
|
|
public class StatisticGraphPanel extends JPanel {
|
|
|
|
|
@@ -62,6 +65,11 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
setLayout(new BorderLayout(0, 0));
|
|
|
|
|
|
// ******************** Component Propertys ***************//
|
|
|
+ // Graph
|
|
|
+ sGraph.setPreferredSize(new Dimension(280, 150));
|
|
|
+ sGraph.setMaximumSize(new Dimension(1000, 150));
|
|
|
+ sGraph.setMinimumSize(new Dimension(100, 150));
|
|
|
+
|
|
|
// Graph Name
|
|
|
graphNameLabel = new JLabel(graphName);
|
|
|
graphNameLabel.setHorizontalTextPosition(JLabel.CENTER);
|
|
@@ -75,7 +83,10 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
// Maximum Label
|
|
|
maximumLabel.setVerticalAlignment(SwingConstants.TOP);
|
|
|
maximumLabel.setMinimumSize(new Dimension(30, 10));
|
|
|
-
|
|
|
+
|
|
|
+ //Legend Panel
|
|
|
+ legendPanel.setLayout(new GridLayout(0, 5, 0, 0));
|
|
|
+
|
|
|
// ******************** Component Listener ****************//
|
|
|
|
|
|
that = this;
|
|
@@ -128,7 +139,7 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
break;
|
|
|
}
|
|
|
JLabel b = new JLabel(set.getCpsObject().getName() + ": " + property);
|
|
|
- b.setBackground(Color.CYAN);
|
|
|
+ b.setBackground(set.getColor());
|
|
|
b.setOpaque(true);
|
|
|
b.addMouseListener(new MouseAdapter() {
|
|
|
@Override
|