|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.fmj.ejmf.toolkit.util.Utility
public class Utility
Static utilites for common JMF routines From the book: Essential JMF, Gordon, Talley (ISBN 0130801046). Used with permission.
| Constructor Summary | |
|---|---|
Utility()
|
|
| Method Summary | |
|---|---|
static MediaLocator |
appArgToMediaLocator(java.lang.String arg)
Converts a string to a URL. |
static MediaLocator |
appletArgToMediaLocator(java.applet.Applet applet,
java.lang.String arg)
Converts an applet argument to a MediaLocator. |
static javax.swing.Icon |
createDisabledIcon(javax.swing.ImageIcon imageIcon)
Create a disabled icon using a gray filter. |
static java.net.URL |
fileToURL(java.lang.String fileName)
Convert a File to a URL using file: protocol. |
static java.lang.String |
getExtension(java.io.File f)
Given a File object, return a String representing the file's extension. |
static java.lang.String |
getExtension(java.lang.String filename)
Given a String representing a file name, return a String representing the file's extension. |
static Time |
getMaximumLatency(Controller[] controllers)
Given an array of Controllers, calculate the maximum startup latency in seconds. |
static int |
pickAMaster(Player[] players)
Pick a master Player for an array of Players. |
static void |
showControls(Controller controller)
Displays each Control not currently being shown. |
static java.lang.String |
stateToString(int state)
Convert a Controller state to a string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utility()
| Method Detail |
|---|
public static MediaLocator appletArgToMediaLocator(java.applet.Applet applet,
java.lang.String arg)
public static java.net.URL fileToURL(java.lang.String fileName)
throws java.io.IOException,
java.net.MalformedURLException
fileName - The file to convert
java.io.IOException
java.net.MalformedURLExceptionpublic static MediaLocator appArgToMediaLocator(java.lang.String arg)
arg - the url string to convert
public static java.lang.String stateToString(int state)
state - the state to convert
public static Time getMaximumLatency(Controller[] controllers)
All Controllers must be at least in the Realized state. If a Controller is not in the realized state, its value is ignored.
If all Controllers report LATENCY_UNKNOWN, return LATENCY_UNKNOWN and let the caller worry about what to do.
controllers - An array of javax.media.Controller objects
all at least realized.
public static java.lang.String getExtension(java.io.File f)
f - A java.io.File object
public static java.lang.String getExtension(java.lang.String filename)
filename - A filename as a java.lang.String object
public static void showControls(Controller controller)
public static int pickAMaster(Player[] players)
players - an array of Players
public static javax.swing.Icon createDisabledIcon(javax.swing.ImageIcon imageIcon)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||