Browse Source

installed version

shjung 3 years ago
parent
commit
b43da5be79

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ target/
 
 ### LOG ###
 /logs/
+/images/
 
 ### STS ###
 .apt_generated

+ 4 - 5
src/main/java/com/its/vds/VdsCommServerApplication.java

@@ -2,12 +2,12 @@ package com.its.vds;
 
 import com.its.app.AppUtils;
 import com.its.app.utils.SysUtils;
-import com.its.vds.ui.JTextAreaOutputStream;
-import com.its.vds.ui.MainUI;
 import com.its.vds.config.ProcessConfig;
 import com.its.vds.process.DbmsJobProcess;
 import com.its.vds.service.UnitSystService;
 import com.its.vds.service.VdsCtlrService;
+import com.its.vds.ui.JTextAreaOutputStream;
+import com.its.vds.ui.MainUI;
 import com.its.vds.xnettcp.center.CenterTcpServerService;
 import com.its.vds.xnettcp.vds.VdsTcpClientCommService;
 import com.its.vds.xnettcp.vds.process.VdsDataProcess;
@@ -17,7 +17,6 @@ import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.boot.Banner;
 import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.WebApplicationType;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.context.ApplicationPidFileWriter;
@@ -60,7 +59,7 @@ public class VdsCommServerApplication implements CommandLineRunner, ApplicationL
         }
 
         ApplicationContext context = new SpringApplicationBuilder(VdsCommServerApplication.class)
-                .web(WebApplicationType.NONE)
+                //.web(WebApplicationType.NONE)
                 .listeners(new ApplicationPidFileWriter("./conf/vds-comm-server.pid"))
                 .headless(false)
                 .bannerMode(Banner.Mode.OFF)
@@ -82,7 +81,7 @@ public class VdsCommServerApplication implements CommandLineRunner, ApplicationL
             String sysTime = SysUtils.getSysTimeStr();
             //JFrame.setDefaultLookAndFeelDecorated(true);
             JFrame frame = new JFrame("VDS 통신 서버 - [" + sysTime + "]");
-            MainUI UI = new MainUI();
+            MainUI UI = new MainUI(frame);
             frame.setIconImage(Toolkit.getDefaultToolkit().getImage(pathOfImage));
             frame.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
             frame.setContentPane(UI.getRootPanel());

+ 27 - 5
src/main/java/com/its/vds/ui/MainUI.java

@@ -38,6 +38,9 @@ import java.util.*;
 @Getter
 public class MainUI {
     private static MainUI _instance = null;
+
+    private SubUIController subUIController = null;
+    private JFrame jFrame = null;
     private VdsCtlrService vdsCtlrService = null;
     OperatingSystemMXBean osBean = null;
     private Timer timer;
@@ -88,12 +91,17 @@ public class MainUI {
         lblCpuRate.setText(String.valueOf(Math.round(cpuLoad * 100.0)));
     }
 
-    public MainUI() {
+    public MainUI(JFrame jFrame) {
         System.setProperty("awt.useSystemAAFontSettings", "false"); // AntiAliasing false
 
+        this.jFrame = jFrame;
         if (_instance == null) {
             _instance = this;
+
+            subUIController = new SubUIController(jFrame);
+            subUIController.setVisible(false);
         }
+
         osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
         try {
             Font font = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/D2Coding.ttc"));
@@ -175,8 +183,11 @@ public class MainUI {
             public void mouseClicked(MouseEvent me) {
                 // double click
                 if (me.getClickCount() == 2) {
-                    updateControllerInfo();
-
+                    if (!updateControllerInfo()) {
+                        if (subUIController.isVisible()) {
+                            subUIController.setVisible(false);
+                        }
+                    }
                 }
             }
         });
@@ -267,10 +278,14 @@ public class MainUI {
         }
     }
 
-    public void updateControllerInfo() {
+    public boolean updateControllerInfo() {
+        if (subUIController.isVisible()) {
+            subUIController.setVisible(false);
+        }
+
         int row = tblCtlrList.getSelectedRow();
         if (row < 0) {
-            return;
+            return false;
         }
 
         txtId.setText("");
@@ -280,7 +295,14 @@ public class MainUI {
         if (selObj != null) {
             txtId.setText(selObj.getVDS_CTLR_ID());
             txtName.setText(selObj.getVDS_NM());
+
+            subUIController.updateInfo(selObj);
+            if (!subUIController.isVisible()) {
+                //subUIController.setVisible(true);
+            }
+            return true;
         }
+        return false;
     }
 
     /**

+ 88 - 209
src/main/java/com/its/vds/ui/SubUI.form

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.its.vds.ui.SubUI">
-  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
     <margin top="0" left="0" bottom="0" right="0"/>
     <constraints>
       <xy x="20" y="20" width="979" height="620"/>
@@ -8,18 +8,18 @@
     <properties/>
     <border type="none"/>
     <children>
-      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
         <margin top="10" left="4" bottom="0" right="4"/>
         <constraints>
-          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
         </constraints>
         <properties/>
         <border type="none"/>
         <children>
-          <grid id="d1b2f" binding="pnlCtlrTitle" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+          <grid id="d1b2f" binding="pnlCtlrTitlex" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
             <margin top="0" left="0" bottom="0" right="2"/>
             <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
             </constraints>
             <properties/>
             <border type="none"/>
@@ -41,165 +41,131 @@
                   <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
               </hspacer>
-              <component id="c9b9" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="제어기 전체: "/>
-                </properties>
-              </component>
-              <component id="20b88" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="통신 이상: "/>
-                </properties>
-              </component>
-              <component id="baf10" class="javax.swing.JLabel" binding="lblTotal">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
-              <component id="1c841" class="javax.swing.JLabel" binding="lblError">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <foreground color="-65536"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
             </children>
           </grid>
-          <scrollpane id="b21be">
-            <constraints>
-              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="a0dd1" class="javax.swing.JTable" binding="tblCtlrList">
-                <constraints/>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                </properties>
-              </component>
-            </children>
-          </scrollpane>
-          <grid id="17544" binding="pnlControl" layout-manager="GridLayoutManager" row-count="1" column-count="8" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
+          <grid id="17544" binding="pnlControl" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
             <margin top="0" left="0" bottom="0" right="2"/>
             <constraints>
-              <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
             </constraints>
             <properties/>
             <border type="none"/>
             <children>
-              <component id="660a8" class="javax.swing.JButton" binding="btnImage">
+              <component id="a85f9" class="javax.swing.JButton" binding="btnDisconnect">
                 <constraints>
-                  <grid row="0" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
                 <properties>
                   <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="정지영상"/>
+                  <text value="연결끊기"/>
                 </properties>
               </component>
-              <hspacer id="60c19">
+              <grid id="31344" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+                <margin top="0" left="0" bottom="0" right="0"/>
                 <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                  <grid row="0" column="0" row-span="4" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
                 </constraints>
-              </hspacer>
-              <component id="3d84f" class="javax.swing.JButton" binding="btnInitialize">
-                <constraints>
-                  <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="초기화"/>
-                </properties>
-              </component>
+                <properties/>
+                <border type="none"/>
+                <children>
+                  <component id="6d1e0" class="javax.swing.JTextField" binding="txtId">
+                    <constraints>
+                      <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <minimum-size width="100" height="-1"/>
+                        <preferred-size width="100" height="-1"/>
+                        <maximum-size width="100" height="-1"/>
+                      </grid>
+                    </constraints>
+                    <properties>
+                      <editable value="false"/>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <horizontalAlignment value="0"/>
+                      <text value="ID"/>
+                    </properties>
+                  </component>
+                  <component id="a6a03" class="javax.swing.JTextField" binding="txtName">
+                    <constraints>
+                      <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <preferred-size width="200" height="-1"/>
+                      </grid>
+                    </constraints>
+                    <properties>
+                      <editable value="false"/>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <horizontalAlignment value="2"/>
+                      <text value="제어기 명칭"/>
+                    </properties>
+                  </component>
+                  <component id="a60a6" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <text value="ㅣ관리번호"/>
+                    </properties>
+                  </component>
+                  <component id="f96bf" class="javax.swing.JTextField" binding="textField1" default-binding="true">
+                    <constraints>
+                      <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <preferred-size width="150" height="-1"/>
+                      </grid>
+                    </constraints>
+                    <properties/>
+                  </component>
+                  <component id="17549" class="javax.swing.JTextField" binding="textField2" default-binding="true">
+                    <constraints>
+                      <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <preferred-size width="150" height="-1"/>
+                      </grid>
+                    </constraints>
+                    <properties/>
+                  </component>
+                </children>
+              </grid>
               <component id="7c99b" class="javax.swing.JButton" binding="btnReset">
                 <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                  <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
                 <properties>
                   <font name="Malgun Gothic" size="12" style="0"/>
                   <text value="리셋"/>
                 </properties>
               </component>
-              <component id="a85f9" class="javax.swing.JButton" binding="btnDisconnect">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="연결끊기"/>
-                </properties>
-              </component>
-              <component id="a6a03" class="javax.swing.JTextField" binding="txtName">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="200" height="-1"/>
-                    <preferred-size width="200" height="-1"/>
-                    <maximum-size width="200" height="-1"/>
-                  </grid>
-                </constraints>
-                <properties>
-                  <editable value="false"/>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <text value="제어기 명칭"/>
-                </properties>
-              </component>
-              <component id="6d1e0" class="javax.swing.JTextField" binding="txtId">
+              <component id="3d84f" class="javax.swing.JButton" binding="btnInitialize">
                 <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="100" height="-1"/>
-                    <preferred-size width="100" height="-1"/>
-                    <maximum-size width="100" height="-1"/>
-                  </grid>
+                  <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
                 <properties>
-                  <editable value="false"/>
                   <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="0"/>
-                  <text value="ID"/>
+                  <text value="초기화"/>
                 </properties>
               </component>
-              <component id="7eb53" class="javax.swing.JLabel">
+              <component id="660a8" class="javax.swing.JButton" binding="btnImage">
                 <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                  <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
                 <properties>
                   <font name="Malgun Gothic" size="12" style="0"/>
-                  <icon value="static/image/select.png"/>
-                  <text value="선택한 제어기 "/>
+                  <text value="정지영상"/>
                 </properties>
               </component>
             </children>
           </grid>
+          <grid id="62443" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+            <margin top="0" left="0" bottom="0" right="0"/>
+            <constraints>
+              <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+            </constraints>
+            <properties/>
+            <border type="none"/>
+            <children/>
+          </grid>
         </children>
       </grid>
       <grid id="1a658" binding="pnlLog" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
         <margin top="0" left="4" bottom="0" right="4"/>
         <constraints>
-          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
-            <minimum-size width="-1" height="300"/>
-            <preferred-size width="-1" height="300"/>
-            <maximum-size width="-1" height="300"/>
-          </grid>
+          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
         </constraints>
         <properties/>
         <border type="none"/>
@@ -220,7 +186,7 @@
                   <font name="Malgun Gothic" size="12" style="0"/>
                   <horizontalAlignment value="2"/>
                   <icon value="static/image/logging.png"/>
-                  <text value="시스템 로그"/>
+                  <text value="제어기 로그"/>
                 </properties>
               </component>
               <hspacer id="656fd">
@@ -295,93 +261,6 @@
           </scrollpane>
         </children>
       </grid>
-      <grid id="e0774" binding="pnlStatusBar" layout-manager="GridLayoutManager" row-count="1" column-count="7" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="4" bottom="4" right="4"/>
-        <constraints>
-          <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <hspacer id="653ec">
-            <constraints>
-              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-            </constraints>
-          </hspacer>
-          <component id="20f9" class="javax.swing.JLabel" binding="lblSystime">
-            <constraints>
-              <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value=" 2022-08-04 13:24:33 "/>
-            </properties>
-          </component>
-          <component id="a516b" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <icon value="static/image/on.png"/>
-              <text value=" "/>
-            </properties>
-          </component>
-          <component id="94189" class="javax.swing.JLabel" binding="lblCpuRate">
-            <constraints>
-              <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="19dbe" class="javax.swing.JLabel" binding="lblMemoryUsage">
-            <constraints>
-              <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="f6d5e" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  CPU 사용율(%):"/>
-            </properties>
-          </component>
-          <component id="d8ff5" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  메모리 사용율(%):"/>
-            </properties>
-          </component>
-        </children>
-      </grid>
     </children>
   </grid>
 </form>

+ 79 - 328
src/main/java/com/its/vds/ui/SubUI.java

@@ -3,67 +3,43 @@ package com.its.vds.ui;
 import com.intellij.uiDesigner.core.GridConstraints;
 import com.intellij.uiDesigner.core.GridLayoutManager;
 import com.intellij.uiDesigner.core.Spacer;
-import com.its.app.utils.SysUtils;
 import com.its.vds.domain.NET;
 import com.its.vds.entity.TbVdsCtlr;
-import com.its.vds.global.AppRepository;
 import com.its.vds.service.VdsCtlrService;
 import com.sun.management.OperatingSystemMXBean;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
 
-import javax.swing.Timer;
 import javax.swing.*;
-import javax.swing.border.MatteBorder;
 import javax.swing.plaf.FontUIResource;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableColumnModel;
 import javax.swing.text.StyleContext;
 import java.awt.*;
 import java.awt.datatransfer.Clipboard;
 import java.awt.datatransfer.StringSelection;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
 import java.io.File;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
-import java.util.List;
-import java.util.*;
+import java.util.Locale;
 
 @Slf4j
 @Getter
-public class SubUI {
-    private static SubUI _instance = null;
+public abstract class SubUI {
     private VdsCtlrService vdsCtlrService = null;
     OperatingSystemMXBean osBean = null;
-    private Timer timer;
-    private Long tick = Long.valueOf(0);
     private TbVdsCtlr selObj = null;
 
-    private CtlrSttsTableModel ctlrSttsTableModel;
-    private TableCellRenderer cellRenderer = new CtlrSttsTableCellRenderer();
-
     private JPanel rootPanel;
     private JPanel pnlCtlr;
     private JPanel pnlLog;
     private JPanel pnlLogTitle;
-    private JPanel pnlCtlrTitle;
+    private JPanel pnlCtlrTitlex;
     private JButton btnLogDirOpen;
     private JButton btnLogPause;
     private JCheckBox chkLogPause;
-    private JLabel lblSystime;
-    private JPanel pnlStatusBar;
-    private JTable tblCtlrList;
     private JTextArea taLog;
     private JButton btnLogCopy;
-    private JLabel lblTotal;
-    private JLabel lblError;
-    private JLabel lblCpuRate;
-    private JLabel lblMemoryUsage;
     private JPanel pnlControl;
     private JButton btnImage;
     private JButton btnInitialize;
@@ -71,29 +47,14 @@ public class SubUI {
     private JButton btnDisconnect;
     private JTextField txtName;
     private JTextField txtId;
+    private JTextField textField1;
+    private JTextField textField2;
 
-    public static SubUI getInstance() {
-        return _instance;
-    }
-
-    public void displaySystime() {
-        lblSystime.setText(" " + SysUtils.getSysTimeStr() + "  ");
-        updateCommSttsTotal();
-    }
-
-    public void displayResource() {
-        long memoryUsage = Math.round(((double) (osBean.getTotalPhysicalMemorySize() - osBean.getFreePhysicalMemorySize())) / (double) osBean.getTotalPhysicalMemorySize() * 100.0);
-        lblMemoryUsage.setText(String.valueOf(memoryUsage));
-        double cpuLoad = osBean.getSystemCpuLoad();
-        lblCpuRate.setText(String.valueOf(Math.round(cpuLoad * 100.0)));
-    }
+    protected abstract void actionButtonClicked();
 
     public SubUI() {
         System.setProperty("awt.useSystemAAFontSettings", "false"); // AntiAliasing false
 
-        if (_instance == null) {
-            _instance = this;
-        }
         osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
         try {
             Font font = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/D2Coding.ttc"));
@@ -108,37 +69,13 @@ public class SubUI {
         if (d2font != null) {
             taLog.setFont(d2font);
         }
-
-//        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-//        String fontNames[] = ge.getAvailableFontFamilyNames();
-//        for (int ii = 0; ii < fontNames.length; ii++) {
-//            log.error("GraphicsEnvironment Fonts: {}", fontNames[ii]);
-//        }
-//        final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
-//        for (Font font : fonts) {
-//            log.error("FONTS: {}", font);
-//        }
-
-        displaySystime();
-        displayResource();
-        timer = new Timer(1000, new ActionListener() {
-            public void actionPerformed(ActionEvent evt) {
-                displaySystime();
-                tick++;
-                if (tick % 5 == 0) {
-                    displayResource();
-                }
-            }
-        });
-        timer.start();
+        taLog.setText(null);
 
         chkLogPause.setFocusable(false);
         btnLogPause.setFocusable(false);
         btnLogDirOpen.setFocusable(false);
         btnLogCopy.setFocusable(false);
 
-        //initTblListUI();
-
         btnLogPause.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -171,15 +108,6 @@ public class SubUI {
             }
         });
 
-        tblCtlrList.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent me) {
-                // double click
-                if (me.getClickCount() == 2) {
-                    updateControllerInfo();
-
-                }
-            }
-        });
         btnDisconnect.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -206,6 +134,16 @@ public class SubUI {
         });
     }
 
+    public void updateInfo(TbVdsCtlr selObj) {
+        this.selObj = selObj;
+        txtId.setText("");
+        txtName.setText("");
+        if (selObj != null) {
+            txtId.setText(selObj.getVDS_CTLR_ID());
+            txtName.setText(selObj.getVDS_NM());
+        }
+    }
+
     /**
      * 제어기 명령 처리
      *
@@ -267,123 +205,6 @@ public class SubUI {
         }
     }
 
-    public void updateControllerInfo() {
-        int row = tblCtlrList.getSelectedRow();
-        if (row < 0) {
-            return;
-        }
-
-        txtId.setText("");
-        txtName.setText("");
-        CtlrSttsTableModel tableModel = (CtlrSttsTableModel) tblCtlrList.getModel();
-        selObj = tableModel.getControllerInfo(row);
-        if (selObj != null) {
-            txtId.setText(selObj.getVDS_CTLR_ID());
-            txtName.setText(selObj.getVDS_NM());
-        }
-    }
-
-    /**
-     * 목록 헤더 생성
-     */
-    private void initTblListUI(List<TbVdsCtlr> ctlrList) {
-
-        tblCtlrList.getTableHeader().setOpaque(false);
-        tblCtlrList.getTableHeader().setBackground(Color.LIGHT_GRAY);
-        tblCtlrList.setRowMargin(1);
-        //tblCtlrList.setGridColor(Color.LIGHT_GRAY);
-        tblCtlrList.setRowHeight(tblCtlrList.getRowHeight() + 5);
-        //tblCtlrList.setRowSelectionAllowed(true);
-        //tblCtlrList.setColumnSelectionAllowed(false);
-
-        ctlrSttsTableModel = new CtlrSttsTableModel(ctlrList);
-        tblCtlrList.setModel(ctlrSttsTableModel);
-        tblCtlrList.setBackground(Color.WHITE);
-        tblCtlrList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-        //tblCtlrList.setAutoCreateRowSorter(true); // sorting
-
-        //tblCtlrList.addMouseListener(new ListMouseListener(null));
-
-        TableColumnModel getColumnModel = tblCtlrList.getColumnModel();
-        getColumnModel.getColumn(0).setPreferredWidth(30);  //  "S",
-        getColumnModel.getColumn(1).setPreferredWidth(75);  //  "번호",
-        getColumnModel.getColumn(2).setPreferredWidth(75);  //  "시설물ID",
-        getColumnModel.getColumn(3).setPreferredWidth(260); //  "명칭",
-        getColumnModel.getColumn(4).setPreferredWidth(120); //  "IP",
-        getColumnModel.getColumn(5).setPreferredWidth(55);  //  "PORT",
-        getColumnModel.getColumn(6).setPreferredWidth(70);  //  "연결상태",
-        getColumnModel.getColumn(7).setPreferredWidth(50);  //  "도어",
-        getColumnModel.getColumn(8).setPreferredWidth(50);  //  "팬",
-        getColumnModel.getColumn(9).setPreferredWidth(50);  //  "히터",
-        getColumnModel.getColumn(10).setPreferredWidth(50);  //  "온도",
-        getColumnModel.getColumn(11).setPreferredWidth(50); //  "Video",
-        getColumnModel.getColumn(12).setPreferredWidth(120);
-        getColumnModel.getColumn(13).setPreferredWidth(120);
-        getColumnModel.getColumn(0).setMaxWidth(30);
-        getColumnModel.getColumn(0).setMinWidth(30);
-        getColumnModel.getColumn(0).setResizable(false);
-        Color color = UIManager.getColor("Table.gridColor");
-        MatteBorder border = new MatteBorder(1, 1, 0, 0, color);
-        tblCtlrList.setBorder(border);
-
-        DefaultTableCellRenderer centerAlign = new DefaultTableCellRenderer();
-        centerAlign.setHorizontalAlignment(JLabel.CENTER);
-        for (int ii = 0; ii < getColumnModel.getColumnCount(); ii++) {
-            getColumnModel.getColumn(ii).setCellRenderer(cellRenderer);
-        }
-    }
-
-    public void updateCommSttsTotal() {
-        int ctlrTotal = 0;
-        int ctlrError = 0;
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrTotal++;
-                if (!"CMS0".equals(obj.getStts().getCMNC_STTS_CD())) {
-                    ctlrError++;
-                }
-            }
-        }
-        lblTotal.setText(" " + ctlrTotal + " ");
-        lblError.setText(" " + ctlrError + " ");
-    }
-
-    public void LoadControllerInfo(VdsCtlrService vdsCtlrService) {
-        this.vdsCtlrService = vdsCtlrService;
-
-        SortedMap<Integer, TbVdsCtlr> ctlrMap = new TreeMap<>();
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrMap.put(Integer.valueOf(obj.getVDS_CTLR_NMBR()), obj);
-            }
-        }
-        List<TbVdsCtlr> ctlrList = new ArrayList<TbVdsCtlr>(ctlrMap.values());
-        initTblListUI(ctlrList);
-//        for (Map.Entry<Integer, TbVdsCtlr> e : ctlrMap.entrySet()) {
-//            TbVdsCtlr obj = e.getValue();
-//            ctlrSttsTableModel.Add(obj);
-//        }
-        updateCommSttsTotal();
-    }
-
-    public void updateCtlrStts(TbVdsCtlr obj) {
-
-        //CtlrSttsTableModel ctlrSttsTableModel = (CtlrSttsTableModel)tblCtlrList.getModel();
-        for (int ii = 0; ii < ctlrSttsTableModel.getRowCount(); ii++) {
-            if (obj.getVDS_CTLR_ID().equals(ctlrSttsTableModel.getValueAt(ii, 2).toString())) {
-                int modelRow = tblCtlrList.convertRowIndexToModel(ii);
-//                //int viewColumn = tblCtlrList.getSelectedColumn();
-//                int modelColumn = tblCtlrList.convertColumnIndexToModel(4);
-//                Object cell = tblCtlrList.getValueAt(modelRow, modelColumn);
-//                log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: {}", cell);
-                ctlrSttsTableModel.setValue(obj, ii, modelRow);
-                break;
-            }
-        }
-    }
-
     {
 // GUI initializer generated by IntelliJ IDEA GUI Designer
 // >>> IMPORTANT!! <<<
@@ -400,13 +221,13 @@ public class SubUI {
      */
     private void $$$setupUI$$$() {
         rootPanel = new JPanel();
-        rootPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
+        rootPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
         pnlCtlr = new JPanel();
-        pnlCtlr.setLayout(new GridLayoutManager(3, 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));
-        pnlCtlrTitle = new JPanel();
-        pnlCtlrTitle.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 2), -1, -1));
-        pnlCtlr.add(pnlCtlrTitle, 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));
+        pnlCtlr.setLayout(new GridLayoutManager(2, 2, 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_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        pnlCtlrTitlex = new JPanel();
+        pnlCtlrTitlex.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 2), -1, -1));
+        pnlCtlr.add(pnlCtlrTitlex, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, 1, null, null, null, 0, false));
         final JLabel label1 = new JLabel();
         Font label1Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label1.getFont());
         if (label1Font != null) label1.setFont(label1Font);
@@ -414,100 +235,74 @@ public class SubUI {
         label1.setHorizontalTextPosition(11);
         label1.setIcon(new ImageIcon(getClass().getResource("/static/image/controller.png")));
         label1.setText("제어기 정보");
-        pnlCtlrTitle.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        pnlCtlrTitlex.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         final Spacer spacer1 = new Spacer();
-        pnlCtlrTitle.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        final JLabel label2 = new JLabel();
-        Font label2Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label2.getFont());
-        if (label2Font != null) label2.setFont(label2Font);
-        label2.setText("제어기 전체: ");
-        pnlCtlrTitle.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label3 = new JLabel();
-        Font label3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label3.getFont());
-        if (label3Font != null) label3.setFont(label3Font);
-        label3.setText("통신 이상: ");
-        pnlCtlrTitle.add(label3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblTotal = new JLabel();
-        Font lblTotalFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblTotal.getFont());
-        if (lblTotalFont != null) lblTotal.setFont(lblTotalFont);
-        lblTotal.setHorizontalAlignment(0);
-        lblTotal.setHorizontalTextPosition(0);
-        lblTotal.setText("   -");
-        pnlCtlrTitle.add(lblTotal, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblError = new JLabel();
-        Font lblErrorFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblError.getFont());
-        if (lblErrorFont != null) lblError.setFont(lblErrorFont);
-        lblError.setForeground(new Color(-65536));
-        lblError.setHorizontalAlignment(0);
-        lblError.setHorizontalTextPosition(0);
-        lblError.setText("   -");
-        pnlCtlrTitle.add(lblError, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JScrollPane scrollPane1 = new JScrollPane();
-        pnlCtlr.add(scrollPane1, new GridConstraints(1, 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));
-        tblCtlrList = new JTable();
-        Font tblCtlrListFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tblCtlrList.getFont());
-        if (tblCtlrListFont != null) tblCtlrList.setFont(tblCtlrListFont);
-        scrollPane1.setViewportView(tblCtlrList);
+        pnlCtlrTitlex.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
         pnlControl = new JPanel();
-        pnlControl.setLayout(new GridLayoutManager(1, 8, new Insets(0, 0, 0, 2), 1, 1));
-        pnlCtlr.add(pnlControl, new GridConstraints(2, 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));
-        btnImage = new JButton();
-        Font btnImageFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnImage.getFont());
-        if (btnImageFont != null) btnImage.setFont(btnImageFont);
-        btnImage.setText("정지영상");
-        pnlControl.add(btnImage, new GridConstraints(0, 7, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer2 = new Spacer();
-        pnlControl.add(spacer2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnInitialize = new JButton();
-        Font btnInitializeFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnInitialize.getFont());
-        if (btnInitializeFont != null) btnInitialize.setFont(btnInitializeFont);
-        btnInitialize.setText("초기화");
-        pnlControl.add(btnInitialize, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnReset = new JButton();
-        Font btnResetFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnReset.getFont());
-        if (btnResetFont != null) btnReset.setFont(btnResetFont);
-        btnReset.setText("리셋");
-        pnlControl.add(btnReset, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        pnlControl.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 2), 1, 1));
+        pnlCtlr.add(pnlControl, 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, null, null, null, 0, false));
         btnDisconnect = new JButton();
         Font btnDisconnectFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnDisconnect.getFont());
         if (btnDisconnectFont != null) btnDisconnect.setFont(btnDisconnectFont);
         btnDisconnect.setText("연결끊기");
-        pnlControl.add(btnDisconnect, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        txtName = new JTextField();
-        txtName.setEditable(false);
-        Font txtNameFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtName.getFont());
-        if (txtNameFont != null) txtName.setFont(txtNameFont);
-        txtName.setHorizontalAlignment(2);
-        txtName.setText("제어기 명칭");
-        pnlControl.add(txtName, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(200, -1), new Dimension(200, -1), new Dimension(200, -1), 0, false));
+        pnlControl.add(btnDisconnect, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        final JPanel panel1 = new JPanel();
+        panel1.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
+        pnlControl.add(panel1, new GridConstraints(0, 0, 4, 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));
         txtId = new JTextField();
         txtId.setEditable(false);
         Font txtIdFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtId.getFont());
         if (txtIdFont != null) txtId.setFont(txtIdFont);
         txtId.setHorizontalAlignment(0);
         txtId.setText("ID");
-        pnlControl.add(txtId, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JLabel label4 = new JLabel();
-        Font label4Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label4.getFont());
-        if (label4Font != null) label4.setFont(label4Font);
-        label4.setIcon(new ImageIcon(getClass().getResource("/static/image/select.png")));
-        label4.setText("선택한 제어기 ");
-        pnlControl.add(label4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        panel1.add(txtId, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtName = new JTextField();
+        txtName.setEditable(false);
+        Font txtNameFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtName.getFont());
+        if (txtNameFont != null) txtName.setFont(txtNameFont);
+        txtName.setHorizontalAlignment(2);
+        txtName.setText("제어기 명칭");
+        panel1.add(txtName, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(200, -1), new Dimension(200, -1), new Dimension(200, -1), 0, false));
+        final JLabel label2 = new JLabel();
+        label2.setText("ㅣ관리번호");
+        panel1.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        textField1 = new JTextField();
+        panel1.add(textField1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
+        textField2 = new JTextField();
+        panel1.add(textField2, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
+        btnReset = new JButton();
+        Font btnResetFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnReset.getFont());
+        if (btnResetFont != null) btnReset.setFont(btnResetFont);
+        btnReset.setText("리셋");
+        pnlControl.add(btnReset, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnInitialize = new JButton();
+        Font btnInitializeFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnInitialize.getFont());
+        if (btnInitializeFont != null) btnInitialize.setFont(btnInitializeFont);
+        btnInitialize.setText("초기화");
+        pnlControl.add(btnInitialize, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnImage = new JButton();
+        Font btnImageFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnImage.getFont());
+        if (btnImageFont != null) btnImage.setFont(btnImageFont);
+        btnImage.setText("정지영상");
+        pnlControl.add(btnImage, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        final JPanel panel2 = new JPanel();
+        panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
+        pnlCtlr.add(panel2, new GridConstraints(1, 1, 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));
         pnlLog = new JPanel();
         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, 300), new Dimension(-1, 300), new Dimension(-1, 300), 0, false));
+        rootPanel.add(pnlLog, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
         pnlLogTitle = new JPanel();
         pnlLogTitle.setLayout(new GridLayoutManager(1, 6, 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 label5 = new JLabel();
-        Font label5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label5.getFont());
-        if (label5Font != null) label5.setFont(label5Font);
-        label5.setHorizontalAlignment(2);
-        label5.setIcon(new ImageIcon(getClass().getResource("/static/image/logging.png")));
-        label5.setText("시스템 로그");
-        pnlLogTitle.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer3 = new Spacer();
-        pnlLogTitle.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
+        final JLabel label3 = new JLabel();
+        Font label3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label3.getFont());
+        if (label3Font != null) label3.setFont(label3Font);
+        label3.setHorizontalAlignment(2);
+        label3.setIcon(new ImageIcon(getClass().getResource("/static/image/logging.png")));
+        label3.setText("제어기 로그");
+        pnlLogTitle.add(label3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        final Spacer spacer2 = new Spacer();
+        pnlLogTitle.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
         btnLogDirOpen = new JButton();
         Font btnLogDirOpenFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogDirOpen.getFont());
         if (btnLogDirOpenFont != null) btnLogDirOpen.setFont(btnLogDirOpenFont);
@@ -532,10 +327,10 @@ public class SubUI {
         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));
-        final JScrollPane scrollPane2 = new JScrollPane();
-        Font scrollPane2Font = this.$$$getFont$$$("D2Coding", Font.PLAIN, 12, scrollPane2.getFont());
-        if (scrollPane2Font != null) scrollPane2.setFont(scrollPane2Font);
-        pnlLog.add(scrollPane2, new GridConstraints(1, 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));
+        final JScrollPane scrollPane1 = new JScrollPane();
+        Font scrollPane1Font = this.$$$getFont$$$("D2Coding", Font.PLAIN, 12, scrollPane1.getFont());
+        if (scrollPane1Font != null) scrollPane1.setFont(scrollPane1Font);
+        pnlLog.add(scrollPane1, new GridConstraints(1, 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));
         taLog = new JTextArea();
         taLog.setBackground(new Color(-16777216));
         taLog.setCaretColor(new Color(-1));
@@ -545,51 +340,7 @@ public class SubUI {
         taLog.setForeground(new Color(-1));
         taLog.setMargin(new Insets(4, 4, 4, 4));
         taLog.setText("[10:50:08.561] [ INFO] ************************************************************************************\n[10:50:08.561] [ INFO] **                   Center Communication Server Information                      **\n[10:50:08.561] [ INFO] **     bindAddress: 0.0.0.0\n[10:50:08.561] [ INFO] **      listenPort: 9901\n[10:50:08.561] [ INFO] **         backlog: 1024\n[10:50:08.561] [ INFO] **   acceptThreads: 16\n[10:50:08.561] [ INFO] **   workerThreads: 16\n[10:50:08.561] [ INFO] ************************************************************************************\n");
-        scrollPane2.setViewportView(taLog);
-        pnlStatusBar = new JPanel();
-        pnlStatusBar.setLayout(new GridLayoutManager(1, 7, new Insets(0, 4, 4, 4), -1, -1));
-        rootPanel.add(pnlStatusBar, new GridConstraints(2, 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 Spacer spacer4 = new Spacer();
-        pnlStatusBar.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        lblSystime = new JLabel();
-        Font lblSystimeFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblSystime.getFont());
-        if (lblSystimeFont != null) lblSystime.setFont(lblSystimeFont);
-        lblSystime.setHorizontalAlignment(0);
-        lblSystime.setHorizontalTextPosition(0);
-        lblSystime.setText(" 2022-08-04 13:24:33 ");
-        pnlStatusBar.add(lblSystime, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label6 = new JLabel();
-        label6.setIcon(new ImageIcon(getClass().getResource("/static/image/on.png")));
-        label6.setText(" ");
-        pnlStatusBar.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblCpuRate = new JLabel();
-        Font lblCpuRateFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblCpuRate.getFont());
-        if (lblCpuRateFont != null) lblCpuRate.setFont(lblCpuRateFont);
-        lblCpuRate.setHorizontalAlignment(2);
-        lblCpuRate.setHorizontalTextPosition(0);
-        lblCpuRate.setText("    ");
-        pnlStatusBar.add(lblCpuRate, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        lblMemoryUsage = new JLabel();
-        Font lblMemoryUsageFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblMemoryUsage.getFont());
-        if (lblMemoryUsageFont != null) lblMemoryUsage.setFont(lblMemoryUsageFont);
-        lblMemoryUsage.setHorizontalAlignment(2);
-        lblMemoryUsage.setHorizontalTextPosition(0);
-        lblMemoryUsage.setText("    ");
-        pnlStatusBar.add(lblMemoryUsage, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        final JLabel label7 = new JLabel();
-        Font label7Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label7.getFont());
-        if (label7Font != null) label7.setFont(label7Font);
-        label7.setHorizontalAlignment(0);
-        label7.setHorizontalTextPosition(0);
-        label7.setText("  CPU 사용율(%):");
-        pnlStatusBar.add(label7, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label8 = new JLabel();
-        Font label8Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label8.getFont());
-        if (label8Font != null) label8.setFont(label8Font);
-        label8.setHorizontalAlignment(0);
-        label8.setHorizontalTextPosition(0);
-        label8.setText("  메모리 사용율(%):");
-        pnlStatusBar.add(label8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        scrollPane1.setViewportView(taLog);
     }
 
     /**

+ 37 - 0
src/main/java/com/its/vds/ui/SubUIController.java

@@ -0,0 +1,37 @@
+package com.its.vds.ui;
+
+import com.its.vds.entity.TbVdsCtlr;
+
+import javax.swing.*;
+import java.awt.*;
+
+public class SubUIController extends JFrame {
+    private SubUI view;
+    private JFrame caller;
+
+    public SubUIController(JFrame jFrame) {
+        super("제어기 정보");
+        String pathOfImage = "C:\\DEV\\ITS\\01.WINDOWS\\22.01.YONGIN\\JAVA\\vds-comm-server\\src\\main\\resources\\static\\image\\application.png";
+        setIconImage(Toolkit.getDefaultToolkit().getImage(pathOfImage));
+        this.caller = jFrame;
+        this.view = new SubUI() {
+            @Override
+            protected void actionButtonClicked() {
+                doAction();
+            }
+        };
+        this.setContentPane(view.$$$getRootComponent$$$());
+        this.setDefaultCloseOperation(HIDE_ON_CLOSE);
+        this.pack();
+    }
+
+    private void doAction() {
+        this.view.updateInfo(null);
+        this.setVisible(false);
+        caller.validate();
+    }
+
+    public void updateInfo(TbVdsCtlr selObj) {
+        this.view.updateInfo(selObj);
+    }
+}

+ 0 - 33
src/main/java/com/its/vds/ui/ui/CtlrSttsDetlTableCellRenderer.java

@@ -1,33 +0,0 @@
-package com.its.vds.ui.ui;
-
-import javax.swing.*;
-import javax.swing.table.DefaultTableCellRenderer;
-import java.awt.*;
-
-public class CtlrSttsDetlTableCellRenderer extends DefaultTableCellRenderer {
-
-    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
-
-        Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
-        String commStts = table.getModel().getValueAt(row, 6).toString();
-        if (commStts.equals("Connect")) {
-            cell.setBackground(new Color(255, 255, 255, 255));
-            String door = table.getModel().getValueAt(row, 7).toString();
-            String fan = table.getModel().getValueAt(row, 8).toString();
-            String heater = table.getModel().getValueAt(row, 9).toString();
-            String video = table.getModel().getValueAt(row, 11).toString();
-        } else if (commStts.equals("Login")) {
-            cell.setBackground(new Color(182, 175, 97, 176));
-        } else {
-            cell.setBackground(new Color(182, 97, 97, 176));
-        }
-
-        if (column != 3 && column != 4) {
-            setHorizontalAlignment(SwingConstants.CENTER);
-        } else {
-            setHorizontalAlignment(SwingConstants.LEFT);
-        }
-
-        return cell;
-    }
-}

+ 0 - 60
src/main/java/com/its/vds/ui/ui/CtlrSttsTableCellRenderer.java

@@ -1,60 +0,0 @@
-package com.its.vds.ui.ui;
-
-import javax.swing.*;
-import javax.swing.table.DefaultTableCellRenderer;
-import java.awt.*;
-
-public class CtlrSttsTableCellRenderer extends DefaultTableCellRenderer {
-
-    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
-
-        Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
-        String commStts = table.getModel().getValueAt(row, 6).toString();
-        if (commStts.equals("Connect")) {
-            cell.setBackground(new Color(255, 255, 255, 255));
-            if (column == 7) {
-                String door = table.getModel().getValueAt(row, 7).toString();
-                if (door.equals("열림")) {
-                    cell.setBackground(new Color(255, 0, 0, 176));
-                    cell.setForeground(new Color(255, 255, 255, 255));
-                }
-            }
-            if (column == 8) {
-                String fan = table.getModel().getValueAt(row, 8).toString();
-                if (fan.equals("가동")) {
-                    cell.setBackground(new Color(255, 213, 0, 250));
-                    cell.setForeground(new Color(0, 0, 0, 255));
-                }
-            }
-            if (column == 9) {
-                String heater = table.getModel().getValueAt(row, 9).toString();
-                if (heater.equals("가동")) {
-                    cell.setBackground(new Color(255, 213, 0, 250));
-                    cell.setForeground(new Color(0, 0, 0, 255));
-                }
-            }
-            if (column == 11) {
-                String video = table.getModel().getValueAt(row, 11).toString();
-                if (video.equals("이상")) {
-                    cell.setBackground(new Color(255, 213, 0, 250));
-                    cell.setForeground(new Color(0, 0, 0, 255));
-                }
-            }
-        } else if (commStts.equals("Login")) {
-            cell.setBackground(new Color(182, 175, 97, 176));
-        } else {
-            cell.setBackground(new Color(182, 97, 97, 176));
-        }
-
-        if (column != 3 && column != 4) {
-            setHorizontalAlignment(SwingConstants.CENTER);
-        } else {
-            setHorizontalAlignment(SwingConstants.LEFT);
-        }
-        if (column == 0) {
-            cell.setBackground(Color.LIGHT_GRAY);
-        }
-
-        return cell;
-    }
-}

+ 0 - 192
src/main/java/com/its/vds/ui/ui/CtlrSttsTableModel.java

@@ -1,192 +0,0 @@
-package com.its.vds.ui.ui;
-
-import com.its.vds.entity.TbVdsCtlr;
-import com.its.vds.entity.TbVdsCtlrStts;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.swing.table.AbstractTableModel;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-@Slf4j
-public class CtlrSttsTableModel extends AbstractTableModel {
-    private static final long serialVersionUID = 1331132425472559704L;
-
-    private List<TbVdsCtlr> ctlrList = Collections.synchronizedList(new ArrayList<TbVdsCtlr>());
-    private final String[] columnNames = {
-            "#",
-            "번호",
-            "시설물ID",
-            "명칭",
-            "IP",
-            "PORT",
-            "연결상태",
-            "도어",
-            "팬",
-            "히터",
-            "온도",
-            "영상",
-            "연결 시각",
-            "연결종료 시각"
-    };
-    public static final String[] netStateStr = {
-            "Close", "Login", "Connect",
-    };
-
-    public CtlrSttsTableModel(List<TbVdsCtlr> ctlrList) {
-        this.ctlrList = ctlrList;
-
-        int indexCount = 1;
-        for (TbVdsCtlr obj : ctlrList) {
-            obj.setIndex(indexCount++);
-        }
-    }
-
-    @Override
-    public int getColumnCount() {
-        return columnNames.length;
-    }
-
-    @Override
-    public int getRowCount() {
-        int size = 0;
-        synchronized (this.ctlrList) {
-            size = this.ctlrList.size();
-        }
-        return size;
-    }
-
-    @Override
-    public String getColumnName(int columnIndex) {
-        if (columnIndex < columnNames.length) {
-            return columnNames[columnIndex];
-        }
-        return super.getColumnName(columnIndex);
-    }
-
-    @Override
-    public Class<?> getColumnClass(int columnIndex) {
-        if (ctlrList.isEmpty()) {
-            return Object.class;
-        }
-        return getValueAt(0, columnIndex).getClass();
-    }
-
-    public TbVdsCtlr getControllerInfo(int row) {
-        TbVdsCtlr info = this.ctlrList.get(row);
-        return info;
-    }
-
-    @Override
-    public Object getValueAt(int rowIndex, int columnIndex) {
-        Object returnValue = null;
-        synchronized (this.ctlrList) {
-            TbVdsCtlr info = this.ctlrList.get(rowIndex);
-            if (info == null) {
-                return "";
-            }
-
-            int netState = info.getNetState();
-            TbVdsCtlrStts stts = info.getStts();
-            String door = "-";
-            String fan = "-";
-            String heater = "-";
-            String temper = "-";
-            String video = "-";
-            if ("CMS0".equals(stts.getCMNC_STTS_CD())) {
-                door = "-?-";
-                fan = "-?-";
-                heater = "-?-";
-                temper = "-?-";
-                video = "-?-";
-                if (stts.getCBOX_DOOR_STTS_CD().equals("CDS0")) {
-                    door = "닫힘";
-                } else if (stts.getCBOX_DOOR_STTS_CD().equals("CDS1")) {
-                    door = "열림";
-                }
-                if (stts.getFAN_STTS_CD().equals("PAS0")) {
-                    fan = "가동";
-                } else if (stts.getFAN_STTS_CD().equals("PAS1")) {
-                    fan = "중지";
-                }
-                if (stts.getHETR_STTS_CD().equals("HTS0")) {
-                    heater = "가동";
-                } else if (stts.getHETR_STTS_CD().equals("HTS1")) {
-                    heater = "중지";
-                }
-                if (stts.getVIDEO_INPUT().equals("VDI0")) {
-                    video = "정상";
-                } else if (stts.getHETR_STTS_CD().equals("VDI1")) {
-                    video = "이상";
-                }
-                temper = String.valueOf(stts.getCBOX_TMPR());
-            }
-            switch (columnIndex) {
-                case 0:
-                    returnValue = info.getIndex();
-                    break;
-                case 1:
-                    returnValue = info.getVDS_CTLR_NMBR();
-                    break;
-                case 2:
-                    returnValue = info.getVDS_CTLR_ID();
-                    break;
-                case 3:
-                    returnValue = info.getVDS_NM();
-                    break;
-                case 4:
-                    returnValue = info.getVDS_CTLR_IP();
-                    break;
-                case 5:
-                    returnValue = String.valueOf(info.getVDS_CTLR_PORT());
-                    break;
-                case 6:
-                    returnValue = netStateStr[netState];
-                    break;
-                case  7: returnValue = door; break;
-                case  8: returnValue = fan; break;
-                case  9: returnValue = heater; break;
-                case 10: returnValue = temper; break;
-                case 11: returnValue = video; break;
-                case 12:
-                    returnValue = info.getConnectTm();
-                    break;
-                case 13:
-                    returnValue = info.getDisConnectTm();
-                    break;
-            }
-        }
-        return returnValue;
-    }
-
-    @Override
-    public void setValueAt(Object value, int rowIndex, int columnIndex) {
-        synchronized (this.ctlrList) {
-            TbVdsCtlr obj = ctlrList.get(rowIndex);
-            if (columnIndex == 0) {
-                obj.setIndex((int) value);
-            }
-        }
-    }
-    public void setValueAt(TbVdsCtlr obj, int rowIdx, int colIdx) {
-        synchronized (this.ctlrList) {
-        }
-        fireTableCellUpdated(rowIdx, colIdx);
-        fireTableDataChanged();
-    }
-
-    public void Add(TbVdsCtlr info) {
-        int index = 0;
-        synchronized (this.ctlrList) {
-            index = this.ctlrList.size();
-            this.ctlrList.add(info);
-        }
-        fireTableRowsInserted(index, index);
-    }
-
-    public void setValue(TbVdsCtlr obj, int viewRow, int modelRow) {
-        fireTableDataChanged();
-    }
-
-}

+ 0 - 66
src/main/java/com/its/vds/ui/ui/JTextAreaOutputStream.java

@@ -1,66 +0,0 @@
-package com.its.vds.ui.ui;
-
-import javax.swing.*;
-import javax.swing.text.BadLocationException;
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class JTextAreaOutputStream extends OutputStream {
-
-    private final JTextArea logArea;
-    public static boolean isLoggingPause = false;
-
-    public JTextAreaOutputStream(JTextArea logArea) {
-        if (logArea == null)
-            throw new IllegalArgumentException ("Destination is null...");
-        this.logArea = logArea;
-    }
-
-    public synchronized void logWrite(String text) {
-        Runnable  runnable = new Runnable() {
-            public void run() {
-                logArea.append(text);
-                if (logArea.getDocument().getLength() >
-                        50000) {
-                    try {
-                        logArea.getDocument().remove(0, 5000);
-                    } catch (BadLocationException e) {
-                        //log.error("Can't clean log", e);
-                    }
-                }
-                logArea.setCaretPosition(logArea.getDocument().getLength());
-            }
-        };
-        SwingUtilities.invokeLater(runnable);
-    }
-
-    @Override
-    public void write(byte[] buffer, int offset, int length) throws IOException
-    {
-        if (isLoggingPause) {
-            return;
-        }
-
-        final String text = new String(buffer, offset, length);
-        //logWrite(text);
-        SwingUtilities.invokeLater(new Runnable ()
-        {
-            @Override
-            public void run()
-            {
-                synchronized (logArea) {
-                    if (logArea.getLineCount() > 2000) {
-                        logArea.setText(null);
-                    }
-                    logArea.append(text);
-                    logArea.setCaretPosition(logArea.getDocument().getLength());
-                }
-            }
-        });
-    }
-
-    @Override
-    public void write(int b) throws IOException {
-        write (new byte [] {(byte)b}, 0, 1);
-    }
-}

+ 0 - 387
src/main/java/com/its/vds/ui/ui/MainUI.form

@@ -1,387 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.its.vds.ui.MainUI">
-  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-    <margin top="0" left="0" bottom="0" right="0"/>
-    <constraints>
-      <xy x="20" y="20" width="979" height="620"/>
-    </constraints>
-    <properties/>
-    <border type="none"/>
-    <children>
-      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="10" left="4" bottom="0" right="4"/>
-        <constraints>
-          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <grid id="d1b2f" binding="pnlCtlrTitle" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="25222" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <horizontalTextPosition value="11"/>
-                  <icon value="static/image/controller.png"/>
-                  <text value="제어기 정보"/>
-                </properties>
-              </component>
-              <hspacer id="e90f6">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="c9b9" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="제어기 전체: "/>
-                </properties>
-              </component>
-              <component id="20b88" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="통신 이상: "/>
-                </properties>
-              </component>
-              <component id="baf10" class="javax.swing.JLabel" binding="lblTotal">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
-              <component id="1c841" class="javax.swing.JLabel" binding="lblError">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <foreground color="-65536"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-          <scrollpane id="b21be">
-            <constraints>
-              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="a0dd1" class="javax.swing.JTable" binding="tblCtlrList">
-                <constraints/>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                </properties>
-              </component>
-            </children>
-          </scrollpane>
-          <grid id="17544" binding="pnlControl" layout-manager="GridLayoutManager" row-count="1" column-count="8" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="660a8" class="javax.swing.JButton" binding="btnImage">
-                <constraints>
-                  <grid row="0" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="정지영상"/>
-                </properties>
-              </component>
-              <hspacer id="60c19">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="3d84f" class="javax.swing.JButton" binding="btnInitialize">
-                <constraints>
-                  <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="초기화"/>
-                </properties>
-              </component>
-              <component id="7c99b" class="javax.swing.JButton" binding="btnReset">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="리셋"/>
-                </properties>
-              </component>
-              <component id="a85f9" class="javax.swing.JButton" binding="btnDisconnect">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="연결끊기"/>
-                </properties>
-              </component>
-              <component id="a6a03" class="javax.swing.JTextField" binding="txtName">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="200" height="-1"/>
-                    <preferred-size width="200" height="-1"/>
-                    <maximum-size width="200" height="-1"/>
-                  </grid>
-                </constraints>
-                <properties>
-                  <editable value="false"/>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <text value="제어기 명칭"/>
-                </properties>
-              </component>
-              <component id="6d1e0" class="javax.swing.JTextField" binding="txtId">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="100" height="-1"/>
-                    <preferred-size width="100" height="-1"/>
-                    <maximum-size width="100" height="-1"/>
-                  </grid>
-                </constraints>
-                <properties>
-                  <editable value="false"/>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="0"/>
-                  <text value="ID"/>
-                </properties>
-              </component>
-              <component id="7eb53" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <icon value="static/image/select.png"/>
-                  <text value="선택한 제어기 "/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-        </children>
-      </grid>
-      <grid id="1a658" binding="pnlLog" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="4" bottom="0" right="4"/>
-        <constraints>
-          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
-            <minimum-size width="-1" height="300"/>
-            <preferred-size width="-1" height="300"/>
-            <maximum-size width="-1" height="300"/>
-          </grid>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <grid id="dbb05" binding="pnlLogTitle" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="9ac90" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <icon value="static/image/logging.png"/>
-                  <text value="시스템 로그"/>
-                </properties>
-              </component>
-              <hspacer id="656fd">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="df2a0" class="javax.swing.JButton" binding="btnLogDirOpen">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="로그 폴더"/>
-                </properties>
-              </component>
-              <component id="69a98" class="javax.swing.JButton" binding="btnLogPause">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="지우기"/>
-                </properties>
-              </component>
-              <component id="1e9e7" class="javax.swing.JCheckBox" binding="chkLogPause">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="11"/>
-                  <text value="멈춤"/>
-                </properties>
-              </component>
-              <component id="ba97c" class="javax.swing.JButton" binding="btnLogCopy">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="복사"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-          <scrollpane id="a6866">
-            <constraints>
-              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="D2Coding" size="12" style="0"/>
-            </properties>
-            <border type="none"/>
-            <children>
-              <component id="8ce8a" class="javax.swing.JTextArea" binding="taLog">
-                <constraints/>
-                <properties>
-                  <background color="-16777216"/>
-                  <caretColor color="-1"/>
-                  <editable value="false"/>
-                  <font name="D2Coding" size="14" style="0"/>
-                  <foreground color="-1"/>
-                  <margin top="4" left="4" bottom="4" right="4"/>
-                  <text value="[10:50:08.561] [ INFO] ************************************************************************************&#10;[10:50:08.561] [ INFO] **                   Center Communication Server Information                      **&#10;[10:50:08.561] [ INFO] **     bindAddress: 0.0.0.0&#10;[10:50:08.561] [ INFO] **      listenPort: 9901&#10;[10:50:08.561] [ INFO] **         backlog: 1024&#10;[10:50:08.561] [ INFO] **   acceptThreads: 16&#10;[10:50:08.561] [ INFO] **   workerThreads: 16&#10;[10:50:08.561] [ INFO] ************************************************************************************&#10;"/>
-                </properties>
-              </component>
-            </children>
-          </scrollpane>
-        </children>
-      </grid>
-      <grid id="e0774" binding="pnlStatusBar" layout-manager="GridLayoutManager" row-count="1" column-count="7" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="4" bottom="4" right="4"/>
-        <constraints>
-          <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <hspacer id="653ec">
-            <constraints>
-              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-            </constraints>
-          </hspacer>
-          <component id="20f9" class="javax.swing.JLabel" binding="lblSystime">
-            <constraints>
-              <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value=" 2022-08-04 13:24:33 "/>
-            </properties>
-          </component>
-          <component id="a516b" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <icon value="static/image/on.png"/>
-              <text value=" "/>
-            </properties>
-          </component>
-          <component id="94189" class="javax.swing.JLabel" binding="lblCpuRate">
-            <constraints>
-              <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="19dbe" class="javax.swing.JLabel" binding="lblMemoryUsage">
-            <constraints>
-              <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="f6d5e" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  CPU 사용율(%):"/>
-            </properties>
-          </component>
-          <component id="d8ff5" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  메모리 사용율(%):"/>
-            </properties>
-          </component>
-        </children>
-      </grid>
-    </children>
-  </grid>
-</form>

+ 0 - 624
src/main/java/com/its/vds/ui/ui/MainUI.java

@@ -1,624 +0,0 @@
-package com.its.vds.ui.ui;
-
-import com.intellij.uiDesigner.core.GridConstraints;
-import com.intellij.uiDesigner.core.GridLayoutManager;
-import com.intellij.uiDesigner.core.Spacer;
-import com.its.app.utils.SysUtils;
-import com.its.vds.domain.NET;
-import com.its.vds.entity.TbVdsCtlr;
-import com.its.vds.global.AppRepository;
-import com.its.vds.service.VdsCtlrService;
-import com.sun.management.OperatingSystemMXBean;
-import lombok.Getter;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-
-import javax.swing.Timer;
-import javax.swing.*;
-import javax.swing.border.MatteBorder;
-import javax.swing.plaf.FontUIResource;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableColumnModel;
-import javax.swing.text.StyleContext;
-import java.awt.*;
-import java.awt.datatransfer.Clipboard;
-import java.awt.datatransfer.StringSelection;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-import java.util.*;
-
-@Slf4j
-@Getter
-public class MainUI {
-    private static MainUI _instance = null;
-    private VdsCtlrService vdsCtlrService = null;
-    OperatingSystemMXBean osBean = null;
-    private Timer timer;
-    private Long tick = Long.valueOf(0);
-    private TbVdsCtlr selObj = null;
-
-    private CtlrSttsTableModel ctlrSttsTableModel;
-    private TableCellRenderer cellRenderer = new CtlrSttsTableCellRenderer();
-
-    private JPanel rootPanel;
-    private JPanel pnlCtlr;
-    private JPanel pnlLog;
-    private JPanel pnlLogTitle;
-    private JPanel pnlCtlrTitle;
-    private JButton btnLogDirOpen;
-    private JButton btnLogPause;
-    private JCheckBox chkLogPause;
-    private JLabel lblSystime;
-    private JPanel pnlStatusBar;
-    private JTable tblCtlrList;
-    private JTextArea taLog;
-    private JButton btnLogCopy;
-    private JLabel lblTotal;
-    private JLabel lblError;
-    private JLabel lblCpuRate;
-    private JLabel lblMemoryUsage;
-    private JPanel pnlControl;
-    private JButton btnImage;
-    private JButton btnInitialize;
-    private JButton btnReset;
-    private JButton btnDisconnect;
-    private JTextField txtName;
-    private JTextField txtId;
-
-    public static MainUI getInstance() {
-        return _instance;
-    }
-
-    public void displaySystime() {
-        lblSystime.setText(" " + SysUtils.getSysTimeStr() + "  ");
-        updateCommSttsTotal();
-    }
-
-    public void displayResource() {
-        long memoryUsage = Math.round(((double) (osBean.getTotalPhysicalMemorySize() - osBean.getFreePhysicalMemorySize())) / (double) osBean.getTotalPhysicalMemorySize() * 100.0);
-        lblMemoryUsage.setText(String.valueOf(memoryUsage));
-        double cpuLoad = osBean.getSystemCpuLoad();
-        lblCpuRate.setText(String.valueOf(Math.round(cpuLoad * 100.0)));
-    }
-
-    public MainUI() {
-        System.setProperty("awt.useSystemAAFontSettings", "false"); // AntiAliasing false
-
-        if (_instance == null) {
-            _instance = this;
-        }
-        osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
-        try {
-            Font font = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/D2Coding.ttc"));
-            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-            ge.registerFont(font);
-        } catch (FontFormatException e) {
-        } catch (IOException e) {
-        }
-
-        //taLog.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
-        Font d2font = new Font("D2Coding", Font.PLAIN, 14);
-        if (d2font != null) {
-            taLog.setFont(d2font);
-        }
-
-//        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-//        String fontNames[] = ge.getAvailableFontFamilyNames();
-//        for (int ii = 0; ii < fontNames.length; ii++) {
-//            log.error("GraphicsEnvironment Fonts: {}", fontNames[ii]);
-//        }
-//        final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
-//        for (Font font : fonts) {
-//            log.error("FONTS: {}", font);
-//        }
-
-        displaySystime();
-        displayResource();
-        timer = new Timer(1000, new ActionListener() {
-            public void actionPerformed(ActionEvent evt) {
-                displaySystime();
-                tick++;
-                if (tick % 5 == 0) {
-                    displayResource();
-                }
-            }
-        });
-        timer.start();
-
-        chkLogPause.setFocusable(false);
-        btnLogPause.setFocusable(false);
-        btnLogDirOpen.setFocusable(false);
-        btnLogCopy.setFocusable(false);
-
-        //initTblListUI();
-
-        btnLogPause.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                taLog.setText(null);
-            }
-        });
-        btnLogDirOpen.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                Runtime rt = Runtime.getRuntime();
-                try {
-                    rt.exec("explorer.exe logs");
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-        });
-        chkLogPause.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                JTextAreaOutputStream.isLoggingPause = chkLogPause.isSelected();
-            }
-        });
-        btnLogCopy.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                StringSelection stringSelection = new StringSelection(taLog.getText());
-                Clipboard clpBrd = Toolkit.getDefaultToolkit().getSystemClipboard();
-                clpBrd.setContents(stringSelection, null);
-            }
-        });
-
-        tblCtlrList.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent me) {
-                // double click
-                if (me.getClickCount() == 2) {
-                    updateControllerInfo();
-
-                }
-            }
-        });
-        btnDisconnect.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(1);
-            }
-        });
-        btnReset.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(2);
-            }
-        });
-        btnInitialize.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(3);
-            }
-        });
-        btnImage.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(4);
-            }
-        });
-    }
-
-    /**
-     * 제어기 명령 처리
-     *
-     * @param type
-     */
-    public void controlController(int type) {
-        if (selObj == null) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 선택되지 않았습니다. 목록을 더블클릭하여 제어기를 선택하세요.", "제어기 선택", JOptionPane.ERROR_MESSAGE);
-            return;
-        }
-        if (selObj.getNetState() == NET.CLOSED) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
-            return;
-        }
-        String message, title;
-        switch (type) {
-            case 1:
-                message = "제어기와의 연결을 종료 하시겠습니까?";
-                title = "제어기 연결 종료";
-                break;
-            case 2:
-                message = "제어기를 리셋 하시겠습니까?";
-                title = "제어기 리셋";
-                break;
-            case 3:
-                message = "제어기를 초기화 하시겠습니까?";
-                title = "제어기 초기화";
-                break;
-            case 4:
-                message = "제어기의 정지영상 정보를 요청하시겠습니까?";
-                title = "제어기 정지영상 요청";
-                break;
-            default:
-                return;
-        }
-        if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
-            return;
-        }
-
-        boolean result = false;
-        switch (type) {
-            case 1:
-                result = selObj.channelClose();
-                break;
-            case 2:
-                result = selObj.reset();
-                break;
-            case 3:
-                result = selObj.initialize();
-                break;
-            case 4:
-                result = selObj.stopImage((byte) 0x01);
-                break;
-            default:
-                return;
-        }
-        if (!result) {
-            JOptionPane.showMessageDialog(getRootPanel(), "명령 전송이 실패 하였습니다.", title, JOptionPane.ERROR_MESSAGE);
-        }
-    }
-
-    public void updateControllerInfo() {
-        int row = tblCtlrList.getSelectedRow();
-        if (row < 0) {
-            return;
-        }
-
-        txtId.setText("");
-        txtName.setText("");
-        CtlrSttsTableModel tableModel = (CtlrSttsTableModel) tblCtlrList.getModel();
-        selObj = tableModel.getControllerInfo(row);
-        if (selObj != null) {
-            txtId.setText(selObj.getVDS_CTLR_ID());
-            txtName.setText(selObj.getVDS_NM());
-        }
-    }
-
-    /**
-     * 목록 헤더 생성
-     */
-    private void initTblListUI(List<TbVdsCtlr> ctlrList) {
-
-        tblCtlrList.getTableHeader().setOpaque(false);
-        tblCtlrList.getTableHeader().setBackground(Color.LIGHT_GRAY);
-        tblCtlrList.setRowMargin(1);
-        //tblCtlrList.setGridColor(Color.LIGHT_GRAY);
-        tblCtlrList.setRowHeight(tblCtlrList.getRowHeight() + 5);
-        //tblCtlrList.setRowSelectionAllowed(true);
-        //tblCtlrList.setColumnSelectionAllowed(false);
-
-        ctlrSttsTableModel = new CtlrSttsTableModel(ctlrList);
-        tblCtlrList.setModel(ctlrSttsTableModel);
-        tblCtlrList.setBackground(Color.WHITE);
-        tblCtlrList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-        //tblCtlrList.setAutoCreateRowSorter(true); // sorting
-
-        //tblCtlrList.addMouseListener(new ListMouseListener(null));
-
-        TableColumnModel getColumnModel = tblCtlrList.getColumnModel();
-        getColumnModel.getColumn(0).setPreferredWidth(30);  //  "S",
-        getColumnModel.getColumn(1).setPreferredWidth(75);  //  "번호",
-        getColumnModel.getColumn(2).setPreferredWidth(75);  //  "시설물ID",
-        getColumnModel.getColumn(3).setPreferredWidth(260); //  "명칭",
-        getColumnModel.getColumn(4).setPreferredWidth(120); //  "IP",
-        getColumnModel.getColumn(5).setPreferredWidth(55);  //  "PORT",
-        getColumnModel.getColumn(6).setPreferredWidth(70);  //  "연결상태",
-        getColumnModel.getColumn(7).setPreferredWidth(50);  //  "도어",
-        getColumnModel.getColumn(8).setPreferredWidth(50);  //  "팬",
-        getColumnModel.getColumn(9).setPreferredWidth(50);  //  "히터",
-        getColumnModel.getColumn(10).setPreferredWidth(50);  //  "온도",
-        getColumnModel.getColumn(11).setPreferredWidth(50); //  "Video",
-        getColumnModel.getColumn(12).setPreferredWidth(120);
-        getColumnModel.getColumn(13).setPreferredWidth(120);
-        getColumnModel.getColumn(0).setMaxWidth(30);
-        getColumnModel.getColumn(0).setMinWidth(30);
-        getColumnModel.getColumn(0).setResizable(false);
-        Color color = UIManager.getColor("Table.gridColor");
-        MatteBorder border = new MatteBorder(1, 1, 0, 0, color);
-        tblCtlrList.setBorder(border);
-
-        DefaultTableCellRenderer centerAlign = new DefaultTableCellRenderer();
-        centerAlign.setHorizontalAlignment(JLabel.CENTER);
-        for (int ii = 0; ii < getColumnModel.getColumnCount(); ii++) {
-            getColumnModel.getColumn(ii).setCellRenderer(cellRenderer);
-        }
-    }
-
-    public void updateCommSttsTotal() {
-        int ctlrTotal = 0;
-        int ctlrError = 0;
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrTotal++;
-                if (!"CMS0".equals(obj.getStts().getCMNC_STTS_CD())) {
-                    ctlrError++;
-                }
-            }
-        }
-        lblTotal.setText(" " + ctlrTotal + " ");
-        lblError.setText(" " + ctlrError + " ");
-    }
-
-    public void LoadControllerInfo(VdsCtlrService vdsCtlrService) {
-        this.vdsCtlrService = vdsCtlrService;
-
-        SortedMap<Integer, TbVdsCtlr> ctlrMap = new TreeMap<>();
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrMap.put(Integer.valueOf(obj.getVDS_CTLR_NMBR()), obj);
-            }
-        }
-        List<TbVdsCtlr> ctlrList = new ArrayList<TbVdsCtlr>(ctlrMap.values());
-        initTblListUI(ctlrList);
-//        for (Map.Entry<Integer, TbVdsCtlr> e : ctlrMap.entrySet()) {
-//            TbVdsCtlr obj = e.getValue();
-//            ctlrSttsTableModel.Add(obj);
-//        }
-        updateCommSttsTotal();
-    }
-
-    public void updateCtlrStts(TbVdsCtlr obj) {
-
-        //CtlrSttsTableModel ctlrSttsTableModel = (CtlrSttsTableModel)tblCtlrList.getModel();
-        for (int ii = 0; ii < ctlrSttsTableModel.getRowCount(); ii++) {
-            if (obj.getVDS_CTLR_ID().equals(ctlrSttsTableModel.getValueAt(ii, 2).toString())) {
-                int modelRow = tblCtlrList.convertRowIndexToModel(ii);
-//                //int viewColumn = tblCtlrList.getSelectedColumn();
-//                int modelColumn = tblCtlrList.convertColumnIndexToModel(4);
-//                Object cell = tblCtlrList.getValueAt(modelRow, modelColumn);
-//                log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: {}", cell);
-                ctlrSttsTableModel.setValue(obj, ii, modelRow);
-                break;
-            }
-        }
-    }
-
-    {
-// GUI initializer generated by IntelliJ IDEA GUI Designer
-// >>> IMPORTANT!! <<<
-// DO NOT EDIT OR ADD ANY CODE HERE!
-        $$$setupUI$$$();
-    }
-
-    /**
-     * Method generated by IntelliJ IDEA GUI Designer
-     * >>> IMPORTANT!! <<<
-     * DO NOT edit this method OR call it in your code!
-     *
-     * @noinspection ALL
-     */
-    private void $$$setupUI$$$() {
-        rootPanel = new JPanel();
-        rootPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
-        pnlCtlr = new JPanel();
-        pnlCtlr.setLayout(new GridLayoutManager(3, 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));
-        pnlCtlrTitle = new JPanel();
-        pnlCtlrTitle.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 2), -1, -1));
-        pnlCtlr.add(pnlCtlrTitle, 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());
-        if (label1Font != null) label1.setFont(label1Font);
-        label1.setHorizontalAlignment(2);
-        label1.setHorizontalTextPosition(11);
-        label1.setIcon(new ImageIcon(getClass().getResource("/static/image/controller.png")));
-        label1.setText("제어기 정보");
-        pnlCtlrTitle.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer1 = new Spacer();
-        pnlCtlrTitle.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        final JLabel label2 = new JLabel();
-        Font label2Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label2.getFont());
-        if (label2Font != null) label2.setFont(label2Font);
-        label2.setText("제어기 전체: ");
-        pnlCtlrTitle.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label3 = new JLabel();
-        Font label3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label3.getFont());
-        if (label3Font != null) label3.setFont(label3Font);
-        label3.setText("통신 이상: ");
-        pnlCtlrTitle.add(label3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblTotal = new JLabel();
-        Font lblTotalFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblTotal.getFont());
-        if (lblTotalFont != null) lblTotal.setFont(lblTotalFont);
-        lblTotal.setHorizontalAlignment(0);
-        lblTotal.setHorizontalTextPosition(0);
-        lblTotal.setText("   -");
-        pnlCtlrTitle.add(lblTotal, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblError = new JLabel();
-        Font lblErrorFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblError.getFont());
-        if (lblErrorFont != null) lblError.setFont(lblErrorFont);
-        lblError.setForeground(new Color(-65536));
-        lblError.setHorizontalAlignment(0);
-        lblError.setHorizontalTextPosition(0);
-        lblError.setText("   -");
-        pnlCtlrTitle.add(lblError, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JScrollPane scrollPane1 = new JScrollPane();
-        pnlCtlr.add(scrollPane1, new GridConstraints(1, 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));
-        tblCtlrList = new JTable();
-        Font tblCtlrListFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tblCtlrList.getFont());
-        if (tblCtlrListFont != null) tblCtlrList.setFont(tblCtlrListFont);
-        scrollPane1.setViewportView(tblCtlrList);
-        pnlControl = new JPanel();
-        pnlControl.setLayout(new GridLayoutManager(1, 8, new Insets(0, 0, 0, 2), 1, 1));
-        pnlCtlr.add(pnlControl, new GridConstraints(2, 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));
-        btnImage = new JButton();
-        Font btnImageFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnImage.getFont());
-        if (btnImageFont != null) btnImage.setFont(btnImageFont);
-        btnImage.setText("정지영상");
-        pnlControl.add(btnImage, new GridConstraints(0, 7, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer2 = new Spacer();
-        pnlControl.add(spacer2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnInitialize = new JButton();
-        Font btnInitializeFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnInitialize.getFont());
-        if (btnInitializeFont != null) btnInitialize.setFont(btnInitializeFont);
-        btnInitialize.setText("초기화");
-        pnlControl.add(btnInitialize, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnReset = new JButton();
-        Font btnResetFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnReset.getFont());
-        if (btnResetFont != null) btnReset.setFont(btnResetFont);
-        btnReset.setText("리셋");
-        pnlControl.add(btnReset, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnDisconnect = new JButton();
-        Font btnDisconnectFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnDisconnect.getFont());
-        if (btnDisconnectFont != null) btnDisconnect.setFont(btnDisconnectFont);
-        btnDisconnect.setText("연결끊기");
-        pnlControl.add(btnDisconnect, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        txtName = new JTextField();
-        txtName.setEditable(false);
-        Font txtNameFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtName.getFont());
-        if (txtNameFont != null) txtName.setFont(txtNameFont);
-        txtName.setHorizontalAlignment(2);
-        txtName.setText("제어기 명칭");
-        pnlControl.add(txtName, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(200, -1), new Dimension(200, -1), new Dimension(200, -1), 0, false));
-        txtId = new JTextField();
-        txtId.setEditable(false);
-        Font txtIdFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtId.getFont());
-        if (txtIdFont != null) txtId.setFont(txtIdFont);
-        txtId.setHorizontalAlignment(0);
-        txtId.setText("ID");
-        pnlControl.add(txtId, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JLabel label4 = new JLabel();
-        Font label4Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label4.getFont());
-        if (label4Font != null) label4.setFont(label4Font);
-        label4.setIcon(new ImageIcon(getClass().getResource("/static/image/select.png")));
-        label4.setText("선택한 제어기 ");
-        pnlControl.add(label4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        pnlLog = new JPanel();
-        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, 300), new Dimension(-1, 300), new Dimension(-1, 300), 0, false));
-        pnlLogTitle = new JPanel();
-        pnlLogTitle.setLayout(new GridLayoutManager(1, 6, 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 label5 = new JLabel();
-        Font label5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label5.getFont());
-        if (label5Font != null) label5.setFont(label5Font);
-        label5.setHorizontalAlignment(2);
-        label5.setIcon(new ImageIcon(getClass().getResource("/static/image/logging.png")));
-        label5.setText("시스템 로그");
-        pnlLogTitle.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer3 = new Spacer();
-        pnlLogTitle.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnLogDirOpen = new JButton();
-        Font btnLogDirOpenFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogDirOpen.getFont());
-        if (btnLogDirOpenFont != null) btnLogDirOpen.setFont(btnLogDirOpenFont);
-        btnLogDirOpen.setHorizontalTextPosition(0);
-        btnLogDirOpen.setText("로그 폴더");
-        pnlLogTitle.add(btnLogDirOpen, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnLogPause = new JButton();
-        Font btnLogPauseFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogPause.getFont());
-        if (btnLogPauseFont != null) btnLogPause.setFont(btnLogPauseFont);
-        btnLogPause.setHorizontalTextPosition(0);
-        btnLogPause.setText("지우기");
-        pnlLogTitle.add(btnLogPause, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        chkLogPause = new JCheckBox();
-        Font chkLogPauseFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, chkLogPause.getFont());
-        if (chkLogPauseFont != null) chkLogPause.setFont(chkLogPauseFont);
-        chkLogPause.setHorizontalAlignment(0);
-        chkLogPause.setHorizontalTextPosition(11);
-        chkLogPause.setText("멈춤");
-        pnlLogTitle.add(chkLogPause, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnLogCopy = new JButton();
-        Font btnLogCopyFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogCopy.getFont());
-        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));
-        final JScrollPane scrollPane2 = new JScrollPane();
-        Font scrollPane2Font = this.$$$getFont$$$("D2Coding", Font.PLAIN, 12, scrollPane2.getFont());
-        if (scrollPane2Font != null) scrollPane2.setFont(scrollPane2Font);
-        pnlLog.add(scrollPane2, new GridConstraints(1, 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));
-        taLog = new JTextArea();
-        taLog.setBackground(new Color(-16777216));
-        taLog.setCaretColor(new Color(-1));
-        taLog.setEditable(false);
-        Font taLogFont = this.$$$getFont$$$("D2Coding", Font.PLAIN, 14, taLog.getFont());
-        if (taLogFont != null) taLog.setFont(taLogFont);
-        taLog.setForeground(new Color(-1));
-        taLog.setMargin(new Insets(4, 4, 4, 4));
-        taLog.setText("[10:50:08.561] [ INFO] ************************************************************************************\n[10:50:08.561] [ INFO] **                   Center Communication Server Information                      **\n[10:50:08.561] [ INFO] **     bindAddress: 0.0.0.0\n[10:50:08.561] [ INFO] **      listenPort: 9901\n[10:50:08.561] [ INFO] **         backlog: 1024\n[10:50:08.561] [ INFO] **   acceptThreads: 16\n[10:50:08.561] [ INFO] **   workerThreads: 16\n[10:50:08.561] [ INFO] ************************************************************************************\n");
-        scrollPane2.setViewportView(taLog);
-        pnlStatusBar = new JPanel();
-        pnlStatusBar.setLayout(new GridLayoutManager(1, 7, new Insets(0, 4, 4, 4), -1, -1));
-        rootPanel.add(pnlStatusBar, new GridConstraints(2, 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 Spacer spacer4 = new Spacer();
-        pnlStatusBar.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        lblSystime = new JLabel();
-        Font lblSystimeFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblSystime.getFont());
-        if (lblSystimeFont != null) lblSystime.setFont(lblSystimeFont);
-        lblSystime.setHorizontalAlignment(0);
-        lblSystime.setHorizontalTextPosition(0);
-        lblSystime.setText(" 2022-08-04 13:24:33 ");
-        pnlStatusBar.add(lblSystime, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label6 = new JLabel();
-        label6.setIcon(new ImageIcon(getClass().getResource("/static/image/on.png")));
-        label6.setText(" ");
-        pnlStatusBar.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblCpuRate = new JLabel();
-        Font lblCpuRateFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblCpuRate.getFont());
-        if (lblCpuRateFont != null) lblCpuRate.setFont(lblCpuRateFont);
-        lblCpuRate.setHorizontalAlignment(2);
-        lblCpuRate.setHorizontalTextPosition(0);
-        lblCpuRate.setText("    ");
-        pnlStatusBar.add(lblCpuRate, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        lblMemoryUsage = new JLabel();
-        Font lblMemoryUsageFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblMemoryUsage.getFont());
-        if (lblMemoryUsageFont != null) lblMemoryUsage.setFont(lblMemoryUsageFont);
-        lblMemoryUsage.setHorizontalAlignment(2);
-        lblMemoryUsage.setHorizontalTextPosition(0);
-        lblMemoryUsage.setText("    ");
-        pnlStatusBar.add(lblMemoryUsage, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        final JLabel label7 = new JLabel();
-        Font label7Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label7.getFont());
-        if (label7Font != null) label7.setFont(label7Font);
-        label7.setHorizontalAlignment(0);
-        label7.setHorizontalTextPosition(0);
-        label7.setText("  CPU 사용율(%):");
-        pnlStatusBar.add(label7, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label8 = new JLabel();
-        Font label8Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label8.getFont());
-        if (label8Font != null) label8.setFont(label8Font);
-        label8.setHorizontalAlignment(0);
-        label8.setHorizontalTextPosition(0);
-        label8.setText("  메모리 사용율(%):");
-        pnlStatusBar.add(label8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-    }
-
-    /**
-     * @noinspection ALL
-     */
-    private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) {
-        if (currentFont == null) return null;
-        String resultName;
-        if (fontName == null) {
-            resultName = currentFont.getName();
-        } else {
-            Font testFont = new Font(fontName, Font.PLAIN, 10);
-            if (testFont.canDisplay('a') && testFont.canDisplay('1')) {
-                resultName = fontName;
-            } else {
-                resultName = currentFont.getName();
-            }
-        }
-        Font font = new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize());
-        boolean isMac = System.getProperty("os.name", "").toLowerCase(Locale.ENGLISH).startsWith("mac");
-        Font fontWithFallback = isMac ? new Font(font.getFamily(), font.getStyle(), font.getSize()) : new StyleContext().getFont(font.getFamily(), font.getStyle(), font.getSize());
-        return fontWithFallback instanceof FontUIResource ? fontWithFallback : new FontUIResource(fontWithFallback);
-    }
-
-    /**
-     * @noinspection ALL
-     */
-    public JComponent $$$getRootComponent$$$() {
-        return rootPanel;
-    }
-
-}

+ 0 - 93
src/main/java/com/its/vds/ui/ui/MonitoringTask.java

@@ -1,93 +0,0 @@
-package com.its.vds.ui.ui;
-
-import javax.swing.*;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-public class MonitoringTask {
-	
-	private static final int TASK_LENGTH = 1000;
-	private AtomicBoolean isStarted =  new AtomicBoolean(false);
-	private AtomicBoolean isRunning = new AtomicBoolean(false);
-	private AtomicBoolean isDone = new AtomicBoolean(false);
-	private int lengthOfTask;
-	private int current = 0;	
-	private String statMessage;
-
-	public MonitoringTask() {
-		lengthOfTask = TASK_LENGTH;
-	}
-
-	public void go() {
-		isRunning.set(true);
-		if (!isStarted.get()) {
-			isDone.set(false);
-			isStarted.set(true);
-			statMessage = null;
-			current = 0;
-			final SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
-				@Override
-				protected Void doInBackground() throws Exception {
-					// Fake a long task, making a random amount of progress every second.
-					while (!isDone.get()) {
-						if (isRunning.get()) {
-							try {
-								Thread.sleep(1000); // sleep for a second
-								current += Math.random() * 100; // make some progress
-								if (current >= lengthOfTask) {
-									onDown();
-									current = lengthOfTask;
-								}
-								statMessage = "Completed " + current + " out of " + lengthOfTask + ".";
-							} catch (InterruptedException e) {
-								e.printStackTrace();
-							}
-						}
-					}
-					return null;
-				}
-			};
-			worker.execute();
-		}
-	}
-
-	public void pause() {
-		this.isRunning.set(false);
-	}
-
-	/**
-	 * Called from SwingTimerDemo to find out how much work needs to be done.
-	 */
-	public int getLengthOfTask() {
-		return lengthOfTask;
-	}
-
-	/**
-	 * Called from SwingTimerDemo to find out how much has been done.
-	 */
-	public int getCurrent() {
-		return current;
-	}
-
-	public void onDown() {
-		isDone.set(true);
-		isStarted.set(false);
-		isRunning.set(false);
-		statMessage = null;
-	}
-
-	/**
-	 * Called from SwingTimerDemo to find out if the task has completed.
-	 */
-	public boolean isDone() {
-		return isDone.get();
-	}
-
-	/**
-	 * Returns the most recent status message, or null if there is no current
-	 * status message.
-	 */
-	public String getMessage() {
-		return statMessage;
-	}
-
-}

+ 0 - 387
src/main/java/com/its/vds/ui/ui/SubUI.form

@@ -1,387 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.its.vds.ui.SubUI">
-  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-    <margin top="0" left="0" bottom="0" right="0"/>
-    <constraints>
-      <xy x="20" y="20" width="979" height="620"/>
-    </constraints>
-    <properties/>
-    <border type="none"/>
-    <children>
-      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="10" left="4" bottom="0" right="4"/>
-        <constraints>
-          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <grid id="d1b2f" binding="pnlCtlrTitle" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="25222" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <horizontalTextPosition value="11"/>
-                  <icon value="static/image/controller.png"/>
-                  <text value="제어기 정보"/>
-                </properties>
-              </component>
-              <hspacer id="e90f6">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="c9b9" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="제어기 전체: "/>
-                </properties>
-              </component>
-              <component id="20b88" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="통신 이상: "/>
-                </properties>
-              </component>
-              <component id="baf10" class="javax.swing.JLabel" binding="lblTotal">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
-              <component id="1c841" class="javax.swing.JLabel" binding="lblError">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="1"/>
-                  <foreground color="-65536"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="   -"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-          <scrollpane id="b21be">
-            <constraints>
-              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="a0dd1" class="javax.swing.JTable" binding="tblCtlrList">
-                <constraints/>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                </properties>
-              </component>
-            </children>
-          </scrollpane>
-          <grid id="17544" binding="pnlControl" layout-manager="GridLayoutManager" row-count="1" column-count="8" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="660a8" class="javax.swing.JButton" binding="btnImage">
-                <constraints>
-                  <grid row="0" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="정지영상"/>
-                </properties>
-              </component>
-              <hspacer id="60c19">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="3d84f" class="javax.swing.JButton" binding="btnInitialize">
-                <constraints>
-                  <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="초기화"/>
-                </properties>
-              </component>
-              <component id="7c99b" class="javax.swing.JButton" binding="btnReset">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="리셋"/>
-                </properties>
-              </component>
-              <component id="a85f9" class="javax.swing.JButton" binding="btnDisconnect">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="연결끊기"/>
-                </properties>
-              </component>
-              <component id="a6a03" class="javax.swing.JTextField" binding="txtName">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="200" height="-1"/>
-                    <preferred-size width="200" height="-1"/>
-                    <maximum-size width="200" height="-1"/>
-                  </grid>
-                </constraints>
-                <properties>
-                  <editable value="false"/>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <text value="제어기 명칭"/>
-                </properties>
-              </component>
-              <component id="6d1e0" class="javax.swing.JTextField" binding="txtId">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                    <minimum-size width="100" height="-1"/>
-                    <preferred-size width="100" height="-1"/>
-                    <maximum-size width="100" height="-1"/>
-                  </grid>
-                </constraints>
-                <properties>
-                  <editable value="false"/>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="0"/>
-                  <text value="ID"/>
-                </properties>
-              </component>
-              <component id="7eb53" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <icon value="static/image/select.png"/>
-                  <text value="선택한 제어기 "/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-        </children>
-      </grid>
-      <grid id="1a658" binding="pnlLog" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="4" bottom="0" right="4"/>
-        <constraints>
-          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
-            <minimum-size width="-1" height="300"/>
-            <preferred-size width="-1" height="300"/>
-            <maximum-size width="-1" height="300"/>
-          </grid>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <grid id="dbb05" binding="pnlLogTitle" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
-            <margin top="0" left="0" bottom="0" right="2"/>
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="9ac90" class="javax.swing.JLabel">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="2"/>
-                  <icon value="static/image/logging.png"/>
-                  <text value="시스템 로그"/>
-                </properties>
-              </component>
-              <hspacer id="656fd">
-                <constraints>
-                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-              </hspacer>
-              <component id="df2a0" class="javax.swing.JButton" binding="btnLogDirOpen">
-                <constraints>
-                  <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="로그 폴더"/>
-                </properties>
-              </component>
-              <component id="69a98" class="javax.swing.JButton" binding="btnLogPause">
-                <constraints>
-                  <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalTextPosition value="0"/>
-                  <text value="지우기"/>
-                </properties>
-              </component>
-              <component id="1e9e7" class="javax.swing.JCheckBox" binding="chkLogPause">
-                <constraints>
-                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <horizontalAlignment value="0"/>
-                  <horizontalTextPosition value="11"/>
-                  <text value="멈춤"/>
-                </properties>
-              </component>
-              <component id="ba97c" class="javax.swing.JButton" binding="btnLogCopy">
-                <constraints>
-                  <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="복사"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-          <scrollpane id="a6866">
-            <constraints>
-              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="D2Coding" size="12" style="0"/>
-            </properties>
-            <border type="none"/>
-            <children>
-              <component id="8ce8a" class="javax.swing.JTextArea" binding="taLog">
-                <constraints/>
-                <properties>
-                  <background color="-16777216"/>
-                  <caretColor color="-1"/>
-                  <editable value="false"/>
-                  <font name="D2Coding" size="14" style="0"/>
-                  <foreground color="-1"/>
-                  <margin top="4" left="4" bottom="4" right="4"/>
-                  <text value="[10:50:08.561] [ INFO] ************************************************************************************&#10;[10:50:08.561] [ INFO] **                   Center Communication Server Information                      **&#10;[10:50:08.561] [ INFO] **     bindAddress: 0.0.0.0&#10;[10:50:08.561] [ INFO] **      listenPort: 9901&#10;[10:50:08.561] [ INFO] **         backlog: 1024&#10;[10:50:08.561] [ INFO] **   acceptThreads: 16&#10;[10:50:08.561] [ INFO] **   workerThreads: 16&#10;[10:50:08.561] [ INFO] ************************************************************************************&#10;"/>
-                </properties>
-              </component>
-            </children>
-          </scrollpane>
-        </children>
-      </grid>
-      <grid id="e0774" binding="pnlStatusBar" layout-manager="GridLayoutManager" row-count="1" column-count="7" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="4" bottom="4" right="4"/>
-        <constraints>
-          <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children>
-          <hspacer id="653ec">
-            <constraints>
-              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-            </constraints>
-          </hspacer>
-          <component id="20f9" class="javax.swing.JLabel" binding="lblSystime">
-            <constraints>
-              <grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value=" 2022-08-04 13:24:33 "/>
-            </properties>
-          </component>
-          <component id="a516b" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <icon value="static/image/on.png"/>
-              <text value=" "/>
-            </properties>
-          </component>
-          <component id="94189" class="javax.swing.JLabel" binding="lblCpuRate">
-            <constraints>
-              <grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="19dbe" class="javax.swing.JLabel" binding="lblMemoryUsage">
-            <constraints>
-              <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
-                <minimum-size width="40" height="-1"/>
-                <preferred-size width="40" height="-1"/>
-                <maximum-size width="40" height="-1"/>
-              </grid>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="1"/>
-              <horizontalAlignment value="2"/>
-              <horizontalTextPosition value="0"/>
-              <text value="    "/>
-            </properties>
-          </component>
-          <component id="f6d5e" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  CPU 사용율(%):"/>
-            </properties>
-          </component>
-          <component id="d8ff5" class="javax.swing.JLabel">
-            <constraints>
-              <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties>
-              <font name="Malgun Gothic" size="12" style="0"/>
-              <horizontalAlignment value="0"/>
-              <horizontalTextPosition value="0"/>
-              <text value="  메모리 사용율(%):"/>
-            </properties>
-          </component>
-        </children>
-      </grid>
-    </children>
-  </grid>
-</form>

+ 0 - 624
src/main/java/com/its/vds/ui/ui/SubUI.java

@@ -1,624 +0,0 @@
-package com.its.vds.ui.ui;
-
-import com.intellij.uiDesigner.core.GridConstraints;
-import com.intellij.uiDesigner.core.GridLayoutManager;
-import com.intellij.uiDesigner.core.Spacer;
-import com.its.app.utils.SysUtils;
-import com.its.vds.domain.NET;
-import com.its.vds.entity.TbVdsCtlr;
-import com.its.vds.global.AppRepository;
-import com.its.vds.service.VdsCtlrService;
-import com.sun.management.OperatingSystemMXBean;
-import lombok.Getter;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-
-import javax.swing.Timer;
-import javax.swing.*;
-import javax.swing.border.MatteBorder;
-import javax.swing.plaf.FontUIResource;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableColumnModel;
-import javax.swing.text.StyleContext;
-import java.awt.*;
-import java.awt.datatransfer.Clipboard;
-import java.awt.datatransfer.StringSelection;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-import java.util.*;
-
-@Slf4j
-@Getter
-public class SubUI {
-    private static SubUI _instance = null;
-    private VdsCtlrService vdsCtlrService = null;
-    OperatingSystemMXBean osBean = null;
-    private Timer timer;
-    private Long tick = Long.valueOf(0);
-    private TbVdsCtlr selObj = null;
-
-    private CtlrSttsTableModel ctlrSttsTableModel;
-    private TableCellRenderer cellRenderer = new CtlrSttsTableCellRenderer();
-
-    private JPanel rootPanel;
-    private JPanel pnlCtlr;
-    private JPanel pnlLog;
-    private JPanel pnlLogTitle;
-    private JPanel pnlCtlrTitle;
-    private JButton btnLogDirOpen;
-    private JButton btnLogPause;
-    private JCheckBox chkLogPause;
-    private JLabel lblSystime;
-    private JPanel pnlStatusBar;
-    private JTable tblCtlrList;
-    private JTextArea taLog;
-    private JButton btnLogCopy;
-    private JLabel lblTotal;
-    private JLabel lblError;
-    private JLabel lblCpuRate;
-    private JLabel lblMemoryUsage;
-    private JPanel pnlControl;
-    private JButton btnImage;
-    private JButton btnInitialize;
-    private JButton btnReset;
-    private JButton btnDisconnect;
-    private JTextField txtName;
-    private JTextField txtId;
-
-    public static SubUI getInstance() {
-        return _instance;
-    }
-
-    public void displaySystime() {
-        lblSystime.setText(" " + SysUtils.getSysTimeStr() + "  ");
-        updateCommSttsTotal();
-    }
-
-    public void displayResource() {
-        long memoryUsage = Math.round(((double) (osBean.getTotalPhysicalMemorySize() - osBean.getFreePhysicalMemorySize())) / (double) osBean.getTotalPhysicalMemorySize() * 100.0);
-        lblMemoryUsage.setText(String.valueOf(memoryUsage));
-        double cpuLoad = osBean.getSystemCpuLoad();
-        lblCpuRate.setText(String.valueOf(Math.round(cpuLoad * 100.0)));
-    }
-
-    public SubUI() {
-        System.setProperty("awt.useSystemAAFontSettings", "false"); // AntiAliasing false
-
-        if (_instance == null) {
-            _instance = this;
-        }
-        osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
-        try {
-            Font font = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/D2Coding.ttc"));
-            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-            ge.registerFont(font);
-        } catch (FontFormatException e) {
-        } catch (IOException e) {
-        }
-
-        //taLog.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
-        Font d2font = new Font("D2Coding", Font.PLAIN, 14);
-        if (d2font != null) {
-            taLog.setFont(d2font);
-        }
-
-//        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-//        String fontNames[] = ge.getAvailableFontFamilyNames();
-//        for (int ii = 0; ii < fontNames.length; ii++) {
-//            log.error("GraphicsEnvironment Fonts: {}", fontNames[ii]);
-//        }
-//        final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
-//        for (Font font : fonts) {
-//            log.error("FONTS: {}", font);
-//        }
-
-        displaySystime();
-        displayResource();
-        timer = new Timer(1000, new ActionListener() {
-            public void actionPerformed(ActionEvent evt) {
-                displaySystime();
-                tick++;
-                if (tick % 5 == 0) {
-                    displayResource();
-                }
-            }
-        });
-        timer.start();
-
-        chkLogPause.setFocusable(false);
-        btnLogPause.setFocusable(false);
-        btnLogDirOpen.setFocusable(false);
-        btnLogCopy.setFocusable(false);
-
-        //initTblListUI();
-
-        btnLogPause.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                taLog.setText(null);
-            }
-        });
-        btnLogDirOpen.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                Runtime rt = Runtime.getRuntime();
-                try {
-                    rt.exec("explorer.exe logs");
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-        });
-        chkLogPause.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                JTextAreaOutputStream.isLoggingPause = chkLogPause.isSelected();
-            }
-        });
-        btnLogCopy.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                StringSelection stringSelection = new StringSelection(taLog.getText());
-                Clipboard clpBrd = Toolkit.getDefaultToolkit().getSystemClipboard();
-                clpBrd.setContents(stringSelection, null);
-            }
-        });
-
-        tblCtlrList.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent me) {
-                // double click
-                if (me.getClickCount() == 2) {
-                    updateControllerInfo();
-
-                }
-            }
-        });
-        btnDisconnect.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(1);
-            }
-        });
-        btnReset.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(2);
-            }
-        });
-        btnInitialize.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(3);
-            }
-        });
-        btnImage.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                controlController(4);
-            }
-        });
-    }
-
-    /**
-     * 제어기 명령 처리
-     *
-     * @param type
-     */
-    public void controlController(int type) {
-        if (selObj == null) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 선택되지 않았습니다. 목록을 더블클릭하여 제어기를 선택하세요.", "제어기 선택", JOptionPane.ERROR_MESSAGE);
-            return;
-        }
-        if (selObj.getNetState() == NET.CLOSED) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
-            return;
-        }
-        String message, title;
-        switch (type) {
-            case 1:
-                message = "제어기와의 연결을 종료 하시겠습니까?";
-                title = "제어기 연결 종료";
-                break;
-            case 2:
-                message = "제어기를 리셋 하시겠습니까?";
-                title = "제어기 리셋";
-                break;
-            case 3:
-                message = "제어기를 초기화 하시겠습니까?";
-                title = "제어기 초기화";
-                break;
-            case 4:
-                message = "제어기의 정지영상 정보를 요청하시겠습니까?";
-                title = "제어기 정지영상 요청";
-                break;
-            default:
-                return;
-        }
-        if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
-            return;
-        }
-
-        boolean result = false;
-        switch (type) {
-            case 1:
-                result = selObj.channelClose();
-                break;
-            case 2:
-                result = selObj.reset();
-                break;
-            case 3:
-                result = selObj.initialize();
-                break;
-            case 4:
-                result = selObj.stopImage((byte) 0x01);
-                break;
-            default:
-                return;
-        }
-        if (!result) {
-            JOptionPane.showMessageDialog(getRootPanel(), "명령 전송이 실패 하였습니다.", title, JOptionPane.ERROR_MESSAGE);
-        }
-    }
-
-    public void updateControllerInfo() {
-        int row = tblCtlrList.getSelectedRow();
-        if (row < 0) {
-            return;
-        }
-
-        txtId.setText("");
-        txtName.setText("");
-        CtlrSttsTableModel tableModel = (CtlrSttsTableModel) tblCtlrList.getModel();
-        selObj = tableModel.getControllerInfo(row);
-        if (selObj != null) {
-            txtId.setText(selObj.getVDS_CTLR_ID());
-            txtName.setText(selObj.getVDS_NM());
-        }
-    }
-
-    /**
-     * 목록 헤더 생성
-     */
-    private void initTblListUI(List<TbVdsCtlr> ctlrList) {
-
-        tblCtlrList.getTableHeader().setOpaque(false);
-        tblCtlrList.getTableHeader().setBackground(Color.LIGHT_GRAY);
-        tblCtlrList.setRowMargin(1);
-        //tblCtlrList.setGridColor(Color.LIGHT_GRAY);
-        tblCtlrList.setRowHeight(tblCtlrList.getRowHeight() + 5);
-        //tblCtlrList.setRowSelectionAllowed(true);
-        //tblCtlrList.setColumnSelectionAllowed(false);
-
-        ctlrSttsTableModel = new CtlrSttsTableModel(ctlrList);
-        tblCtlrList.setModel(ctlrSttsTableModel);
-        tblCtlrList.setBackground(Color.WHITE);
-        tblCtlrList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-        //tblCtlrList.setAutoCreateRowSorter(true); // sorting
-
-        //tblCtlrList.addMouseListener(new ListMouseListener(null));
-
-        TableColumnModel getColumnModel = tblCtlrList.getColumnModel();
-        getColumnModel.getColumn(0).setPreferredWidth(30);  //  "S",
-        getColumnModel.getColumn(1).setPreferredWidth(75);  //  "번호",
-        getColumnModel.getColumn(2).setPreferredWidth(75);  //  "시설물ID",
-        getColumnModel.getColumn(3).setPreferredWidth(260); //  "명칭",
-        getColumnModel.getColumn(4).setPreferredWidth(120); //  "IP",
-        getColumnModel.getColumn(5).setPreferredWidth(55);  //  "PORT",
-        getColumnModel.getColumn(6).setPreferredWidth(70);  //  "연결상태",
-        getColumnModel.getColumn(7).setPreferredWidth(50);  //  "도어",
-        getColumnModel.getColumn(8).setPreferredWidth(50);  //  "팬",
-        getColumnModel.getColumn(9).setPreferredWidth(50);  //  "히터",
-        getColumnModel.getColumn(10).setPreferredWidth(50);  //  "온도",
-        getColumnModel.getColumn(11).setPreferredWidth(50); //  "Video",
-        getColumnModel.getColumn(12).setPreferredWidth(120);
-        getColumnModel.getColumn(13).setPreferredWidth(120);
-        getColumnModel.getColumn(0).setMaxWidth(30);
-        getColumnModel.getColumn(0).setMinWidth(30);
-        getColumnModel.getColumn(0).setResizable(false);
-        Color color = UIManager.getColor("Table.gridColor");
-        MatteBorder border = new MatteBorder(1, 1, 0, 0, color);
-        tblCtlrList.setBorder(border);
-
-        DefaultTableCellRenderer centerAlign = new DefaultTableCellRenderer();
-        centerAlign.setHorizontalAlignment(JLabel.CENTER);
-        for (int ii = 0; ii < getColumnModel.getColumnCount(); ii++) {
-            getColumnModel.getColumn(ii).setCellRenderer(cellRenderer);
-        }
-    }
-
-    public void updateCommSttsTotal() {
-        int ctlrTotal = 0;
-        int ctlrError = 0;
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrTotal++;
-                if (!"CMS0".equals(obj.getStts().getCMNC_STTS_CD())) {
-                    ctlrError++;
-                }
-            }
-        }
-        lblTotal.setText(" " + ctlrTotal + " ");
-        lblError.setText(" " + ctlrError + " ");
-    }
-
-    public void LoadControllerInfo(VdsCtlrService vdsCtlrService) {
-        this.vdsCtlrService = vdsCtlrService;
-
-        SortedMap<Integer, TbVdsCtlr> ctlrMap = new TreeMap<>();
-        for (Map.Entry<String, TbVdsCtlr> e : AppRepository.getInstance().getCtlrMap().entrySet()) {
-            TbVdsCtlr obj = e.getValue();
-            if (StringUtils.equals("N", obj.getDEL_YN()) && StringUtils.equals("Y", obj.getVALD_YN())) {
-                ctlrMap.put(Integer.valueOf(obj.getVDS_CTLR_NMBR()), obj);
-            }
-        }
-        List<TbVdsCtlr> ctlrList = new ArrayList<TbVdsCtlr>(ctlrMap.values());
-        initTblListUI(ctlrList);
-//        for (Map.Entry<Integer, TbVdsCtlr> e : ctlrMap.entrySet()) {
-//            TbVdsCtlr obj = e.getValue();
-//            ctlrSttsTableModel.Add(obj);
-//        }
-        updateCommSttsTotal();
-    }
-
-    public void updateCtlrStts(TbVdsCtlr obj) {
-
-        //CtlrSttsTableModel ctlrSttsTableModel = (CtlrSttsTableModel)tblCtlrList.getModel();
-        for (int ii = 0; ii < ctlrSttsTableModel.getRowCount(); ii++) {
-            if (obj.getVDS_CTLR_ID().equals(ctlrSttsTableModel.getValueAt(ii, 2).toString())) {
-                int modelRow = tblCtlrList.convertRowIndexToModel(ii);
-//                //int viewColumn = tblCtlrList.getSelectedColumn();
-//                int modelColumn = tblCtlrList.convertColumnIndexToModel(4);
-//                Object cell = tblCtlrList.getValueAt(modelRow, modelColumn);
-//                log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: {}", cell);
-                ctlrSttsTableModel.setValue(obj, ii, modelRow);
-                break;
-            }
-        }
-    }
-
-    {
-// GUI initializer generated by IntelliJ IDEA GUI Designer
-// >>> IMPORTANT!! <<<
-// DO NOT EDIT OR ADD ANY CODE HERE!
-        $$$setupUI$$$();
-    }
-
-    /**
-     * Method generated by IntelliJ IDEA GUI Designer
-     * >>> IMPORTANT!! <<<
-     * DO NOT edit this method OR call it in your code!
-     *
-     * @noinspection ALL
-     */
-    private void $$$setupUI$$$() {
-        rootPanel = new JPanel();
-        rootPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
-        pnlCtlr = new JPanel();
-        pnlCtlr.setLayout(new GridLayoutManager(3, 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));
-        pnlCtlrTitle = new JPanel();
-        pnlCtlrTitle.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 2), -1, -1));
-        pnlCtlr.add(pnlCtlrTitle, 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());
-        if (label1Font != null) label1.setFont(label1Font);
-        label1.setHorizontalAlignment(2);
-        label1.setHorizontalTextPosition(11);
-        label1.setIcon(new ImageIcon(getClass().getResource("/static/image/controller.png")));
-        label1.setText("제어기 정보");
-        pnlCtlrTitle.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer1 = new Spacer();
-        pnlCtlrTitle.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        final JLabel label2 = new JLabel();
-        Font label2Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label2.getFont());
-        if (label2Font != null) label2.setFont(label2Font);
-        label2.setText("제어기 전체: ");
-        pnlCtlrTitle.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label3 = new JLabel();
-        Font label3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label3.getFont());
-        if (label3Font != null) label3.setFont(label3Font);
-        label3.setText("통신 이상: ");
-        pnlCtlrTitle.add(label3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblTotal = new JLabel();
-        Font lblTotalFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblTotal.getFont());
-        if (lblTotalFont != null) lblTotal.setFont(lblTotalFont);
-        lblTotal.setHorizontalAlignment(0);
-        lblTotal.setHorizontalTextPosition(0);
-        lblTotal.setText("   -");
-        pnlCtlrTitle.add(lblTotal, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblError = new JLabel();
-        Font lblErrorFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblError.getFont());
-        if (lblErrorFont != null) lblError.setFont(lblErrorFont);
-        lblError.setForeground(new Color(-65536));
-        lblError.setHorizontalAlignment(0);
-        lblError.setHorizontalTextPosition(0);
-        lblError.setText("   -");
-        pnlCtlrTitle.add(lblError, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JScrollPane scrollPane1 = new JScrollPane();
-        pnlCtlr.add(scrollPane1, new GridConstraints(1, 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));
-        tblCtlrList = new JTable();
-        Font tblCtlrListFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, tblCtlrList.getFont());
-        if (tblCtlrListFont != null) tblCtlrList.setFont(tblCtlrListFont);
-        scrollPane1.setViewportView(tblCtlrList);
-        pnlControl = new JPanel();
-        pnlControl.setLayout(new GridLayoutManager(1, 8, new Insets(0, 0, 0, 2), 1, 1));
-        pnlCtlr.add(pnlControl, new GridConstraints(2, 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));
-        btnImage = new JButton();
-        Font btnImageFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnImage.getFont());
-        if (btnImageFont != null) btnImage.setFont(btnImageFont);
-        btnImage.setText("정지영상");
-        pnlControl.add(btnImage, new GridConstraints(0, 7, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer2 = new Spacer();
-        pnlControl.add(spacer2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnInitialize = new JButton();
-        Font btnInitializeFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnInitialize.getFont());
-        if (btnInitializeFont != null) btnInitialize.setFont(btnInitializeFont);
-        btnInitialize.setText("초기화");
-        pnlControl.add(btnInitialize, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnReset = new JButton();
-        Font btnResetFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnReset.getFont());
-        if (btnResetFont != null) btnReset.setFont(btnResetFont);
-        btnReset.setText("리셋");
-        pnlControl.add(btnReset, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnDisconnect = new JButton();
-        Font btnDisconnectFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnDisconnect.getFont());
-        if (btnDisconnectFont != null) btnDisconnect.setFont(btnDisconnectFont);
-        btnDisconnect.setText("연결끊기");
-        pnlControl.add(btnDisconnect, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        txtName = new JTextField();
-        txtName.setEditable(false);
-        Font txtNameFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtName.getFont());
-        if (txtNameFont != null) txtName.setFont(txtNameFont);
-        txtName.setHorizontalAlignment(2);
-        txtName.setText("제어기 명칭");
-        pnlControl.add(txtName, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(200, -1), new Dimension(200, -1), new Dimension(200, -1), 0, false));
-        txtId = new JTextField();
-        txtId.setEditable(false);
-        Font txtIdFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtId.getFont());
-        if (txtIdFont != null) txtId.setFont(txtIdFont);
-        txtId.setHorizontalAlignment(0);
-        txtId.setText("ID");
-        pnlControl.add(txtId, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JLabel label4 = new JLabel();
-        Font label4Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label4.getFont());
-        if (label4Font != null) label4.setFont(label4Font);
-        label4.setIcon(new ImageIcon(getClass().getResource("/static/image/select.png")));
-        label4.setText("선택한 제어기 ");
-        pnlControl.add(label4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        pnlLog = new JPanel();
-        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, 300), new Dimension(-1, 300), new Dimension(-1, 300), 0, false));
-        pnlLogTitle = new JPanel();
-        pnlLogTitle.setLayout(new GridLayoutManager(1, 6, 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 label5 = new JLabel();
-        Font label5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label5.getFont());
-        if (label5Font != null) label5.setFont(label5Font);
-        label5.setHorizontalAlignment(2);
-        label5.setIcon(new ImageIcon(getClass().getResource("/static/image/logging.png")));
-        label5.setText("시스템 로그");
-        pnlLogTitle.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final Spacer spacer3 = new Spacer();
-        pnlLogTitle.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnLogDirOpen = new JButton();
-        Font btnLogDirOpenFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogDirOpen.getFont());
-        if (btnLogDirOpenFont != null) btnLogDirOpen.setFont(btnLogDirOpenFont);
-        btnLogDirOpen.setHorizontalTextPosition(0);
-        btnLogDirOpen.setText("로그 폴더");
-        pnlLogTitle.add(btnLogDirOpen, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnLogPause = new JButton();
-        Font btnLogPauseFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogPause.getFont());
-        if (btnLogPauseFont != null) btnLogPause.setFont(btnLogPauseFont);
-        btnLogPause.setHorizontalTextPosition(0);
-        btnLogPause.setText("지우기");
-        pnlLogTitle.add(btnLogPause, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        chkLogPause = new JCheckBox();
-        Font chkLogPauseFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, chkLogPause.getFont());
-        if (chkLogPauseFont != null) chkLogPause.setFont(chkLogPauseFont);
-        chkLogPause.setHorizontalAlignment(0);
-        chkLogPause.setHorizontalTextPosition(11);
-        chkLogPause.setText("멈춤");
-        pnlLogTitle.add(chkLogPause, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnLogCopy = new JButton();
-        Font btnLogCopyFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogCopy.getFont());
-        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));
-        final JScrollPane scrollPane2 = new JScrollPane();
-        Font scrollPane2Font = this.$$$getFont$$$("D2Coding", Font.PLAIN, 12, scrollPane2.getFont());
-        if (scrollPane2Font != null) scrollPane2.setFont(scrollPane2Font);
-        pnlLog.add(scrollPane2, new GridConstraints(1, 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));
-        taLog = new JTextArea();
-        taLog.setBackground(new Color(-16777216));
-        taLog.setCaretColor(new Color(-1));
-        taLog.setEditable(false);
-        Font taLogFont = this.$$$getFont$$$("D2Coding", Font.PLAIN, 14, taLog.getFont());
-        if (taLogFont != null) taLog.setFont(taLogFont);
-        taLog.setForeground(new Color(-1));
-        taLog.setMargin(new Insets(4, 4, 4, 4));
-        taLog.setText("[10:50:08.561] [ INFO] ************************************************************************************\n[10:50:08.561] [ INFO] **                   Center Communication Server Information                      **\n[10:50:08.561] [ INFO] **     bindAddress: 0.0.0.0\n[10:50:08.561] [ INFO] **      listenPort: 9901\n[10:50:08.561] [ INFO] **         backlog: 1024\n[10:50:08.561] [ INFO] **   acceptThreads: 16\n[10:50:08.561] [ INFO] **   workerThreads: 16\n[10:50:08.561] [ INFO] ************************************************************************************\n");
-        scrollPane2.setViewportView(taLog);
-        pnlStatusBar = new JPanel();
-        pnlStatusBar.setLayout(new GridLayoutManager(1, 7, new Insets(0, 4, 4, 4), -1, -1));
-        rootPanel.add(pnlStatusBar, new GridConstraints(2, 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 Spacer spacer4 = new Spacer();
-        pnlStatusBar.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        lblSystime = new JLabel();
-        Font lblSystimeFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblSystime.getFont());
-        if (lblSystimeFont != null) lblSystime.setFont(lblSystimeFont);
-        lblSystime.setHorizontalAlignment(0);
-        lblSystime.setHorizontalTextPosition(0);
-        lblSystime.setText(" 2022-08-04 13:24:33 ");
-        pnlStatusBar.add(lblSystime, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label6 = new JLabel();
-        label6.setIcon(new ImageIcon(getClass().getResource("/static/image/on.png")));
-        label6.setText(" ");
-        pnlStatusBar.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        lblCpuRate = new JLabel();
-        Font lblCpuRateFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblCpuRate.getFont());
-        if (lblCpuRateFont != null) lblCpuRate.setFont(lblCpuRateFont);
-        lblCpuRate.setHorizontalAlignment(2);
-        lblCpuRate.setHorizontalTextPosition(0);
-        lblCpuRate.setText("    ");
-        pnlStatusBar.add(lblCpuRate, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        lblMemoryUsage = new JLabel();
-        Font lblMemoryUsageFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 12, lblMemoryUsage.getFont());
-        if (lblMemoryUsageFont != null) lblMemoryUsage.setFont(lblMemoryUsageFont);
-        lblMemoryUsage.setHorizontalAlignment(2);
-        lblMemoryUsage.setHorizontalTextPosition(0);
-        lblMemoryUsage.setText("    ");
-        pnlStatusBar.add(lblMemoryUsage, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(40, -1), new Dimension(40, -1), new Dimension(40, -1), 0, false));
-        final JLabel label7 = new JLabel();
-        Font label7Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label7.getFont());
-        if (label7Font != null) label7.setFont(label7Font);
-        label7.setHorizontalAlignment(0);
-        label7.setHorizontalTextPosition(0);
-        label7.setText("  CPU 사용율(%):");
-        pnlStatusBar.add(label7, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JLabel label8 = new JLabel();
-        Font label8Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label8.getFont());
-        if (label8Font != null) label8.setFont(label8Font);
-        label8.setHorizontalAlignment(0);
-        label8.setHorizontalTextPosition(0);
-        label8.setText("  메모리 사용율(%):");
-        pnlStatusBar.add(label8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-    }
-
-    /**
-     * @noinspection ALL
-     */
-    private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) {
-        if (currentFont == null) return null;
-        String resultName;
-        if (fontName == null) {
-            resultName = currentFont.getName();
-        } else {
-            Font testFont = new Font(fontName, Font.PLAIN, 10);
-            if (testFont.canDisplay('a') && testFont.canDisplay('1')) {
-                resultName = fontName;
-            } else {
-                resultName = currentFont.getName();
-            }
-        }
-        Font font = new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize());
-        boolean isMac = System.getProperty("os.name", "").toLowerCase(Locale.ENGLISH).startsWith("mac");
-        Font fontWithFallback = isMac ? new Font(font.getFamily(), font.getStyle(), font.getSize()) : new StyleContext().getFont(font.getFamily(), font.getStyle(), font.getSize());
-        return fontWithFallback instanceof FontUIResource ? fontWithFallback : new FontUIResource(fontWithFallback);
-    }
-
-    /**
-     * @noinspection ALL
-     */
-    public JComponent $$$getRootComponent$$$() {
-        return rootPanel;
-    }
-
-}

+ 2 - 2
src/main/java/com/its/vds/xnettcp/vds/process/Job_Image.java

@@ -61,7 +61,7 @@ public class Job_Image implements JobProtocol {
 			return 0;
 		}
 
-		int nextFrame = current+1;
+		int nextFrame = current;
 		if (total == nextFrame) {
 			log.info("[{}]. Job_Image: completed image data receive: {}", obj.getVDS_CTLR_ID(), obj.getImageSize());
 			List<Channel> channels = obj.getRequestImageList();
@@ -91,7 +91,7 @@ public class Job_Image implements JobProtocol {
 			channels.forEach(channel -> {
 				if (channel == obj.getChannel()) {
 					// 서버 화면에서 요청한 거임
-					log.error("YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY");
+					log.info("Local Stop Image Request OK...");
 				}
 				else {
 					if (sendCenterResponse(channel, buffer3, obj)) {

BIN
vds-comm-server-0.0.1.jar


BIN
vds-comm-server.exe


+ 1 - 1
vds-comm-server.txt.jsmooth

@@ -6,7 +6,7 @@
 <JVMSearchPath>jdkpath</JVMSearchPath>
 <JVMSearchPath>exepath</JVMSearchPath>
 <JVMSearchPath>jview</JVMSearchPath>
-<arguments>-Dspring.profiles.active=dev</arguments>
+<arguments></arguments>
 <currentDirectory>${EXECUTABLEPATH}</currentDirectory>
 <embeddedJar>true</embeddedJar>
 <executableName>vds-comm-server.exe</executableName>