gui
Class GUIUtils

java.lang.Object
  extended by gui.GUIUtils

public final class GUIUtils
extends java.lang.Object

This class contains helper methods for the GUI.


Nested Class Summary
static interface GUIUtils.AWTEventListener
           
private static class GUIUtils.IconScaler
          Diese Klasse dient dazu aus einem vorhandenen Icon ein neues Icon herzustellen.
static interface GUIUtils.IIconResizer
          Defines a resize factor for icons that is especially useful if the font size is altered.
static interface GUIUtils.NativeGUILibrary
           
static class GUIUtils.Screen
           
private static class GUIUtils.ToolTipMouseListener
           
static class GUIUtils.WindowDocker
           
 
Field Summary
private static java.util.Vector AWT_EVENT_LISTENERS
           
private static GUIUtils.IIconResizer DEFAULT_RESIZER
           
private static GUIUtils.NativeGUILibrary DUMMY_GUI_LIBRARY
           
private static int MAXIMUM_TEXT_LENGTH
           
private static boolean ms_bCapturingAWTEvents
           
private static java.util.Hashtable ms_iconCache
           
private static boolean ms_loadImages
           
private static GUIUtils.AWTEventListener ms_mouseListener
           
private static java.awt.Point ms_mousePosition
           
private static GUIUtils.NativeGUILibrary ms_nativeGUILibrary
           
private static GUIUtils.IIconResizer ms_resizer
           
private static java.lang.String MSG_COPY_FROM_CLIP
           
static java.lang.String MSG_DEFAULT_IMGAGE_PATH
          The default path to store images.
static java.lang.String MSG_DEFAULT_IMGAGE_PATH_LOWCOLOR
          Images with a smaller pixes size than 16 bit should be stored in this path.
private static java.lang.String MSG_PASTE_FILE
           
private static java.lang.String MSG_SAVED_TO_CLIP
           
private static GUIUtils.IIconResizer RESIZER
           
private static java.lang.Object SYNC_MOUSE_POSITION
           
 
Constructor Summary
GUIUtils()
           
 
Method Summary
static void addAWTEventListener(GUIUtils.AWTEventListener a_listener)
           
static java.awt.event.MouseListener addTimedTooltipListener(javax.swing.JComponent c)
           
private static void adjustFontSize(java.lang.Object a_fontObject, float a_resize)
          Resizes a specific default font of the UIManager by a fixed factor.
static void centerOnScreen(java.awt.Window a_window)
          Centers a window relative to the default screen.
static void centerOnWindow(java.awt.Window a_window, java.awt.Window a_parent)
          Positions a window on the screen centered to a parent window.
static javax.swing.ImageIcon combine(javax.swing.ImageIcon a_one, javax.swing.ImageIcon a_two)
          Combines two images vertically to one image.
static javax.swing.JButton createButton(java.lang.String messageKey)
           
static javax.swing.JLabel createLabel(java.lang.String messageKey)
          Convenience function to create a JLabel with the message belonging to the specified key
static javax.swing.JLabel createLabel(java.lang.String[] messageKeys)
          Generalization of the other createLabel methods.
static javax.swing.JLabel createLabel(java.lang.String messageKey1, java.lang.String messageKey2)
          Convenience function to create a JLabel with two slash-separated messages belonging to the specified two keys
static javax.swing.JLabel createMultiLineLabel(java.lang.String messageKey, int width)
          Convenience function to create a JLabel that can display large messages.
static javax.swing.Icon createScaledIcon(javax.swing.Icon a_icon, GUIUtils.IIconResizer a_resizer)
           
static javax.swing.ImageIcon createScaledImageIcon(javax.swing.ImageIcon a_icon, GUIUtils.IIconResizer a_resizer)
           
static javax.swing.JTextPane createSelectableAndResizeableLabel(java.awt.Component a_parent)
          Creates a JTextPane that may be used to simulate a selectable and resizeable JLabel.
static void exitWithNoMessagesError(java.lang.String a_resourceBundleFilename)
           
static java.lang.String getCountryFromServiceLocation(ServiceLocation a_loc)
           
static GUIUtils.Screen getCurrentScreen(java.awt.Component a_component)
           
static GUIUtils.Screen getCurrentScreen(java.awt.Window a_window)
           
private static java.awt.Rectangle getDefaultScreenBounds(java.awt.Window a_window)
          Returns the bounds of the default screen.
static GUIUtils.IIconResizer getIconResizer()
           
static java.awt.Dimension getMaxSize(java.util.Vector aComponents)
          getMaxSize: takes a Vector of JComponents and returns a Dimension with width and height equivalent to the maximum width and height among the Components of the Vector
static java.awt.Point getMiddlePoint(java.awt.Window a_window)
           
static java.awt.Point getMousePosition()
          Returns the current mouse position on the screen.
static java.awt.Point getMousePosition(java.awt.Component a_component)
           
private static GUIUtils.Screen getOverlappingScreen(GUIUtils.Screen a_screen, java.awt.Window a_window)
          Checks if a screen overlaps with the default screen and trims the screen area if needed.
static java.awt.Window getParentWindow(java.awt.Component a_component)
          Finds the first parent that is a window.
static java.awt.Point getRelativePosition(java.awt.Point a_positionOnScreen, java.awt.Component a_component)
           
static GUIUtils.Screen[] getScreens(java.awt.Window a_window)
           
static java.awt.datatransfer.Clipboard getSystemClipboard()
          Returns the system-wide clipboard.
static java.lang.String getTextFromClipboard(java.awt.Component a_requestingComponent)
           
private static java.lang.String getTextFromClipboard(java.awt.Component a_requestingComponent, boolean a_bUseTextArea)
           
static java.awt.Dimension getTotalSize(java.util.Vector aComponents)
          getTotalSize: takes a Vector of JComponents and returns a Dimension with width and height equivalent to the cumulative width and height of all the Components of the Vector Typically, you'll only use either height or width (e.g.
static boolean hasJavaOnTop()
           
private static void interruptAWTEventThread()
           
static boolean isAlwaysOnTop(java.awt.Component a_component)
           
static boolean isAlwaysOnTop(java.awt.Window a_Window)
          Returns if the alwaysOnTop method of JRE 1.5 is set on a given Window.
static boolean isLoadingImagesStopped()
           
static boolean isMouseButton(java.awt.event.MouseEvent a_event, int a_buttonMask)
          Tests which mouse button was the cause for the specified MouseEvent.
static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath)
          Loads an ImageIcon from the classpath or the current directory.
static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath, boolean a_bSync)
          Loads an ImageIcon from the classpath or the current directory.
static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath, boolean a_bSync, boolean a_bScale)
          Loads an ImageIcon from the classpath or the current directory.
private static javax.swing.ImageIcon loadImageIconInternal(java.net.URL a_imageURL)
           
static void moveToUpRightCorner(java.awt.Window a_window)
          Moves the given Window to the upright corner of the default screen.
static void positionRightUnderWindow(java.awt.Window a_window, java.awt.Window a_parent)
          Positions a window on the screen relative to a parent window so that its position is optimised.
static java.util.Vector registerLookAndFeelClasses(java.io.File a_file)
          Registers all instanciable subclasses of javax.swing.LookAndFeel from a file in the UIManager.
static void removeAWTEventListener(GUIUtils.AWTEventListener a_listener)
           
static void resizeAllFonts(float a_resize)
          Resizes all fonts of the UIManager by a fixed factor.
static boolean restoreLocation(java.awt.Window a_window, java.awt.Point a_location)
          Sets a window to the specified position and tries to put the window inside the screen by altering the position if needed.
static boolean restoreSize(java.awt.Window a_window, java.awt.Dimension a_size)
          Sets a window to the specified size and tries to put the window inside the screen by altering the size if needed.
static void saveTextToClipboard(java.lang.String strText, java.awt.Component a_requestingComponent)
           
static boolean setAlwaysOnTop(java.awt.Component a_component, boolean a_bOnTop)
           
static boolean setAlwaysOnTop(java.awt.Window a_Window, boolean a_bOnTop)
          Tries to use the method setAlwaysOnTop of JRE 1.5.
static void setEqualWidths(java.util.Vector aComponents, java.awt.Dimension aDimension)
          Takes a Vector of components, and sets the width of all components to the width of the Dimension passsed as parameter Just like @see setSizes(), except it only affects the width, and leaves height unchanged
static void setFontStyle(java.awt.Component a_component, int a_style)
           
static void setIconResizer(GUIUtils.IIconResizer a_resizer)
           
static void setLoadImages(boolean a_bLoadImages)
          Stops loading of images, e.g.
static void setLocationRelativeTo(java.awt.Component a_component, java.awt.Window a_movedWindow)
           
static void setNativeGUILibrary(GUIUtils.NativeGUILibrary a_library)
           
static void setSizes(java.util.Vector aComponents, java.awt.Dimension aDimension)
          setSizes: takes a Vector of JCoponents and sets them all to the Dimension passed as parameter (sets preferredSize as well as maximumSize)
static int showMonitoredFileChooser(javax.swing.JFileChooser a_chooser, java.awt.Component a_parent)
          This method shows a JFileChooser.
static java.lang.String trim(java.lang.String a_strOriginal)
          Shortens a text received from the IS or in a certificate so that it is not to long to display.
static java.lang.String trim(java.lang.String a_strOriginal, int a_maximumLength)
          Shortens a text received from the IS or in a certificate so that it is not to long to display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_DEFAULT_IMGAGE_PATH

public static final java.lang.String MSG_DEFAULT_IMGAGE_PATH
The default path to store images.


MSG_DEFAULT_IMGAGE_PATH_LOWCOLOR

public static final java.lang.String MSG_DEFAULT_IMGAGE_PATH_LOWCOLOR
Images with a smaller pixes size than 16 bit should be stored in this path. Their names must be equal to the corresponding images in the default path.


MSG_PASTE_FILE

private static final java.lang.String MSG_PASTE_FILE

MSG_COPY_FROM_CLIP

private static final java.lang.String MSG_COPY_FROM_CLIP

MSG_SAVED_TO_CLIP

private static final java.lang.String MSG_SAVED_TO_CLIP

MAXIMUM_TEXT_LENGTH

private static final int MAXIMUM_TEXT_LENGTH
See Also:
Constant Field Values

ms_loadImages

private static boolean ms_loadImages

ms_bCapturingAWTEvents

private static boolean ms_bCapturingAWTEvents

ms_mousePosition

private static java.awt.Point ms_mousePosition

SYNC_MOUSE_POSITION

private static final java.lang.Object SYNC_MOUSE_POSITION

ms_mouseListener

private static GUIUtils.AWTEventListener ms_mouseListener

AWT_EVENT_LISTENERS

private static final java.util.Vector AWT_EVENT_LISTENERS

DEFAULT_RESIZER

private static final GUIUtils.IIconResizer DEFAULT_RESIZER

ms_resizer

private static GUIUtils.IIconResizer ms_resizer

DUMMY_GUI_LIBRARY

private static final GUIUtils.NativeGUILibrary DUMMY_GUI_LIBRARY

ms_nativeGUILibrary

private static GUIUtils.NativeGUILibrary ms_nativeGUILibrary

RESIZER

private static final GUIUtils.IIconResizer RESIZER

ms_iconCache

private static java.util.Hashtable ms_iconCache
Constructor Detail

GUIUtils

public GUIUtils()
Method Detail

getIconResizer

public static final GUIUtils.IIconResizer getIconResizer()

setLoadImages

public static void setLoadImages(boolean a_bLoadImages)
Stops loading of images, e.g. because of an update of the parent JAR file.


isLoadingImagesStopped

public static boolean isLoadingImagesStopped()

setIconResizer

public static final void setIconResizer(GUIUtils.IIconResizer a_resizer)

loadImageIcon

public static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath)
Loads an ImageIcon from the classpath or the current directory. The icon may be contained in an archive (JAR) or a directory structure. If the icon could not be found in the classpath, it is loaded from the current directory. If even the current directory does not contain the icon, it is loaded from the default image path. Once an icon is loaded, it is stored in a memory cache, so that further calls of this method do not load the icon from the file system, but from the cache.

Parameters:
a_strRelativeImagePath - the relative resource path or filename of the Image
Returns:
the loaded ImageIcon or null if the icon could not be loaded (getImageLoadStatus() == java.awt.MediaTracker.ERRORED)

loadImageIcon

public static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath,
                                                  boolean a_bSync)
Loads an ImageIcon from the classpath or the current directory. The icon may be contained in an archive (JAR) or a directory structure. If the icon could not be found in the classpath, it is loaded from the current directory. If even the current directory does not contain the icon, it is loaded from the default image path. Once an icon is loaded, it is stored in a memory cache, so that further calls of this method do not load the icon from the file system, but from the cache. The image may be loaded synchronously so that the method only returns when the image has been loaded completely (or an error occured), or asynchronously so that the method returns even if the image has not been loaded yet.

Parameters:
a_strRelativeImagePath - the relative resource path or filename of the Image
a_bSync - true if the image should be loaded synchronously; false otherwise
Returns:
the loaded ImageIcon or null if the icon could not be loaded (getImageLoadStatus() == java.awt.MediaTracker.ERRORED)

loadImageIcon

public static javax.swing.ImageIcon loadImageIcon(java.lang.String a_strRelativeImagePath,
                                                  boolean a_bSync,
                                                  boolean a_bScale)
Loads an ImageIcon from the classpath or the current directory. The icon may be contained in an archive (JAR) or a directory structure. If the icon could not be found in the classpath, it is loaded from the current directory. If even the current directory does not contain the icon, it is loaded from the default image path. Once an icon is loaded, it is stored in a memory cache, so that further calls of this method do not load the icon from the file system, but from the cache. The image may be loaded synchronously so that the method only returns when the image has been loaded completely (or an error occured), or asynchronously so that the method returns even if the image has not been loaded yet.

Parameters:
a_strRelativeImagePath - the relative resource path or filename of the Image
a_bSync - true if the image should be loaded synchronously; false otherwise
a_bScale - if the icon should be auto-scaled
Returns:
the loaded ImageIcon or null if the icon could not be loaded (getImageLoadStatus() == java.awt.MediaTracker.ERRORED)

loadImageIconInternal

private static javax.swing.ImageIcon loadImageIconInternal(java.net.URL a_imageURL)

combine

public static javax.swing.ImageIcon combine(javax.swing.ImageIcon a_one,
                                            javax.swing.ImageIcon a_two)
Combines two images vertically to one image.

Parameters:
a_one - an ImageIcon
a_two - another ImageIcon
Returns:
ImageIcon the combination of both ImageIcons or a_one if this method is not supported by the current JRE

setLocationRelativeTo

public static void setLocationRelativeTo(java.awt.Component a_component,
                                         java.awt.Window a_movedWindow)

getParentWindow

public static java.awt.Window getParentWindow(java.awt.Component a_component)
Finds the first parent that is a window.

Parameters:
a_component - a Component
Returns:
the first parent that is a window (may be the component itself) or the default frame if no parent window was found

positionRightUnderWindow

public static void positionRightUnderWindow(java.awt.Window a_window,
                                            java.awt.Window a_parent)
Positions a window on the screen relative to a parent window so that its position is optimised.

Parameters:
a_window - a Window
a_parent - the Window's parent window

moveToUpRightCorner

public static void moveToUpRightCorner(java.awt.Window a_window)
Moves the given Window to the upright corner of the default screen.

Parameters:
a_window - a Window

setNativeGUILibrary

public static void setNativeGUILibrary(GUIUtils.NativeGUILibrary a_library)

isAlwaysOnTop

public static boolean isAlwaysOnTop(java.awt.Component a_component)

isAlwaysOnTop

public static boolean isAlwaysOnTop(java.awt.Window a_Window)
Returns if the alwaysOnTop method of JRE 1.5 is set on a given Window.

Parameters:
a_Window - a Window
Returns:
if the alwaysOnTop method of JRE 1.5 is set on a given Window

setFontStyle

public static void setFontStyle(java.awt.Component a_component,
                                int a_style)

setAlwaysOnTop

public static boolean setAlwaysOnTop(java.awt.Component a_component,
                                     boolean a_bOnTop)

hasJavaOnTop

public static boolean hasJavaOnTop()

setAlwaysOnTop

public static boolean setAlwaysOnTop(java.awt.Window a_Window,
                                     boolean a_bOnTop)
Tries to use the method setAlwaysOnTop of JRE 1.5.

Parameters:
a_Window - Window
a_bOnTop - boolean
Returns:
if the method setAlwaysOnTop could be called with the given arguments

restoreSize

public static boolean restoreSize(java.awt.Window a_window,
                                  java.awt.Dimension a_size)
Sets a window to the specified size and tries to put the window inside the screen by altering the size if needed. The location of the window should be set before.

Parameters:
a_window - Window
a_size - Dimension
Returns:
if the size has been changed

getMiddlePoint

public static java.awt.Point getMiddlePoint(java.awt.Window a_window)

restoreLocation

public static boolean restoreLocation(java.awt.Window a_window,
                                      java.awt.Point a_location)
Sets a window to the specified position and tries to put the window inside the screen by altering the position if needed.

Parameters:
a_window - Window
a_location - Point
Returns:
if the location has been changed

addTimedTooltipListener

public static java.awt.event.MouseListener addTimedTooltipListener(javax.swing.JComponent c)

getScreens

public static GUIUtils.Screen[] getScreens(java.awt.Window a_window)

getCurrentScreen

public static GUIUtils.Screen getCurrentScreen(java.awt.Component a_component)

getCurrentScreen

public static GUIUtils.Screen getCurrentScreen(java.awt.Window a_window)

centerOnScreen

public static void centerOnScreen(java.awt.Window a_window)
Centers a window relative to the default screen.

Parameters:
a_window - a Window

centerOnWindow

public static void centerOnWindow(java.awt.Window a_window,
                                  java.awt.Window a_parent)
Positions a window on the screen centered to a parent window.

Parameters:
a_window - a Window
a_parent - the Window's parent window

createSelectableAndResizeableLabel

public static javax.swing.JTextPane createSelectableAndResizeableLabel(java.awt.Component a_parent)
Creates a JTextPane that may be used to simulate a selectable and resizeable JLabel. If you do not want the label to be selectable, you may set enabled to false.

Parameters:
a_parent - Component
Returns:
JTextPane

createMultiLineLabel

public static javax.swing.JLabel createMultiLineLabel(java.lang.String messageKey,
                                                      int width)
Convenience function to create a JLabel that can display large messages. The message belonging to the specified key will be split and displayed in multiple lines if its size is too large to be displayed in a single line

Parameters:
messageKey - key of the message
width - of the label to enforce line breaks.
Returns:
a JLabel with the message belonging to the specified key

createLabel

public static javax.swing.JLabel createLabel(java.lang.String messageKey)
Convenience function to create a JLabel with the message belonging to the specified key

Parameters:
messageKey - key of the message
Returns:
a JLabel with the message belonging to the specified key

createLabel

public static javax.swing.JLabel createLabel(java.lang.String messageKey1,
                                             java.lang.String messageKey2)
Convenience function to create a JLabel with two slash-separated messages belonging to the specified two keys

Parameters:
messageKey1 - key of the first message
messageKey2 - key of the second message
Returns:
a JLabel with two slash-separated messages belonging to the specified two keys

createButton

public static javax.swing.JButton createButton(java.lang.String messageKey)

createLabel

public static javax.swing.JLabel createLabel(java.lang.String[] messageKeys)
Generalization of the other createLabel methods. Creates a simple JLabel displaying the messages to the specified messageKeys separated by a slash.

Parameters:
messageKeys - keys to the messages that shall be displayed by a JLabel
Returns:
a simple JLabel with the properties as text that the specified message-keys are mapping. The displayed properties are separated by a slash.

isMouseButton

public static boolean isMouseButton(java.awt.event.MouseEvent a_event,
                                    int a_buttonMask)
Tests which mouse button was the cause for the specified MouseEvent. Use the button masks from MouseEvent.

Parameters:
a_event - a MouseEvent
a_buttonMask - a button mask from MouseEvent
Returns:
if the event was triggered by the given mouse button
See Also:
MouseEvent

getSystemClipboard

public static java.awt.datatransfer.Clipboard getSystemClipboard()
Returns the system-wide clipboard.

Returns:
the system-wide clipboard Clipboard

registerLookAndFeelClasses

public static java.util.Vector registerLookAndFeelClasses(java.io.File a_file)
                                                   throws java.lang.IllegalAccessException
Registers all instanciable subclasses of javax.swing.LookAndFeel from a file in the UIManager.

Returns:
the files that contain the newly loaded look&feel classes
Throws:
java.lang.IllegalAccessException

resizeAllFonts

public static void resizeAllFonts(float a_resize)
Resizes all fonts of the UIManager by a fixed factor.

Parameters:
a_resize - the factor to resize the fonts

getTextFromClipboard

public static java.lang.String getTextFromClipboard(java.awt.Component a_requestingComponent)

saveTextToClipboard

public static void saveTextToClipboard(java.lang.String strText,
                                       java.awt.Component a_requestingComponent)

createScaledImageIcon

public static javax.swing.ImageIcon createScaledImageIcon(javax.swing.ImageIcon a_icon,
                                                          GUIUtils.IIconResizer a_resizer)

createScaledIcon

public static javax.swing.Icon createScaledIcon(javax.swing.Icon a_icon,
                                                GUIUtils.IIconResizer a_resizer)

trim

public static java.lang.String trim(java.lang.String a_strOriginal,
                                    int a_maximumLength)
Shortens a text received from the IS or in a certificate so that it is not to long to display.

Parameters:
a_strOriginal - String
a_maximumLength - the maximum length that is displayed
Returns:
the stripped text

trim

public static java.lang.String trim(java.lang.String a_strOriginal)
Shortens a text received from the IS or in a certificate so that it is not to long to display.

Parameters:
a_strOriginal - String
Returns:
the stripped text

addAWTEventListener

public static void addAWTEventListener(GUIUtils.AWTEventListener a_listener)

removeAWTEventListener

public static void removeAWTEventListener(GUIUtils.AWTEventListener a_listener)

getMousePosition

public static java.awt.Point getMousePosition()
Returns the current mouse position on the screen.

Returns:
the current mouse position on the screen or null if the mouse position is unknown

getRelativePosition

public static java.awt.Point getRelativePosition(java.awt.Point a_positionOnScreen,
                                                 java.awt.Component a_component)

getMousePosition

public static java.awt.Point getMousePosition(java.awt.Component a_component)

getOverlappingScreen

private static GUIUtils.Screen getOverlappingScreen(GUIUtils.Screen a_screen,
                                                    java.awt.Window a_window)
Checks if a screen overlaps with the default screen and trims the screen area if needed.

Parameters:
a_screen - Screen
a_window - Window
Returns:
Screen

getTextFromClipboard

private static java.lang.String getTextFromClipboard(java.awt.Component a_requestingComponent,
                                                     boolean a_bUseTextArea)

getDefaultScreenBounds

private static java.awt.Rectangle getDefaultScreenBounds(java.awt.Window a_window)
Returns the bounds of the default screen. This method is private as is does not always return the right coordinates and screen bounds.

Parameters:
a_window - a Window
Returns:
the bounds of the default screen

adjustFontSize

private static void adjustFontSize(java.lang.Object a_fontObject,
                                   float a_resize)
Resizes a specific default font of the UIManager by a fixed factor.

Parameters:
a_fontObject - a UIManager font object
a_resize - the factor to resize the given font

getMaxSize

public static java.awt.Dimension getMaxSize(java.util.Vector aComponents)
getMaxSize: takes a Vector of JComponents and returns a Dimension with width and height equivalent to the maximum width and height among the Components of the Vector

Parameters:
aComponents - Vector
Returns:
Dimension

getTotalSize

public static java.awt.Dimension getTotalSize(java.util.Vector aComponents)
getTotalSize: takes a Vector of JComponents and returns a Dimension with width and height equivalent to the cumulative width and height of all the Components of the Vector Typically, you'll only use either height or width (e.g. find out how high a parent component has to be to contain all the components of the Vector)

Parameters:
aComponents - Vector
Returns:
Dimension

showMonitoredFileChooser

public static int showMonitoredFileChooser(javax.swing.JFileChooser a_chooser,
                                           java.awt.Component a_parent)
This method shows a JFileChooser. If the JFileChooser does not show up, the AWT event dispatch thread will be interrupted. This happened on Windows Vista 32 (not often, but it did) with JRE 6. It might also happen on other systems and with other JREs.

Parameters:
a_chooser - a file chooser
a_parent - the parent component over which the file chooser should be displayed
Returns:
the return value of the JFileChooser object

setSizes

public static void setSizes(java.util.Vector aComponents,
                            java.awt.Dimension aDimension)
setSizes: takes a Vector of JCoponents and sets them all to the Dimension passed as parameter (sets preferredSize as well as maximumSize)

Parameters:
aComponents - Vector
aDimension - Dimension

setEqualWidths

public static void setEqualWidths(java.util.Vector aComponents,
                                  java.awt.Dimension aDimension)
Takes a Vector of components, and sets the width of all components to the width of the Dimension passsed as parameter Just like @see setSizes(), except it only affects the width, and leaves height unchanged

Parameters:
aComponents - Vector
aDimension - Dimension

exitWithNoMessagesError

public static void exitWithNoMessagesError(java.lang.String a_resourceBundleFilename)

getCountryFromServiceLocation

public static java.lang.String getCountryFromServiceLocation(ServiceLocation a_loc)

interruptAWTEventThread

private static void interruptAWTEventThread()