|
@@ -1,6 +1,7 @@
|
|
|
package ui.view;
|
|
|
|
|
|
import javax.swing.JPanel;
|
|
|
+import javax.swing.JTextPane;
|
|
|
|
|
|
import classes.TrackedDataSet;
|
|
|
import ui.controller.Control;
|
|
@@ -10,11 +11,13 @@ import javax.swing.JLabel;
|
|
|
import javax.swing.JButton;
|
|
|
import javax.swing.SwingConstants;
|
|
|
import javax.swing.Timer;
|
|
|
+import javax.swing.text.StyledDocument;
|
|
|
|
|
|
import java.awt.BorderLayout;
|
|
|
import java.awt.Color;
|
|
|
import java.awt.Dimension;
|
|
|
import java.awt.FlowLayout;
|
|
|
+import java.awt.Font;
|
|
|
import java.awt.LayoutManager;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
@@ -138,10 +141,18 @@ public class StatisticGraphPanel extends JPanel {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
JLabel b = new JLabel(set.getCpsObject().getName() + ": " + property);
|
|
|
b.setBackground(set.getColor());
|
|
|
+ int color = Math.max(Math.max(set.getColor().getRed(), set.getColor().getGreen()),set.getColor().getBlue());
|
|
|
+ if (color<=128) {
|
|
|
+ b.setForeground(Color.WHITE);
|
|
|
+ }
|
|
|
+
|
|
|
b.setOpaque(true);
|
|
|
b.addMouseListener(new MouseAdapter() {
|
|
|
+
|
|
|
@Override
|
|
|
public void mousePressed(MouseEvent e) {
|
|
|
if (MouseEvent.BUTTON3 == e.getButton()) {
|