]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/NexuizDemoRecorder/main/src/main/java/com/nexuiz/demorecorder/ui/swinggui/StatusBar.java
fix lots of CRLFs
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / java / com / nexuiz / demorecorder / ui / swinggui / StatusBar.java
index ed33c9ceaf9a87e91b61ecba3059f242473f4c4b..e826efde06cbb1908c8e1988bbc424330aec037e 100644 (file)
@@ -1,86 +1,86 @@
-package com.nexuiz.demorecorder.ui.swinggui;\r
-\r
-import java.awt.BorderLayout;\r
-import java.awt.Color;\r
-import java.awt.Component;\r
-import java.awt.Graphics;\r
-import java.awt.SystemColor;\r
-\r
-import javax.swing.BorderFactory;\r
-import javax.swing.Icon;\r
-import javax.swing.JLabel;\r
-import javax.swing.JPanel;\r
-\r
-public class StatusBar extends JPanel {\r
-\r
-       private static final long serialVersionUID = -1471757496863555741L;\r
-       private JLabel currentActivity = null;\r
-       \r
-       private static final String STATE_IDLE = "Idle";\r
-       private static final String STATE_WORKING = "Working";\r
-\r
-       public StatusBar() {\r
-               BorderLayout borderLayout = new BorderLayout(0, 0);\r
-               setLayout(borderLayout);\r
-               JPanel rightPanel = new JPanel(new BorderLayout());\r
-               rightPanel.add(new JLabel(new AngledLinesWindowsCornerIcon()), BorderLayout.SOUTH);\r
-               rightPanel.setOpaque(false);\r
-\r
-               add(rightPanel, BorderLayout.EAST);\r
-\r
-               this.currentActivity = new JLabel("Idle");\r
-               add(this.currentActivity, BorderLayout.WEST);\r
-               setBackground(SystemColor.control);\r
-               setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.black));\r
-       }\r
-       \r
-       /**\r
-        * Sets the state/display of the status bar to "idle" (false) or "working" (true).\r
-        * @param state\r
-        */\r
-       public void showState(boolean state) {\r
-               if (state) {\r
-                       currentActivity.setText(STATE_WORKING);\r
-               } else {\r
-                       currentActivity.setText(STATE_IDLE);\r
-               }\r
-       }\r
-\r
-       private static class AngledLinesWindowsCornerIcon implements Icon {\r
-               private static final Color WHITE_LINE_COLOR = new Color(255, 255, 255);\r
-\r
-               private static final Color GRAY_LINE_COLOR = new Color(172, 168, 153);\r
-               private static final int WIDTH = 13;\r
-\r
-               private static final int HEIGHT = 13;\r
-\r
-               public int getIconHeight() {\r
-                       return HEIGHT;\r
-               }\r
-\r
-               public int getIconWidth() {\r
-                       return WIDTH;\r
-               }\r
-\r
-               public void paintIcon(Component c, Graphics g, int x, int y) {\r
-\r
-                       g.setColor(WHITE_LINE_COLOR);\r
-                       g.drawLine(0, 12, 12, 0);\r
-                       g.drawLine(5, 12, 12, 5);\r
-                       g.drawLine(10, 12, 12, 10);\r
-\r
-                       g.setColor(GRAY_LINE_COLOR);\r
-                       g.drawLine(1, 12, 12, 1);\r
-                       g.drawLine(2, 12, 12, 2);\r
-                       g.drawLine(3, 12, 12, 3);\r
-\r
-                       g.drawLine(6, 12, 12, 6);\r
-                       g.drawLine(7, 12, 12, 7);\r
-                       g.drawLine(8, 12, 12, 8);\r
-\r
-                       g.drawLine(11, 12, 12, 11);\r
-                       g.drawLine(12, 12, 12, 12);\r
-\r
-               }\r
-       }\r
-}\r
+package com.nexuiz.demorecorder.ui.swinggui;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.SystemColor;
+
+import javax.swing.BorderFactory;
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+public class StatusBar extends JPanel {
+
+       private static final long serialVersionUID = -1471757496863555741L;
+       private JLabel currentActivity = null;
+       
+       private static final String STATE_IDLE = "Idle";
+       private static final String STATE_WORKING = "Working";
+
+       public StatusBar() {
+               BorderLayout borderLayout = new BorderLayout(0, 0);
+               setLayout(borderLayout);
+               JPanel rightPanel = new JPanel(new BorderLayout());
+               rightPanel.add(new JLabel(new AngledLinesWindowsCornerIcon()), BorderLayout.SOUTH);
+               rightPanel.setOpaque(false);
+
+               add(rightPanel, BorderLayout.EAST);
+
+               this.currentActivity = new JLabel("Idle");
+               add(this.currentActivity, BorderLayout.WEST);
+               setBackground(SystemColor.control);
+               setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.black));
+       }
+       
+       /**
+        * Sets the state/display of the status bar to "idle" (false) or "working" (true).
+        * @param state
+        */
+       public void showState(boolean state) {
+               if (state) {
+                       currentActivity.setText(STATE_WORKING);
+               } else {
+                       currentActivity.setText(STATE_IDLE);
+               }
+       }
+
+       private static class AngledLinesWindowsCornerIcon implements Icon {
+               private static final Color WHITE_LINE_COLOR = new Color(255, 255, 255);
+
+               private static final Color GRAY_LINE_COLOR = new Color(172, 168, 153);
+               private static final int WIDTH = 13;
+
+               private static final int HEIGHT = 13;
+
+               public int getIconHeight() {
+                       return HEIGHT;
+               }
+
+               public int getIconWidth() {
+                       return WIDTH;
+               }
+
+               public void paintIcon(Component c, Graphics g, int x, int y) {
+
+                       g.setColor(WHITE_LINE_COLOR);
+                       g.drawLine(0, 12, 12, 0);
+                       g.drawLine(5, 12, 12, 5);
+                       g.drawLine(10, 12, 12, 10);
+
+                       g.setColor(GRAY_LINE_COLOR);
+                       g.drawLine(1, 12, 12, 1);
+                       g.drawLine(2, 12, 12, 2);
+                       g.drawLine(3, 12, 12, 3);
+
+                       g.drawLine(6, 12, 12, 6);
+                       g.drawLine(7, 12, 12, 7);
+                       g.drawLine(8, 12, 12, 8);
+
+                       g.drawLine(11, 12, 12, 11);
+                       g.drawLine(12, 12, 12, 12);
+
+               }
+       }
+}