The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Manipulate Action Keys

Posted by T.J. on January 18, 2001 at 9:26 PM

AbstractAction implements Action interface. In Action interface, the following fields (or Keys) are defined:
o DEFAULT
o NAME
o SHORT_DESCRIPTION
o ...

In the API document, it says "SHORT_DESCRIPTION is used for storing a short description for the action, used for tooltip text". What does it actually means? If I create an object of class MyAction and add it to a menu bar, will the value of key "SHORT_DESCRIPTION" show as a tooltip?

Example:

class MyAction extends AbstractAction {
MyAction() {
super("My Action");

// this will automatically show as tooltip text?
put("SHORT_DESCRIPTION","My Tooltip Text");
}
}

Well... I tried, but it does not work. So how could these keys be used?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us