|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.strbio.util.JMC
public final class JMC
A class containing a bunch of useful functions
Method Summary | |
---|---|
static void |
centerFrame(java.awt.Frame f)
Center a frame on the screen. |
static void |
drawLineDashed(java.awt.Graphics g,
int ax,
int ay,
int bx,
int by)
draw a dashed line from point a to point b. |
static void |
drawLineDashed(java.awt.Graphics g,
int ax,
int ay,
int bx,
int by,
int segsize)
draw a dashed line from point a to point b. |
static void |
drawLineDotted(java.awt.Graphics g,
int ax,
int ay,
int bx,
int by)
draw a dotted line from point a to point b. |
static void |
drawLineHalfway(java.awt.Graphics g,
int ax,
int ay,
int bx,
int by)
draw a line from point a halfway to point b. |
static void |
fatal(java.lang.String s)
Print a fatal error, attempt to flush System.out and System.err, and exit with status one. |
static boolean |
isLittleEndian()
This guesses whether the current machine is little-endian, and would therefore need to use the reverseEndian calls when reading/writing DataStreams for use with C programs. |
static void |
oldCenterFrame(java.awt.Frame f)
Center a frame on the screen. |
static void |
oldRandomlyLocateFrame(java.awt.Frame f)
Randomly locate a frame somewhere on the screen where it fits. |
static void |
printArgs(java.lang.String[] argv)
Print out the arguments used to call the program to the standard output stream. |
static void |
printArgs(java.lang.String[] argv,
Printf outfile)
Print out the arguments used to call the program to a given Printf. |
static void |
printTime(float seconds)
Given a time in seconds, prints it in hours:minutes:seconds format to standard output. |
static void |
printTime(float seconds,
Printf outfile)
Given a time in seconds, prints it in hours:minutes:seconds format. |
static void |
programTimer()
Program timer routine. |
static void |
programTimer(Printf outfile)
Program timer routine. |
static void |
randomlyLocateFrame(java.awt.Frame f)
Randomly locate a frame somewhere on the screen where it fits. |
static double |
reverseEndian(double d)
byte-reverse a double |
static int |
reverseEndian(int i)
byte-reverse an integer |
static long |
reverseEndian(long l)
byte-reverse a long |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final void fatal(java.lang.String s)
s
- Text explaining the error.public static final void printArgs(java.lang.String[] argv, Printf outfile) throws java.io.IOException
Arguments: arg1 arg2 arg3 ....
argv
- The arguments that got passed to main.outfile
- File to output them to
java.io.IOException
public static final void printArgs(java.lang.String[] argv) throws java.io.IOException
Arguments: arg1 arg2 arg3 ....
argv
- The arguments that got passed to main.
java.io.IOException
public static final void printTime(float seconds, Printf outfile) throws java.io.IOException
seconds
- number of secondsoutfile
- where to print it to
java.io.IOException
public static final void printTime(float seconds) throws java.io.IOException
seconds
- number of seconds
java.io.IOException
public static final void programTimer(Printf outfile) throws java.io.IOException
outfile
- where to print to
java.io.IOException
public static final void programTimer() throws java.io.IOException
java.io.IOException
public static final void randomlyLocateFrame(java.awt.Frame f)
public static final void centerFrame(java.awt.Frame f)
public static final void oldRandomlyLocateFrame(java.awt.Frame f)
public static final void oldCenterFrame(java.awt.Frame f)
public static final void drawLineDashed(java.awt.Graphics g, int ax, int ay, int bx, int by, int segsize)
public static final void drawLineDashed(java.awt.Graphics g, int ax, int ay, int bx, int by)
public static final void drawLineDotted(java.awt.Graphics g, int ax, int ay, int bx, int by)
public static final void drawLineHalfway(java.awt.Graphics g, int ax, int ay, int bx, int by)
public static final boolean isLittleEndian()
public static final int reverseEndian(int i)
public static final long reverseEndian(long l)
public static final double reverseEndian(double d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |