Class sfclasses.Utils
All Packages Class Hierarchy This Package Previous Next Index
Class sfclasses.Utils
java.lang.Object
|
+----sfclasses.Utils
- public class Utils
- extends Object
Collection of utility routines
-
Utils()
-
-
add_component(Container, Component, GridBagLayout, GridBagConstraints, int, int, int, int, int, int)
- Prepare component to be added using GridBagLayout
-
fileURLPrefix()
- Construct system dependent prefix for file URLs
-
getParentFrame(Component)
- Execute getParent() repeatedly until it finds the parent frame
-
greenBall()
-
-
parseIP(String)
- Parse string of the form xxx.xxx.xxx.xxx and return an IP
address in byte array format.
-
printIP(byte[])
- Print an IP address given in byte array format.
-
redBall()
-
-
timeString(Date)
-
-
unsign(byte)
-
-
unsign(int)
-
-
unsign(short)
-
-
yellowBall()
-
Utils
public Utils()
add_component
public static void add_component(Container cont,
Component c,
GridBagLayout gbl,
GridBagConstraints gbc,
int x,
int y,
int w,
int h,
int wx,
int wy)
- Prepare component to be added using GridBagLayout
getParentFrame
public static Frame getParentFrame(Component pcomp)
- Execute getParent() repeatedly until it finds the parent frame
- Parameters:
- pcomp - Component
- Returns:
- parent frame
fileURLPrefix
public static String fileURLPrefix()
- Construct system dependent prefix for file URLs
parseIP
public static byte[] parseIP(String addr) throws IllegalArgumentException
- Parse string of the form xxx.xxx.xxx.xxx and return an IP
address in byte array format.
printIP
public static String printIP(byte addr[])
- Print an IP address given in byte array format.
- Returns:
- String containing the IP address xxx.xxx.xxx.xxx
unsign
public static long unsign(byte i)
- Returns:
- Unsigned value of a byte variable (0..255)
unsign
public static long unsign(short i)
- Returns:
- Unsigned value of a short variable (0..65535)
unsign
public static long unsign(int i)
- Returns:
- Unsigned value of an int variable (0..2^32-1)
timeString
public static String timeString(Date d)
- Parameters:
- d - Date object
- Returns:
- String containing only the time from Date.toString()
redBall
public static Image redBall()
- Returns:
- Red ball icon
greenBall
public static Image greenBall()
- Returns:
- Green ball icon
yellowBall
public static Image yellowBall()
- Returns:
- Yellow ball icon
All Packages Class Hierarchy This Package Previous Next Index