mirror of https://github.com/LucaBongiorni/Ratty
Sogomn
9 years ago
4 changed files with 128 additions and 3 deletions
-
44Ratty/res/language/lang_bsq.properties
-
4Ratty/src/de/sogomn/rat/GUISettings.java
-
76Ratty/src/de/sogomn/rat/server/gui/Notification.java
-
7Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java
@ -0,0 +1,44 @@ |
|||||
|
debug.question=Foo't'ah dud Yoow'a'h? |
||||
|
debug.server=Foo't'ah |
||||
|
debug.client=Yoow'a'h |
||||
|
|
||||
|
server.port_question=Tri'a'am yuwe Joom? |
||||
|
server.port_error=Imy Tri'a'am. |
||||
|
server.free_warning=Lmbona yuwe connect yuw reyt device jipon.\r\n\ |
||||
|
Kimu? |
||||
|
server.yes=Yime |
||||
|
server.no=Yuwe |
||||
|
server.upload_execute_warning=File fi qo'wehn pol Imy file.\r\n\ |
||||
|
Kimu? |
||||
|
|
||||
|
builder.address_question=Ui number fi Imy reyt? |
||||
|
builder.port_question=jipon? |
||||
|
builder.error=Yuwe g'a'ah. |
||||
|
|
||||
|
action.popup=Gu oop |
||||
|
action.screenshot=Screenshoot |
||||
|
action.desktop=Des'top |
||||
|
action.voice=g'v'oocan |
||||
|
action.files=File g'can |
||||
|
action.command=Gu action |
||||
|
action.clipboard=Bood lmbona |
||||
|
action.website=Website gu |
||||
|
action.audio=Fun o'tqov |
||||
|
action.free=Impy gu |
||||
|
action.build=Impy build |
||||
|
action.attack=K'ontad gu |
||||
|
action.request_files=Gu file |
||||
|
action.download=Download file |
||||
|
action.upload=Gu file fi dehn |
||||
|
action.execute=M'at eh file |
||||
|
action.delete=Yuwe file |
||||
|
action.new_directory=Nuun file |
||||
|
action.upload_execute=Dehn fi M'at file |
||||
|
|
||||
|
column.name=Cu'a'ahn |
||||
|
column.location=Place |
||||
|
column.address=IP number |
||||
|
column.os=Operating system |
||||
|
column.version=Ve'son |
||||
|
column.desktop=Stre'm'in' des'top |
||||
|
column.voice=Stre'm'in v'ocan |
@ -0,0 +1,76 @@ |
|||||
|
package de.sogomn.rat.server.gui; |
||||
|
|
||||
|
import javax.swing.JDialog; |
||||
|
import javax.swing.JLabel; |
||||
|
import javax.swing.border.EmptyBorder; |
||||
|
|
||||
|
public final class Notification { |
||||
|
|
||||
|
private JDialog dialog; |
||||
|
private JLabel label; |
||||
|
|
||||
|
private static final EmptyBorder PADDING = new EmptyBorder(10, 50, 10, 50); |
||||
|
private static final int INTERVAL = 3; |
||||
|
private static final int WAIT_TIME = 3000; |
||||
|
|
||||
|
public Notification(final String text) { |
||||
|
dialog = new JDialog(); |
||||
|
label = new JLabel(text); |
||||
|
|
||||
|
label.setHorizontalAlignment(JLabel.CENTER); |
||||
|
label.setVerticalAlignment(JLabel.CENTER); |
||||
|
label.setBorder(PADDING); |
||||
|
|
||||
|
dialog.setUndecorated(true); |
||||
|
dialog.setContentPane(label); |
||||
|
dialog.pack(); |
||||
|
dialog.setLocation(-dialog.getWidth(), 0); |
||||
|
dialog.setAlwaysOnTop(true); |
||||
|
} |
||||
|
|
||||
|
public Notification() { |
||||
|
this(""); |
||||
|
} |
||||
|
|
||||
|
public void trigger() { |
||||
|
if (dialog.isVisible() || !dialog.isDisplayable()) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
final Runnable runnable = () -> { |
||||
|
try { |
||||
|
while (dialog.getX() < 0) { |
||||
|
final int x = dialog.getX() + 1; |
||||
|
final int y = dialog.getY(); |
||||
|
|
||||
|
dialog.setLocation(x, y); |
||||
|
|
||||
|
Thread.sleep(INTERVAL); |
||||
|
} |
||||
|
|
||||
|
Thread.sleep(WAIT_TIME); |
||||
|
|
||||
|
while (dialog.getX() > -dialog.getWidth()) { |
||||
|
final int x = dialog.getX() - 1; |
||||
|
final int y = dialog.getY(); |
||||
|
|
||||
|
dialog.setLocation(x, y); |
||||
|
|
||||
|
Thread.sleep(INTERVAL); |
||||
|
} |
||||
|
} catch (final Exception ex) { |
||||
|
ex.printStackTrace(); |
||||
|
} |
||||
|
|
||||
|
dialog.setVisible(false); |
||||
|
dialog.dispose(); |
||||
|
}; |
||||
|
final Thread thread = new Thread(runnable); |
||||
|
|
||||
|
dialog.setVisible(true); |
||||
|
|
||||
|
thread.setDaemon(true); |
||||
|
thread.start(); |
||||
|
} |
||||
|
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue