Browse Source

修复UI界面

jingbo 2 tuần trước cách đây
mục cha
commit
141004ce5e
2 tập tin đã thay đổi với 19 bổ sung19 xóa
  1. 17 17
      src/com/mes/component/GunPanel.java
  2. 2 2
      src/com/mes/ui/MesClient.java

+ 17 - 17
src/com/mes/component/GunPanel.java

@@ -60,63 +60,63 @@ public class GunPanel extends JPanel {
 
     private void initUI() {
         setLayout(null);
-        setPreferredSize(new Dimension(280, 160));
+        setPreferredSize(new Dimension(230, 140));
         setOpaque(false);
 
         JLabel titleLabel = new JLabel(config.getGunName());
         titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
-        titleLabel.setFont(new Font("微软雅黑", Font.BOLD, 28));
+        titleLabel.setFont(new Font("微软雅黑", Font.BOLD, 24));
         titleLabel.setForeground(Color.BLACK);
-        titleLabel.setBounds(0, 10, 200, 35);
+        titleLabel.setBounds(0, 5, 160, 28);
         add(titleLabel);
 
         statusLabel = new JLabel("离线");
         statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
-        statusLabel.setFont(new Font("微软雅黑", Font.BOLD, 16));
-        statusLabel.setBounds(200, 12, 70, 28);
+        statusLabel.setFont(new Font("微软雅黑", Font.BOLD, 14));
+        statusLabel.setBounds(165, 8, 60, 22);
         statusLabel.setForeground(Color.RED);
         add(statusLabel);
 
         JLabel scheduleTitleLabel = new JLabel("进度:");
         scheduleTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
-        scheduleTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 22));
+        scheduleTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 18));
         scheduleTitleLabel.setForeground(Color.BLACK);
-        scheduleTitleLabel.setBounds(10, 55, 70, 30);
+        scheduleTitleLabel.setBounds(10, 40, 60, 25);
         add(scheduleTitleLabel);
 
         scheduleLabel = new JLabel("0/" + taskCount);
         scheduleLabel.setHorizontalAlignment(SwingConstants.LEFT);
-        scheduleLabel.setFont(new Font("微软雅黑", Font.BOLD, 22));
+        scheduleLabel.setFont(new Font("微软雅黑", Font.BOLD, 18));
         scheduleLabel.setForeground(Color.BLACK);
-        scheduleLabel.setBounds(85, 55, 100, 30);
+        scheduleLabel.setBounds(75, 40, 90, 25);
         add(scheduleLabel);
 
         JLabel torqueTitleLabel = new JLabel("扭矩:");
         torqueTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
-        torqueTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 22));
+        torqueTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 18));
         torqueTitleLabel.setForeground(Color.BLACK);
-        torqueTitleLabel.setBounds(10, 95, 70, 30);
+        torqueTitleLabel.setBounds(10, 75, 60, 25);
         add(torqueTitleLabel);
 
         torqueLabel = new JLabel("");
         torqueLabel.setHorizontalAlignment(SwingConstants.LEFT);
-        torqueLabel.setFont(new Font("微软雅黑", Font.BOLD, 22));
+        torqueLabel.setFont(new Font("微软雅黑", Font.BOLD, 18));
         torqueLabel.setForeground(Color.BLACK);
-        torqueLabel.setBounds(85, 95, 120, 30);
+        torqueLabel.setBounds(75, 75, 100, 25);
         add(torqueLabel);
 
         JLabel angleTitleLabel = new JLabel("角度:");
         angleTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
-        angleTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 22));
+        angleTitleLabel.setFont(new Font("微软雅黑", Font.PLAIN, 18));
         angleTitleLabel.setForeground(Color.BLACK);
-        angleTitleLabel.setBounds(10, 125, 70, 30);
+        angleTitleLabel.setBounds(10, 110, 60, 25);
         add(angleTitleLabel);
 
         angleLabel = new JLabel("");
         angleLabel.setHorizontalAlignment(SwingConstants.LEFT);
-        angleLabel.setFont(new Font("微软雅黑", Font.BOLD, 22));
+        angleLabel.setFont(new Font("微软雅黑", Font.BOLD, 18));
         angleLabel.setForeground(Color.BLACK);
-        angleLabel.setBounds(85, 125, 120, 30);
+        angleLabel.setBounds(75, 110, 100, 25);
         add(angleLabel);
     }
 

+ 2 - 2
src/com/mes/ui/MesClient.java

@@ -799,8 +799,8 @@ public class MesClient extends JFrame {
         indexPanelA.add(finish_ng_bt);
 
         gunPanelContainer = new JPanel();
-        gunPanelContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
-        gunPanelContainer.setBounds(20, 160, 750, 220);
+        gunPanelContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 15, 15));
+        gunPanelContainer.setBounds(20, 160, 750, 300);
         gunPanelContainer.setOpaque(false);
         indexPanelA.add(gunPanelContainer);