<Swing Dev> Review request for 8013566: Failure of GroupLayout in combination of addPreferredGap and addGroup's

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Tue Mar 10 11:38:48 UTC 2015


On 3/10/2015 2:28 PM, Semyon Sadetsky wrote:
>
> On 3/10/2015 2:09 PM, Alexander Scherbatiy wrote:
>> What is the reason that the class of the manual inserted gap is 
>> AutoPreferredGapSpring and not GapSpring?
>>
>
> According to comments in the code
>
> *AutoPreferredGapSpring*
> Spring reprensenting the distance between any number of sources and
> targets.  The targets and sources are computed during layout.  An
> instance of this can either be dynamically created when
> autocreatePadding is true, or explicitly created by the developer.
>
     What about just add a flag to the AutoPreferredGapSpring that 
allows to distinguish a manually added gap from an auto-inserted?

    Thanks,
    Alexandr.

> *GapSpring*
> Spring represented a certain amount of space.
>
> so they have really different functionality.




More information about the swing-dev mailing list