From dd8f2bf3b390de989791365b4c5beb093ed4e8d5 Mon Sep 17 00:00:00 2001 From: Sogomn Date: Mon, 21 Mar 2016 08:18:58 +0100 Subject: [PATCH] Small changes Fixes Removed icons from some windows --- Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java | 2 ++ Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java | 3 +-- Ratty/src/de/sogomn/rat/server/gui/FileTree.java | 2 +- Ratty/src/de/sogomn/rat/server/gui/RattyGui.java | 5 ++--- Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java b/Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java index dc365a5..d274e29 100644 --- a/Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java +++ b/Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java @@ -12,6 +12,7 @@ import javax.swing.JTextField; import javax.swing.text.DefaultCaret; import de.sogomn.engine.util.AbstractListenerContainer; +import de.sogomn.engine.util.ImageUtils; public final class ChatWindow extends AbstractListenerContainer { @@ -51,6 +52,7 @@ public final class ChatWindow extends AbstractListenerContainer contentPane.add(scrollPane, BorderLayout.CENTER); contentPane.add(submit, BorderLayout.SOUTH); + frame.setIconImage(ImageUtils.EMPTY_IMAGE); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.setPreferredSize(SIZE); frame.pack(); diff --git a/Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java b/Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java index e4cfed3..c81854e 100644 --- a/Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java +++ b/Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java @@ -47,7 +47,6 @@ public final class DisplayPanel extends AbstractListenerContainer controller.userInput(CLOSED, userObject)); } }; - final BufferedImage[] icons = RattyGui.GUI_ICONS.stream().toArray(BufferedImage[]::new); screen.setResizeBehavior(ResizeBehavior.KEEP_ASPECT_RATIO); screen.setTitle(title); @@ -61,7 +60,7 @@ public final class DisplayPanel extends AbstractListenerContainer { frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.setPreferredSize(SIZE); frame.setContentPane(scrollPane); - frame.setIconImages(RattyGui.GUI_ICONS); + frame.setIconImage(ImageUtils.EMPTY_IMAGE); frame.pack(); frame.setLocationRelativeTo(null); } diff --git a/Ratty/src/de/sogomn/rat/server/gui/RattyGui.java b/Ratty/src/de/sogomn/rat/server/gui/RattyGui.java index 8991e21..9f2f56f 100644 --- a/Ratty/src/de/sogomn/rat/server/gui/RattyGui.java +++ b/Ratty/src/de/sogomn/rat/server/gui/RattyGui.java @@ -66,6 +66,7 @@ public final class RattyGui extends AbstractListenerContainer im private static final BufferedImage FILE_MANAGEMENT_ICON = CATEGORY_SHEET.getSprite(1); private static final BufferedImage UTILITY_ICON = CATEGORY_SHEET.getSprite(2); private static final BufferedImage OTHER_ICON = CATEGORY_SHEET.getSprite(3); + private static final List GUI_ICONS = Arrays.asList(GUI_ICON_SMALL, GUI_ICON_MEDIUM, GUI_ICON_LARGE); private static final String SURVEILLANCE = LANGUAGE.getString("menu.surveillance"); private static final String FILE_MANAGEMENT = LANGUAGE.getString("menu.file_management"); @@ -93,8 +94,6 @@ public final class RattyGui extends AbstractListenerContainer im public static final String CHAT = LANGUAGE.getString("action.chat"); public static final String CLOSE = "Close"; - public static final List GUI_ICONS = Arrays.asList(GUI_ICON_SMALL, GUI_ICON_MEDIUM, GUI_ICON_LARGE); - static { SURVEILLANCE_ITEM_DATA.put(SCREENSHOT, MENU_ICONS[1]); SURVEILLANCE_ITEM_DATA.put(DESKTOP, MENU_ICONS[2]); @@ -108,7 +107,7 @@ public final class RattyGui extends AbstractListenerContainer im UTILITY_ITEM_DATA.put(WEBSITE, MENU_ICONS[8]); UTILITY_ITEM_DATA.put(AUDIO, MENU_ICONS[7]); UTILITY_ITEM_DATA.put(CHAT, MENU_ICONS[12]); - OTHER_ITEM_DATA.put(FREE, MENU_ICONS[11]); + OTHER_ITEM_DATA.put(FREE, MENU_ICONS[10]); } public RattyGui() { diff --git a/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java index 8d641d4..cb3258e 100644 --- a/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java +++ b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java @@ -627,6 +627,8 @@ public final class RattyGuiController extends AbstractRattyController implements super.closed(server); clients.values().forEach(ServerClient::logOut); + + System.exit(0); } @Override