|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.escapeNT.pail.Util.Util
public class Util
Various static utility methods.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static FileMenu |
getFileMenu()
|
static HashMap<String,JPanel> |
getInterfaceComponents()
|
static Pail |
getPlugin()
|
static ServerControlPanel |
getServerControls()
|
static void |
log(Level level,
Object message)
Logs a message from the plugin to the console with the specified level.. |
static void |
log(Object message)
Logs an info message from the plugin to the console. |
static String[] |
readLastLines(File file,
int numLines)
Reads the last number of specified lines in a file. |
static void |
saveTextFile(String text,
File saveTo)
Saves the specified text to a file. |
static void |
setFileMenu(FileMenu aFileMenu)
|
static void |
setPlugin(Pail aPlugin)
|
static void |
setServerControls(ServerControlPanel aServerControls)
|
static String |
translate(String text)
Translates the text to the configured language. |
static void |
translateTextComponent(JButton c)
|
static void |
translateTextComponent(JCheckBox c)
|
static void |
translateTextComponent(JLabel c)
|
static void |
translateTextComponent(JRadioButton c)
|
static void |
zipDir(File dir,
File zipFile)
Compresses a directory to a zip file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static String[] readLastLines(File file,
int numLines)
file - The file to read from.numLines - The number of lines to read from the end.
public static void log(Object message)
message - The message to send.
public static void log(Level level,
Object message)
level - The log level.message - The message to send.
public static void saveTextFile(String text,
File saveTo)
throws IOException
text - The text to save.saveTo - The file to write the text to.
IOExceptionpublic static String translate(String text)
text - The text to translate.
public static void zipDir(File dir,
File zipFile)
dir - The path to directory to compress.zipFile - The path to the resulting zip file.public static Pail getPlugin()
public static void setPlugin(Pail aPlugin)
aPlugin - the plugin to setpublic static HashMap<String,JPanel> getInterfaceComponents()
public static ServerControlPanel getServerControls()
public static void setServerControls(ServerControlPanel aServerControls)
aServerControls - the serverControls to setpublic static FileMenu getFileMenu()
public static void setFileMenu(FileMenu aFileMenu)
aFileMenu - the fileMenu to setpublic static void translateTextComponent(JCheckBox c)
public static void translateTextComponent(JLabel c)
public static void translateTextComponent(JButton c)
public static void translateTextComponent(JRadioButton c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||