|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbr.usp.ime.klava.segmentit.util.GUIUtils
public class GUIUtils
Provides utility methods to be used in GUI elements.
Constructor Summary | |
---|---|
GUIUtils()
|
Method Summary | |
---|---|
static void |
addKeyListenerRecursively(java.awt.Component component,
java.awt.event.KeyListener listener)
Adds the given keyListener listener to the component and to all its children
recursively. |
static javax.swing.ImageIcon |
getIcon(java.lang.String iconFilename)
Returns an ImageIcon containing the image stored in iconFilename . |
static java.lang.String |
toHTMLString(java.lang.String originalMessage)
Formats the originalMessage as HTML to be used in Swing components. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GUIUtils()
Method Detail |
---|
public static javax.swing.ImageIcon getIcon(java.lang.String iconFilename)
ImageIcon
containing the image stored in iconFilename
.
iconFilename
- the name of the file to be loaded
ImageIcon
containing the image stored in iconFilename
public static void addKeyListenerRecursively(java.awt.Component component, java.awt.event.KeyListener listener)
listener
to the component
and to all its children
recursively.
component
- the component that will receive the keyListenerlistener
- the listener to be added to component
public static java.lang.String toHTMLString(java.lang.String originalMessage)
originalMessage
as HTML to be used in Swing components. The new line
characters are replaced by <br>
tags and the whole message is surrounded by the
<html>
and </html>
pair of tags.
originalMessage
- the message to be formatted as HTML
originalMessage
formatted as HTML
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |