|
@@ -3,8 +3,11 @@ package com.its.wthr.ui;
|
|
|
import com.intellij.uiDesigner.core.GridConstraints;
|
|
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
|
|
import com.intellij.uiDesigner.core.Spacer;
|
|
|
+import com.its.app.AppUtils;
|
|
|
import com.its.app.utils.SysUtils;
|
|
|
import com.its.wthr.repository.AppRepository;
|
|
|
+import com.its.wthr.service.AtmpService;
|
|
|
+import com.its.wthr.service.FrcsService;
|
|
|
import com.its.wthr.vo.AtmpPltnVo;
|
|
|
import com.its.wthr.vo.FrcsZoneVo;
|
|
|
import com.sun.management.OperatingSystemMXBean;
|
|
@@ -64,6 +67,7 @@ public class MainUI {
|
|
|
private JPanel tabFrcs;
|
|
|
private JTable listAtmp;
|
|
|
private JTable listFrcs;
|
|
|
+ private JButton btnRequest;
|
|
|
|
|
|
public static MainUI getInstance() {
|
|
|
return _instance;
|
|
@@ -163,6 +167,20 @@ public class MainUI {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ btnRequest.addActionListener(new ActionListener() {
|
|
|
+ @Override
|
|
|
+ public void actionPerformed(ActionEvent e) {
|
|
|
+ if (tabInfo.getSelectedIndex() == 0) {
|
|
|
+ log.info("대기환경 정보 요청.......");
|
|
|
+ AtmpService atmpService = (AtmpService) AppUtils.getBean(AtmpService.class);
|
|
|
+ atmpService.doJob();
|
|
|
+ } else {
|
|
|
+ log.info("동네예보 정보 요청.......");
|
|
|
+ FrcsService frcsService = (FrcsService) AppUtils.getBean(FrcsService.class);
|
|
|
+ frcsService.doJob();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -220,7 +238,6 @@ public class MainUI {
|
|
|
getColumnModel.getColumn(ii).setCellRenderer(atmpCellRenderer);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
this.frcsTableModel = new FrcsTableModel(frcsList);
|
|
|
listFrcs.setModel(this.frcsTableModel);
|
|
|
|
|
@@ -288,6 +305,34 @@ public class MainUI {
|
|
|
initTblListUI(atmpList, frcsList);
|
|
|
}
|
|
|
|
|
|
+ public void updateAtmpPltnStts(String sysTime) {
|
|
|
+ tabInfo.setTitleAt(0, "대기환경 - [" + sysTime + "]");
|
|
|
+
|
|
|
+ try {
|
|
|
+ AtmpTableModel tableModel = (AtmpTableModel) this.listAtmp.getModel();
|
|
|
+ if (tableModel != null) {
|
|
|
+ tableModel.fireTableDataChanged();
|
|
|
+ }
|
|
|
+ } catch (ClassCastException e) {
|
|
|
+ log.error("Cast Atmp Error");
|
|
|
+ }
|
|
|
+ tabAtmp.repaint();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void updateFrcsPltnStts(String sysTime) {
|
|
|
+ tabInfo.setTitleAt(1, "동네예보 - [" + sysTime + "]");
|
|
|
+
|
|
|
+ try {
|
|
|
+ FrcsTableModel tableModel = (FrcsTableModel) this.listFrcs.getModel();
|
|
|
+ if (tableModel != null) {
|
|
|
+ tableModel.fireTableDataChanged();
|
|
|
+ }
|
|
|
+ } catch (ClassCastException e) {
|
|
|
+ log.error("Cast Frcs Error");
|
|
|
+ }
|
|
|
+ tabFrcs.repaint();
|
|
|
+ }
|
|
|
+
|
|
|
public void updateCtlrStts(AtmpPltnVo obj) {
|
|
|
if (this.atmpTableModel == null) {
|
|
|
return;
|
|
@@ -326,9 +371,13 @@ public class MainUI {
|
|
|
pnlCtlr.setLayout(new GridLayoutManager(1, 1, new Insets(10, 4, 0, 4), -1, -1));
|
|
|
rootPanel.add(pnlCtlr, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
|
|
tabInfo = new JTabbedPane();
|
|
|
+ Font tabInfoFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tabInfo.getFont());
|
|
|
+ if (tabInfoFont != null) tabInfo.setFont(tabInfoFont);
|
|
|
pnlCtlr.add(tabInfo, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));
|
|
|
tabAtmp = new JPanel();
|
|
|
tabAtmp.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
|
|
+ Font tabAtmpFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tabAtmp.getFont());
|
|
|
+ if (tabAtmpFont != null) tabAtmp.setFont(tabAtmpFont);
|
|
|
tabInfo.addTab("대기환경 ", tabAtmp);
|
|
|
final JScrollPane scrollPane1 = new JScrollPane();
|
|
|
tabAtmp.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
|
@@ -336,6 +385,8 @@ public class MainUI {
|
|
|
scrollPane1.setViewportView(listAtmp);
|
|
|
tabFrcs = new JPanel();
|
|
|
tabFrcs.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
|
|
+ Font tabFrcsFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tabFrcs.getFont());
|
|
|
+ if (tabFrcsFont != null) tabFrcs.setFont(tabFrcsFont);
|
|
|
tabInfo.addTab("동네예보 ", tabFrcs);
|
|
|
final JScrollPane scrollPane2 = new JScrollPane();
|
|
|
tabFrcs.add(scrollPane2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
|
@@ -345,7 +396,7 @@ public class MainUI {
|
|
|
pnlLog.setLayout(new GridLayoutManager(2, 1, new Insets(0, 4, 0, 4), -1, -1));
|
|
|
rootPanel.add(pnlLog, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(-1, 200), new Dimension(-1, 200), new Dimension(-1, 200), 0, false));
|
|
|
pnlLogTitle = new JPanel();
|
|
|
- pnlLogTitle.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 2), 1, 1));
|
|
|
+ pnlLogTitle.setLayout(new GridLayoutManager(1, 7, new Insets(0, 0, 0, 2), 1, 1));
|
|
|
pnlLog.add(pnlLogTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
|
|
final JLabel label1 = new JLabel();
|
|
|
Font label1Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label1.getFont());
|
|
@@ -380,6 +431,11 @@ public class MainUI {
|
|
|
if (btnLogCopyFont != null) btnLogCopy.setFont(btnLogCopyFont);
|
|
|
btnLogCopy.setText("복사");
|
|
|
pnlLogTitle.add(btnLogCopy, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
|
|
+ btnRequest = new JButton();
|
|
|
+ Font btnRequestFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnRequest.getFont());
|
|
|
+ if (btnRequestFont != null) btnRequest.setFont(btnRequestFont);
|
|
|
+ btnRequest.setText(" 기상정보요청 ");
|
|
|
+ pnlLogTitle.add(btnRequest, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
|
|
final JScrollPane scrollPane3 = new JScrollPane();
|
|
|
Font scrollPane3Font = this.$$$getFont$$$("D2Coding", Font.PLAIN, 12, scrollPane3.getFont());
|
|
|
if (scrollPane3Font != null) scrollPane3.setFont(scrollPane3Font);
|