public class Utils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Utils.STATUS
The enumeration of possible program states.
|
static class |
Utils.StatusChangeRunnable |
static class |
Utils.TableMouseListener
A class that selects all rows of a JTable when its header is clicked.
|
static class |
Utils.UncExHndlr
A sample uncaught-exception handler class for threads.
|
Modifier and Type | Field and Description |
---|---|
static Utils.UncExHndlr |
handler
A sample uncaught-exception handler instance for threads.
|
static java.util.regex.Pattern |
listPattern
A pattern describing the format of lists of elements received from
the phone.
|
Modifier and Type | Method and Description |
---|---|
static void |
changeGUI(java.lang.Runnable r)
Method used to change the GUI - runs r.run () on the
EventDispatchThread and waits for it to exit.
|
static int |
convertCalendarMonthToReal(int month) |
static int |
convertRealMonthToCalendar(int month) |
static javax.swing.JFileChooser |
createOpenFileChooser(java.lang.String description,
java.util.Map<java.lang.String,java.lang.Integer> filetype)
Crates a file chooser for opening single files of the given type.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getAddrfileIDs()
Gets the addrfileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getAnimfileIDs()
Gets the animfileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getEventfileIDs()
Gets the eventfileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getFiletypeIDs()
Gets the filetypeIDs map.
|
static float |
getFontSize(javax.swing.JSpinner spinner)
Returns the font size as intepreted from the given spinner.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getJavafileIDs()
Gets the javafileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getPhotofileIDs()
Gets the photofileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getRingfileIDs()
Gets the ringfileIDs map.
|
static java.util.Map<java.lang.String,java.lang.Integer> |
getTodofileIDs()
Gets the todofileIDs map.
|
static void |
handleException(java.lang.Throwable ex,
java.lang.Object data)
Displays all the important information about exceptions.
|
static boolean |
isAllowableDataBits(int dBits)
Tells whether the given integer is a valid data bits' value.
|
static boolean |
isAllowableSpeed(int speed)
Tells whether the given integer is a valid speed value.
|
static byte[] |
joinArrays(byte[] orig,
byte[] toAdd)
This function joins 2 arrays of bytes together.
|
static void |
setFontSize(java.awt.Component c,
float newSize)
Set the given font size in all the components in the given
Component (recursively, if it's a Container).
|
public static final java.util.regex.Pattern listPattern
public static final Utils.UncExHndlr handler
public static int convertCalendarMonthToReal(int month)
public static int convertRealMonthToCalendar(int month)
public static void handleException(java.lang.Throwable ex, java.lang.Object data)
ex
- The exception to display.data
- Any additional data to display.public static void changeGUI(java.lang.Runnable r)
r
- The code to run.public static void setFontSize(java.awt.Component c, float newSize)
c
- The Component with Components that will have their font
size changed.newSize
- The new font size to set.public static boolean isAllowableSpeed(int speed)
speed
- The value to test.public static boolean isAllowableDataBits(int dBits)
dBits
- The value to test.public static javax.swing.JFileChooser createOpenFileChooser(java.lang.String description, java.util.Map<java.lang.String,java.lang.Integer> filetype)
description
- The description to display in the filters list.filetype
- The Map with file extensions as keys.public static byte[] joinArrays(byte[] orig, byte[] toAdd)
orig
- The first array.toAdd
- The array to add.public static float getFontSize(javax.swing.JSpinner spinner)
spinner
- the spinner to read the font size from.public static java.util.Map<java.lang.String,java.lang.Integer> getFiletypeIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getPhotofileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getRingfileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getAddrfileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getTodofileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getEventfileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getAnimfileIDs()
public static java.util.Map<java.lang.String,java.lang.Integer> getJavafileIDs()