Commit 65fd969b 65fd969b722b2e2deaa810c913122e97ffb92494 by root

save

1 parent c7078924
......@@ -65,7 +65,7 @@ public class JPnlCurrent extends RoundedPanel3 {
private JPanel panel = new JPanel();
private int start = 0;
private int end = 6;
private int end = 9;
private List<MdlEvent> lstevent;
......@@ -117,13 +117,13 @@ public class JPnlCurrent extends RoundedPanel3 {
private void Up() throws Exception {
if (start - 6 <= 0) {
if (start - 9 <= 0) {
start = 0;
end = 6;
end = 9;
btnUp.setEnabled(false);
} else {
end = start;
start = start - 6;
start = start - 9;
}
Update();
......@@ -131,7 +131,7 @@ public class JPnlCurrent extends RoundedPanel3 {
private void Down() throws Exception {
if (end + 6 > lstevent.size()) {
if (end + 9 > lstevent.size()) {
start = end;
end = lstevent.size();
btnDown.setEnabled(false);
......@@ -139,7 +139,7 @@ public class JPnlCurrent extends RoundedPanel3 {
} else {
start = end;
end += 6;
end += 9;
}
Update();
}
......@@ -150,7 +150,7 @@ public class JPnlCurrent extends RoundedPanel3 {
this.setBackground(new Color(168, 181, 224));
this.setLayout(null);
panel.setBounds(5, 5, 740, 300);
panel.setBounds(5, 5, 740, 370);
panel.setLayout(null);
panel.setBackground(new Color(168, 181, 224));
......@@ -160,7 +160,7 @@ public class JPnlCurrent extends RoundedPanel3 {
ImageIcon imgUp = new ImageIcon(this.getClass().getResource("/top.png"));
btnUp.setIcon(imgUp);
btnUp.setBounds(5, 320, 370, 70);
btnUp.setBounds(5, 380, 370, 70);
btnUp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
SwingUtilities.invokeLater(new Runnable() {
......@@ -181,7 +181,7 @@ public class JPnlCurrent extends RoundedPanel3 {
ImageIcon imgDown = new ImageIcon(this.getClass().getResource("/bottom.png"));
btnDown.setIcon(imgDown);
btnDown.setBounds(385, 320, 370, 70);
btnDown.setBounds(385, 380, 370, 70);
btnDown.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
......
......@@ -130,7 +130,7 @@ public class JPnlLog extends RoundedPanel3 {
this.setBackground(new Color(168, 181, 224));
this.setLayout(null);
table.setBounds(5, 5, 760, 300);
table.setBounds(5, 5, 760, 370);
table.setDefaultRenderer(MdlEvent.class, new EventCellRenderer());
table.setRowHeight(40);
table.setBackground(new Color(168, 181, 224));
......@@ -141,7 +141,7 @@ public class JPnlLog extends RoundedPanel3 {
btnUp.setIcon(imgUp);
btnUp.setBounds(5, 320, 370, 70);
btnUp.setBounds(5, 380, 370, 70);
btnUp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
......@@ -158,7 +158,7 @@ public class JPnlLog extends RoundedPanel3 {
ImageIcon imgDown = new ImageIcon(getClass().getResource("/bottom.png"));
btnDown.setIcon(imgDown);
btnDown.setBounds(385, 320, 370, 70);
btnDown.setBounds(385, 380, 370, 70);
btnDown.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
......
......@@ -3,9 +3,7 @@ package org.emercit.szs.model;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.Image;
......@@ -58,40 +56,7 @@ public class MdlEvent {
private boolean sound = false; // false -no sound
private boolean siren = false; // false- no siren
/*
* Текущее состояние
*/
public MdlEvent(int id_agk, String name, int id_status) {
this.setIdAgk(id_agk);
this.setRiver(name);
this.setIdStatus(id_status);
}
/*
* Событие для подтверждения
*/
public MdlEvent(int id,String name,
int id_agk,
String datetime,
int id_status,
String message) {
this.setId(id);
this.setIdAgk(id_agk);
this.setRiver(name);
this.setDateTime(datetime);
this.setIdStatus(id_status);
}
public MdlEvent(int id, int id_agk, String river, String datetime,
public MdlEvent(long id, int id_agk, String river, String datetime,
String value, int id_status, boolean repair, boolean opendoor,
boolean veracity) {
......@@ -301,7 +266,8 @@ public class MdlEvent {
}
public String getTitleStatusForConfirm() {
return this.titlestatusconfirm;
return "БСВ:" + String.valueOf(this.value) + " м. "
+ this.titlestatusconfirm;
}
public String getStrImgStatus() {
......
......@@ -5,6 +5,13 @@ import java.util.ArrayList;
public class ModelResponse {
public String titlesubscriber;
public String titlecontact;
public boolean siren;
public boolean updateguid;
public List<EventAgk> lsteventagkconfirm;
......
......@@ -2,7 +2,7 @@ package org.emercit.szs.model;
public class SirenJNI {
static {
System.loadLibrary("siren");
// System.loadLibrary("siren");
}
......
......@@ -110,8 +110,6 @@ public class SZSTerminal {
// @Override
public void run() {
Calendar calendar = Calendar.getInstance();
TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow"));
......@@ -124,6 +122,9 @@ public class SZSTerminal {
if (SData.INSTANCE.isConnect()){
//jpnlheader.setTitleSubscriver(SData.INSTANCE.getData().titlesubscriber);
jpnlcontacts.setTitleContact(SData.INSTANCE.getData().titlecontact);
/*
* Текущее состояние датчиков
......@@ -212,25 +213,13 @@ public class SZSTerminal {
PropertyConfigurator.configure("log4j.properties");
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
// siren.sirenOff();
} catch (Exception e) {
}
mainFrame = new JFrame();
mainFrame.setSize(800, 600);
mainFrame.setUndecorated(false);
......