Issue Details (XML | Word | Printable)

Key: SWINGX-1347
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: kleopatra
Reporter: kleopatra
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
swingx

StringValues: add type which is UIResource

Created: 15/Sep/10 03:34 AM   Updated: 28/Jan/11 01:08 PM   Resolved: 05/Nov/10 02:23 AM
Component/s: Renderer
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 1,347
Tags:
Participants: Karl Schaefer and kleopatra


 Description  « Hide

StringValues can be used by a variety of clients. If installed by uiManagers, they should
implement UIResource to mark them as such. Add wrapper to StringValues zoo



kleopatra added a comment - 15/Sep/10 05:22 AM

added StringValueUIResource which wraps around a given StringValue
added tests


Karl Schaefer added a comment - 15/Sep/10 06:57 AM

Issue 1347: Updated DefaultsList to ensure that any SwingX supplied
StringValues are UIResources.

src/main/java/org/jdesktop/swingx/plaf/DefaultsList.java

Committed revision 3785.


Karl Schaefer added a comment - 15/Sep/10 06:59 AM

commit -m "Issue 1347: Updated DefaultsList to ensure that any SwingX supplied
StringValues are UIResources." C:/workspace/swingx/swingx-
core/src/main/java/org/jdesktop/swingx/plaf/DefaultsList.java
Sending C:/workspace/swingx/swingx-
core/src/main/java/org/jdesktop/swingx/plaf/DefaultsList.java
Transmitting file data ...
Committed revision 3785.


Karl Schaefer added a comment - 15/Sep/10 06:59 AM

What if the wrapped StringValue is a MappedValue? Seems like that would fail
to provide the same results.


kleopatra added a comment - 15/Sep/10 07:13 AM

oops ... good catches, both of your comments

Re-opening - no time to look into the MappedValue right now, but sure need to handle it,
darn, how could i forget that

Thanks
Jeanette


Karl Schaefer added a comment - 15/Sep/10 07:18 AM

You could alter StringValueUIResource to be a MappedValue. I think that just
solves the issue.


kleopatra added a comment - 05/Nov/10 02:23 AM

Decided to add a separate class MappedValueUIResource. Feels safer than unconditionally
extending the type of a plain StringValue by simply throwing it into the wrapper. Such
a type extension might come as a surprise for developers.

Plus the MappedValue is a ... ehem ... temporary clutch which survived Keeping that
separate from the base makes it easier to cleanup eventually (harhar - as if that would
ever happen <g>)