JPnlAgk.java
3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package org.emercit.components;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Image;
import java.awt.Font;
import org.emercit.model.*;
import javax.swing.UIManager;
public class JPnlAgk extends ExtPnlAgk {
private class JPnlInfoExt extends ExtPnlInfo {
}
private int id;
private JLabel lblTitleAgk = new JLabel();
private JLabel lblTitleRiver = new JLabel();
private JLabel lblTitleStatus = new JLabel();
private JLabel lblTitleOpenDoor = new JLabel();
private JLabel lblTitleRepair = new JLabel();
private JLabel lblTitleVeracity = new JLabel();
private JPnlInfoExt JPnlInfo = new JPnlInfoExt();
public JPnlAgk(MdlEvent event) {
setLayout(null);
lblTitleAgk.setBounds(7, 47, 70, 15);
lblTitleAgk.setText(event.getTitleAgk());
// lblTitleAgk.setFont(new Font(null, Font.ITALIC, 14));
lblTitleAgk.setFont(new Font(null, Font.BOLD, 14));
lblTitleAgk.setForeground(Color.BLACK);
add(lblTitleAgk);
JPnlInfo.setLayout(null);
JPnlInfo.setBounds(83, 7, 142, 88);
// River
lblTitleRiver.setText(event.getTitleRiver());
lblTitleRiver.setForeground(Color.BLACK);
if (event.getIdStatus() != 0 || event.getOpenDorr()
|| event.getRepair() || !event.getVeracity()) {
this.setYellow();
if (event.getIdStatus() == 2)
this.setRed();
lblTitleRiver.setFont(new Font(null, Font.ITALIC, 12));
lblTitleRiver.setBounds(3, 3, 138, 15);
JPnlInfo.add(lblTitleRiver);
/*
* ***************************STATUS***************************
*/
lblTitleStatus.setBounds(3, 18, 138, 15);
lblTitleStatus.setFont(new Font(null, Font.ITALIC, 11));
lblTitleStatus.setText("cтатус:" + event.getTitleStatus());
lblTitleStatus.setForeground(event.getColorStatus());
lblTitleStatus.setIcon(event.getIconStatusSmall());
JPnlInfo.add(lblTitleStatus);
// **********************************************************************************
/*
* *****************************DOOR********************************
*/
lblTitleOpenDoor.setBounds(3, 34, 138, 15);
lblTitleOpenDoor.setFont(new Font(null, Font.ITALIC, 11));
lblTitleOpenDoor.setText(event.getTitleOpenDorr());
lblTitleOpenDoor.setForeground(event.getColorOpenDoor());
lblTitleOpenDoor.setIcon(event.getIconOpenDoorSmall());
JPnlInfo.add(lblTitleOpenDoor);
// ***************************************************************************
/*
* *****************************REPAIR*******************************
* *
*/
lblTitleRepair.setBounds(3, 50, 138, 15);
lblTitleRepair.setFont(new Font(null, Font.ITALIC, 11));
lblTitleRepair.setText(event.getTitleRepair());
lblTitleRepair.setForeground(event.getColorRepair());
lblTitleRepair.setIcon(event.getIconRepairSmall());
JPnlInfo.add(lblTitleRepair);
// ***************************************************************************
/*
* ******************************VERACITY****************************
* *********
*/
lblTitleVeracity.setBounds(3, 66, 138, 15);
lblTitleVeracity.setFont(new Font(null, Font.ITALIC, 11));
lblTitleVeracity.setText(event.getTitleVeracity());
lblTitleVeracity.setForeground(event.getColorVeracity());
lblTitleVeracity.setIcon(event.getIconVeracitySmall());
JPnlInfo.add(lblTitleVeracity);
// ****************************************************************************
add(JPnlInfo);
} else {
this.setGreen();
lblTitleRiver.setFont(new Font(null, Font.ITALIC, 14));
lblTitleRiver.setBounds(83, 47, 138, 15);
JPnlInfo.add(lblTitleRiver);
add(lblTitleRiver);
}
}
}