[SWINGX-1448] AlphaPaintable.setAlpha should throw IllegalArgumentException for invalid values Created: 11/May/11  Updated: 12/May/11  Resolved: 12/May/11

Status: Resolved
Project: swingx
Component/s: Misc Component
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Major
Reporter: Karl Schaefer Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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

Comment by Karl Schaefer [ 12/May/11 ]

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.

Generated at Sat Nov 28 05:02:57 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.