|
@@ -33,10 +33,13 @@ import java.io.IOException;
|
|
import java.util.Hashtable;
|
|
import java.util.Hashtable;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
import javax.imageio.ImageIO;
|
|
|
|
+import javax.swing.BorderFactory;
|
|
import javax.swing.BoxLayout;
|
|
import javax.swing.BoxLayout;
|
|
import javax.swing.GroupLayout.Alignment;
|
|
import javax.swing.GroupLayout.Alignment;
|
|
|
|
|
|
import java.awt.GridLayout;
|
|
import java.awt.GridLayout;
|
|
|
|
+import javax.swing.border.EmptyBorder;
|
|
|
|
+import java.awt.Component;
|
|
|
|
|
|
public class StatisticGraphPanel extends JPanel {
|
|
public class StatisticGraphPanel extends JPanel {
|
|
|
|
|
|
@@ -70,6 +73,7 @@ public class StatisticGraphPanel extends JPanel {
|
|
*/
|
|
*/
|
|
public StatisticGraphPanel(Model mod, Control cont, String name, Hashtable<String, StatisticGraphPanel> gHt) {
|
|
public StatisticGraphPanel(Model mod, Control cont, String name, Hashtable<String, StatisticGraphPanel> gHt) {
|
|
super();
|
|
super();
|
|
|
|
+ setBorder(new EmptyBorder(0, 0, 0, 0));
|
|
this.model = mod;
|
|
this.model = mod;
|
|
this.controller = cont;
|
|
this.controller = cont;
|
|
this.sGraph = new StatisticGraph(mod, cont);
|
|
this.sGraph = new StatisticGraph(mod, cont);
|
|
@@ -79,11 +83,11 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
|
|
|
// ******************** Component Propertys ***************//
|
|
// ******************** Component Propertys ***************//
|
|
// Graph
|
|
// Graph
|
|
- 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.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));
|
|
|
|
|
|
// Graph Name
|
|
// Graph Name
|
|
graphNameLabel = new JLabel(graphName);
|
|
graphNameLabel = new JLabel(graphName);
|
|
@@ -119,6 +123,7 @@ public class StatisticGraphPanel extends JPanel {
|
|
// Maximum Label
|
|
// Maximum Label
|
|
maximumLabel.setVerticalAlignment(SwingConstants.TOP);
|
|
maximumLabel.setVerticalAlignment(SwingConstants.TOP);
|
|
maximumLabel.setMinimumSize(new Dimension(30, 10));
|
|
maximumLabel.setMinimumSize(new Dimension(30, 10));
|
|
|
|
+ legendPanel.setAlignmentY(Component.BOTTOM_ALIGNMENT);
|
|
|
|
|
|
// Legend Panel
|
|
// Legend Panel
|
|
legendPanel.setLayout(new GridLayout(0, 5, 0, 0));
|
|
legendPanel.setLayout(new GridLayout(0, 5, 0, 0));
|
|
@@ -201,7 +206,8 @@ public class StatisticGraphPanel extends JPanel {
|
|
} else {
|
|
} else {
|
|
b = new JLabel(property);
|
|
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());
|
|
int color = Math.max(Math.max(set.getColor().getRed(), set.getColor().getGreen()), set.getColor().getBlue());
|
|
if (color <= 128) {
|
|
if (color <= 128) {
|
|
b.setForeground(Color.WHITE);
|
|
b.setForeground(Color.WHITE);
|