• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UI Defaults keys

 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic