Browse Source

Small changes

Fixes
Removed icons from some windows
master
Sogomn 9 years ago
parent
commit
dd8f2bf3b3
  1. 2
      Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java
  2. 3
      Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java
  3. 2
      Ratty/src/de/sogomn/rat/server/gui/FileTree.java
  4. 5
      Ratty/src/de/sogomn/rat/server/gui/RattyGui.java
  5. 2
      Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java

2
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<IGuiController> {
@ -51,6 +52,7 @@ public final class ChatWindow extends AbstractListenerContainer<IGuiController>
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();

3
Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java

@ -47,7 +47,6 @@ public final class DisplayPanel extends AbstractListenerContainer<IGuiController
notifyListeners(controller -> 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<IGuiController
g.drawImage(image, 0, 0, null);
});
screen.setIcons(icons);
screen.setIcons(ImageUtils.EMPTY_IMAGE);
return screen;
}

2
Ratty/src/de/sogomn/rat/server/gui/FileTree.java

@ -100,7 +100,7 @@ public final class FileTree extends AbstractListenerContainer<IGuiController> {
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);
}

5
Ratty/src/de/sogomn/rat/server/gui/RattyGui.java

@ -66,6 +66,7 @@ public final class RattyGui extends AbstractListenerContainer<IGuiController> 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<BufferedImage> 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<IGuiController> im
public static final String CHAT = LANGUAGE.getString("action.chat");
public static final String CLOSE = "Close";
public static final List<BufferedImage> 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<IGuiController> 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() {

2
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

Loading…
Cancel
Save