Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: Misc Component
    • Labels:
      None

      Description

      If we change the getTracksParentSize to take a directional, we can remove the isVerticalCompatible and isHorizontableCompatible methods and collapse HORIZONTAL_STRETCH and VERTICAL_STRETCH into a single enum PREFERRED_STRETCH.

        Activity

        Hide
        Karl Schaefer added a comment -

        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.

        swingx-core/src/main/java/org/jdesktop/swingx/AlphaPaintable.java
        swingx-core/src/main/java/org/jdesktop/swingx/JXPanel.java
        swingx-core/src/main/java/org/jdesktop/swingx/ScrollableSizeHint.java
        swingx-core/src/test/java/org/jdesktop/swingx/JXPanelTest.java

        Committed revision 4022.

        Show
        Karl Schaefer added a comment - 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. swingx-core/src/main/java/org/jdesktop/swingx/AlphaPaintable.java swingx-core/src/main/java/org/jdesktop/swingx/JXPanel.java swingx-core/src/main/java/org/jdesktop/swingx/ScrollableSizeHint.java swingx-core/src/test/java/org/jdesktop/swingx/JXPanelTest.java Committed revision 4022.

          People

          • Assignee:
            kleopatra
            Reporter:
            Karl Schaefer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: