Class sunsoft.jws.visual.rt.base.Util
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.base.Util
java.lang.Object
|
+----sunsoft.jws.visual.rt.base.Util
- public class Util
- extends Object
Utilities needed by run-time.
-
RELIEF_FLAT
-
-
RELIEF_GROOVE
-
-
RELIEF_RAISED
-
-
RELIEF_RIDGE
-
-
RELIEF_SUNKEN
-
-
WIN95_FIELD_BORDER
-
-
WIN95_RAISED
-
-
WIN95_SUNKEN
-
-
WIN95_WINDOW_BORDER
-
-
Util()
-
-
brighter(Color)
- Returns a brighter version of this color.
-
darker(Color)
- Returns a darker version of this color.
-
draw3DRect(Graphics, int, int, int, int, int, int)
- Draw a 3D rectable with the given relief and border width.
-
fileToString(String)
- Creates a string from the contents of a file.
-
getWorkaroundImage(Image, Component)
- Get an image given another.
-
getWorkaroundImage(URL, Component)
- Get an image given a url.
-
isEqual(Object, Object)
- Compares two objects and returns if they are equal.
-
pack(Window)
- A workaround routine for the Windows95 pack bug in 1.0.2
-
pathToURL(String, Applet)
- Returns a URL based on a relative path to a file or directory.
-
qsort(String[])
- Quicksort for strings.
-
readURLToString(URL)
- Creates a string from reading a URL.
-
stringToFile(String, String)
- Puts a string out to a file.
RELIEF_FLAT
public final static int RELIEF_FLAT
RELIEF_RAISED
public final static int RELIEF_RAISED
RELIEF_SUNKEN
public final static int RELIEF_SUNKEN
RELIEF_RIDGE
public final static int RELIEF_RIDGE
RELIEF_GROOVE
public final static int RELIEF_GROOVE
WIN95_RAISED
public final static int WIN95_RAISED
WIN95_SUNKEN
public final static int WIN95_SUNKEN
WIN95_FIELD_BORDER
public final static int WIN95_FIELD_BORDER
WIN95_WINDOW_BORDER
public final static int WIN95_WINDOW_BORDER
Util
public Util()
brighter
public Color brighter(Color c)
- Returns a brighter version of this color.
darker
public Color darker(Color c)
- Returns a darker version of this color.
draw3DRect
public void draw3DRect(Graphics g,
int x,
int y,
int w,
int h,
int relief,
int bd)
- Draw a 3D rectable with the given relief and border width.
getWorkaroundImage
public Image getWorkaroundImage(URL url,
Component comp)
- Get an image given a url. If we are on Windows 95, then we
need to use a filter to get around the transparency bugs.
getWorkaroundImage
public Image getWorkaroundImage(Image image,
Component comp)
- Get an image given another. If we are on Windows 95, then we
need to use a filter to get around the transparency bugs.
Otherwise, just return the image directly.
pathToURL
public URL pathToURL(String path,
Applet applet)
- Returns a URL based on a relative path to a file or directory.
If we are running under a browser, then a URL is created based
off of the code base. Otherwise, a file URL will be created
by searching the CLASSPATH for the file.
readURLToString
public String readURLToString(URL url) throws IOException
- Creates a string from reading a URL. Returns null when an error occurs.
fileToString
public String fileToString(String filename) throws FileNotFoundException, IOException, SecurityException
- Creates a string from the contents of a file. Returns null when
an error occurs, or the filename turns out to be a directory.
stringToFile
public void stringToFile(String saveString,
String filename) throws FileNotFoundException, IOException, SecurityException
- Puts a string out to a file. Returns true on success.
isEqual
public boolean isEqual(Object o1,
Object o2)
- Compares two objects and returns if they are equal. Will work with
null objects
qsort
public void qsort(String list[])
- Quicksort for strings. Could not get James Gosling's example working
properly, or the "fixed" example, so wrote my own using algorithms
book.
pack
public static void pack(Window c)
- A workaround routine for the Windows95 pack bug in 1.0.2
- Parameters:
- c - The component to pack
All Packages Class Hierarchy This Package Previous Next Index