aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes UI Defaults keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "UI Defaults keys" Watch "UI Defaults keys" New topic
Author

UI Defaults keys

Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
An example:
UIManager.getBorder("List.focusCellHighlightBorder");
Where am I expected to look up the names for such entries? For instance, "List.focusCellHighlightBorder" I have not found such attribute in the source code in JList.java
I have tried printing the hashtable returned by UIManager.getDefaults, with no success.


SCJP2. Please Indent your code using UBB Code
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

If you do a -

You can get the names of all the properties used... then look for properties beginning with "List." to get all the properties that affect a JList.

I also agree with you that they should be listed in the JavaDocs somewhere. It probably wouldn't be good to put them in the widget itself (like JList), because they can change based on the look & feel, but would be good to put them in ListUI, BasicListUI, etc. or the subclass used in the specific look & feel.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Sounds like a list that would prove useful in a SwingFaq. I know I am looking for these properties on occasion. If you don't do it Nate, I will.


GenRocket - Experts at Building Test Data
 
Don't get me started about those stupid light bulbs.
 
subject: UI Defaults keys