Issue Details (XML | Word | Printable)

Key: SWINGX-1448
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Karl Schaefer
Reporter: Karl Schaefer
Votes: 0
Watchers: 0

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

AlphaPaintable.setAlpha should throw IllegalArgumentException for invalid values

Created: 11/May/11 12:46 PM   Updated: 12/May/11 12:45 PM   Resolved: 12/May/11 12:45 PM
Component/s: Misc Component
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Time Tracking:
Not Specified

Participants: Karl Schaefer

 Description  « Hide

We only want values 0f-1f inclusive. Like java.awt.Color, we should throw an IllegalArgumentException when the value is invalid.

Karl Schaefer added a comment - 12/May/11 12:45 PM

SWINGX-1400, SWINGX-1401, SWINGX-1447, SWINGX-1448: A variety of small fixes for JXPanel. Firstly, simplify the enumeration for scrollable hinting. This prevent the users from having to special-case vertical and horizontal activities, we handle it under the covers. Fix the tracking of preferred size to check the max size, so we don't stretch a component too far. Improve the clarity of the setAlpha method and throw a runtime exception when the user is doing something untoward. This behavior parallels java.awt.Color, so the user should be accustomed to clamping alpha values correctly. Finally, getEffectiveAlpha was incorrectly tracersing the entire component hierarchy, looking for the ancestor with the lowest alpha, but this methodology did not take alpha inheritance into consideration.


Committed revision 4022.