|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.gui.util.WhatsThis
public class WhatsThis
Static helper class, that allows to enrich components with What's This help.
See setText(JComponent, String)
and enterWhatsThisMode()
.
WhatsThisAction
Constructor Summary | |
---|---|
WhatsThis()
|
Method Summary | |
---|---|
static void |
enterWhatsThisMode()
Enters What's This mode. |
static void |
exitWhatsThisMode()
Exits What's this mode. |
static String |
getText(Component c,
boolean searchParents)
Retrieves the what's this text for the component. |
static void |
removeText(JComponent c)
Removes the what's this text for the component |
static void |
setText(JComponent c,
String text)
Sets the what's this text for the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WhatsThis()
Method Detail |
---|
public static void setText(JComponent c, String text)
c
- the componenttext
- the text that should be displayed in the what's this popup
for this componentpublic static void removeText(JComponent c)
c
- the componentpublic static String getText(Component c, boolean searchParents)
searchParents
is true their text is retrieved as fallback.
c
- the componentsearchParents
- if true the component hierarchy is searched
public static void enterWhatsThisMode()
A global mouse listener is added to the awt event queue looking for mouse movement and mouse clicks.
A special cursor is displayed for components that provide a What's this help text, another special cursor is displayed for components that don't.
The mode is exited automatically after the first mouse button click on any component. If the component in question has a What's this help text, the text is displayed in a popup.
public static void exitWhatsThisMode()
See enterWhatsThisMode()
. The global mouse listener is
deregistered and the original cursors for all components are restored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |