org.systemsbiology.gaggle.util
Class MiscUtil

java.lang.Object
  extended by org.systemsbiology.gaggle.util.MiscUtil

public class MiscUtil
extends java.lang.Object


Constructor Summary
MiscUtil()
           
 
Method Summary
static int countOccurences(java.lang.String textToSearch, java.lang.String pattern)
           
static void displayWebPage(java.lang.String urlString)
           
static void displayWebPage(java.net.URL url)
           
static java.lang.String getPage(java.lang.String urlString)
           
static java.lang.String getPage(java.net.URL url)
           
static void openURL(java.lang.String url)
           
static void placeInCenter(javax.swing.JFrame frame)
           
static void setJFrameAlwaysOnTop(javax.swing.JFrame frame, boolean newValue)
          this is a nop for java < 1.5
static void updateGooseChooser(javax.swing.JComboBox gooseChooser, java.lang.String callingGoose, java.lang.String[] allGeese)
          Updates the UI to show the current list of geese.
static void updateGooseChooserOLD(Boss boss, javax.swing.JComboBox chooser, java.lang.String callingGoose, java.lang.String[] pseudoGeese)
          Deprecated. - use updateGooseChooser() instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiscUtil

public MiscUtil()
Method Detail

placeInCenter

public static void placeInCenter(javax.swing.JFrame frame)

displayWebPage

public static void displayWebPage(java.lang.String urlString)

displayWebPage

public static void displayWebPage(java.net.URL url)

getPage

public static java.lang.String getPage(java.lang.String urlString)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getPage

public static java.lang.String getPage(java.net.URL url)
                                throws java.lang.Exception
Throws:
java.lang.Exception

openURL

public static void openURL(java.lang.String url)

setJFrameAlwaysOnTop

public static void setJFrameAlwaysOnTop(javax.swing.JFrame frame,
                                        boolean newValue)
this is a nop for java < 1.5


updateGooseChooserOLD

public static void updateGooseChooserOLD(Boss boss,
                                         javax.swing.JComboBox chooser,
                                         java.lang.String callingGoose,
                                         java.lang.String[] pseudoGeese)
Deprecated. - use updateGooseChooser() instead

re-populate the chooser with all geese known to the boss, 'Boss', and any pseudo-geese the calling goose wants to add. leave out the name of the calling goose. alphabetize the names. todo - remove when all geese implement update()


updateGooseChooser

public static void updateGooseChooser(javax.swing.JComboBox gooseChooser,
                                      java.lang.String callingGoose,
                                      java.lang.String[] allGeese)
Updates the UI to show the current list of geese. Removes the name of the calling goose from the list, and sorts the remainder. Tries to preserve the original selection in the list, if it still exists in the newly received current goose list.

Parameters:
gooseChooser - The UI element containing the list of geese
callingGoose - The name of the calling goose
allGeese - The list of all currently active geese

countOccurences

public static int countOccurences(java.lang.String textToSearch,
                                  java.lang.String pattern)