Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
GUIUtilities Class Reference

Static Public Member Functions

static void error (Component comp, String message, String title)
 
static void error (String message, String title)
 
static Icon getIcon (String path)
 
static Icon getAssetMapIcon (String iconName)
 
static Icon getIconForTypeCode (String typeCode)
 
static boolean isIconLoaded (String typeCode)
 
static Icon getCompoundIconForTypeCode (String typeCode, String compoundIconName, String assetId)
 
static void showInScreenCenter (Component comp)
 
static boolean isRightMouseButton (MouseEvent evt)
 

Detailed Description

Definition at line 26 of file GUIUtilities.java.

Member Function Documentation

static void error ( Component  comp,
String  message,
String  title 
)
inlinestatic

Displays an error with the specified message and title using the component for screen orientation

Parameters
compthe component to use for screen orientation
messagethe message to display
titlethe title to display

Definition at line 45 of file GUIUtilities.java.

static void error ( String  message,
String  title 
)
inlinestatic

Displays an error with the specified message and title the message will be displayed in the center of the screen (l&f dependant)

Parameters
messagethe message to display
titlethe title to display

Definition at line 67 of file GUIUtilities.java.

static Icon getAssetMapIcon ( String  iconName)
inlinestatic

Returns an icon from the LIB/web/images/icons/asset_map directory in the mysource matrix system.

Parameters
iconNamethe name of the icon to get
Returns
the Icon

Definition at line 108 of file GUIUtilities.java.

static Icon getIcon ( String  path)
inlinestatic

Returns an Icon from the generic Icon factory. Once an Icon has been obtained From the specified source, it is stored so future resource can obtain the Icon without hitting the server where the Icon exists.

Parameters
paththe path to the specified Icon source relative to the Icon directory in the mysource system (/core/lib/web/images/icons). For example if you wanted an icon for internal messages, this parameter should be internal_messages/icon.png
Returns
the Icon or null if the icon does not exist at the specified url. If null is returned and is inserted as the image in a JLabel for example, the image will be blank and will not affect the execution at all, so consider this a failsafe device.

Definition at line 88 of file GUIUtilities.java.

static Icon getIconForTypeCode ( String  typeCode)
inlinestatic

Returns the icon for the given type code

Parameters
typeCodethe name of the type code of the wanted icon
Returns
the Icon

Definition at line 117 of file GUIUtilities.java.

static boolean isIconLoaded ( String  typeCode)
inlinestatic

Returns whether the icon is loaded for this asset type

Returns
TRUE if the icon is already loaded

Definition at line 126 of file GUIUtilities.java.

static boolean isRightMouseButton ( MouseEvent  evt)
inlinestatic

Returns TRUE if the right mouse button is clicked. Use this in favour of SwingUtilities.isRightMouseButton() as it detects Mac apple key and mouse click

Parameters
evtthe mouse event
Returns
TRUE if the right mouse button is clicked

Definition at line 183 of file GUIUtilities.java.

static void showInScreenCenter ( Component  comp)
inlinestatic

Set the location of a Component to the center of the screen and makes it visible.

Parameters
compthe component to display in the center of the screen

Definition at line 169 of file GUIUtilities.java.


The documentation for this class was generated from the following file: