You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Noel Grandin (JIRA)" <ji...@apache.org> on 2009/04/10 19:00:14 UTC

[jira] Created: (PIVOT-75) SplitPane should have relative resize style

SplitPane should have relative resize style
-------------------------------------------

                 Key: PIVOT-75
                 URL: https://issues.apache.org/jira/browse/PIVOT-75
             Project: Pivot
          Issue Type: Improvement
          Components: wtk
    Affects Versions: 1.1
            Reporter: Noel Grandin


For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by Niclas Hedhman <ni...@hedhman.org>.
One more thing, I am heading off for a meeting shortly, then tomorrow
I am at a wedding the whole day, and Monday I have Qi4j brainstorm
meeting all day, so feel free to push this forward without my help.


Cheers
Niclas

On Thu, Aug 13, 2009 at 2:01 PM, Todd Volkert (JIRA)<ji...@apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742728#action_12742728 ]
>
> Todd Volkert commented on PIVOT-75:
> -----------------------------------
>
> I just reviewed this as well.  It looks really good - I only noticed a few things:
>
> 1) SplitPane.setSplitRatio() still uses previousSplitLocation - should be previousSplitRatio
>
> 2) I'd say you can remove the overrides of the getters and setters for min/max preferred size.  SplitPaneSkin always reports a preferred size of 0,0 - it's meant to only be used in cases where it's either not asked for its preferred size of it's given an explicit preferred size.  In either case, the min/max preferred sizes aren't really in play.
>
> 3) In SplitPaneSkin.SplitterSkin.mouseMove(), the split ratio must be calculated *after* limiting the split location.
>
> These and Greg's points are simple enough to fix that I'd say no need to re-post a patch for review.  How does this work if you have karma to commit but aren't a committer?  :)
>
>> SplitPane should have relative resize style
>> -------------------------------------------
>>
>>                 Key: PIVOT-75
>>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>>             Project: Pivot
>>          Issue Type: Improvement
>>          Components: wtk
>>    Affects Versions: 1.1
>>            Reporter: Noel Grandin
>>            Assignee: Niclas Hedhman
>>             Fix For: 1.3
>>
>>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>>
>>
>> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>



-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

[jira] Updated: (PIVOT-75) SplitPane's splitLocation(int) property should be splitRatio(float)

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Volkert updated PIVOT-75:
------------------------------

          Description: 
For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

To solve this, note that currently, the splitLocation property of SplitPane specifies the absolute pixel value of the splitter within the split pane.  This would be much more useful to applications (and much less error-prone) if it were specified as a ratio of one side of the split to the other (from 0.0f to 1.0f).  This would have the following benefits:

1) The caller can initialize the splitter location very easily, whereas previously, you had to presuppose how the split pane would be laid out to give a meaningul splitLocation property.

2) When the split pane is resized, granting proper allocations to each side of the splitter becomes very easy, since the ratio stays the same.

  was:For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

    Affects Version/s: 1.2
              Summary: SplitPane's splitLocation(int) property should be splitRatio(float)  (was: SplitPane should have relative resize style)

Updating description to be more correct in the 1.3 release notes

> SplitPane's splitLocation(int) property should be splitRatio(float)
> -------------------------------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1, 1.2
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.
> To solve this, note that currently, the splitLocation property of SplitPane specifies the absolute pixel value of the splitter within the split pane.  This would be much more useful to applications (and much less error-prone) if it were specified as a ratio of one side of the split to the other (from 0.0f to 1.0f).  This would have the following benefits:
> 1) The caller can initialize the splitter location very easily, whereas previously, you had to presuppose how the split pane would be laid out to give a meaningul splitLocation property.
> 2) When the split pane is resized, granting proper allocations to each side of the splitter becomes very easy, since the ratio stays the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Fix Version/s:     (was: 1.4)
                   1.3
         Assignee: Niclas Hedhman  (was: Todd Volkert)

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>            Priority: Minor
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742570#action_12742570 ] 

Greg Brown commented on PIVOT-75:
---------------------------------

This looks good to me. I'd say go ahead and submit it, though Todd may have some additional comments since he was the original author.

Minor coding style comments:

- Don't include spaces between a cast operator and the operand
- Don't include a space after opening or before closing parentheses
- Don't include CRs before opening curly braces
- Include a CR after @Override and other annotations
- Include a CR in @param tags after the variable name

- Some additional CRs in TerraSplitPaneSkin#limitSplitLocation() might help improve readability a bit

- Variable name in SplitPane.SplitPaneListenerList#splitRatioChanged() is still previousSplitLocation - should be previousSplitRatio

- Does this TODO still apply? I think it is safe to remove:

    // TODO: the size overrides are awaiting consensus from community.

We really need to write up a coding standards doc.  :-)  I do have an Eclipse formatting profile that we can post to the site, though.

Also, you'll need to update references to "splitLocation" in WTKX files. I'll attach a patch you can apply before you check in.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741171#action_12741171 ] 

Niclas Hedhman commented on PIVOT-75:
-------------------------------------


Regarding MinPreferredxxx;

Right now it looks like the min/max preferred width/height are values set by client code. And I think(!) there is not much resolution handling when they conflict with the same attributes of the two child components.

Shouldn't the splitPane's attributes just be derived from the children instead?

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697863#action_12697863 ] 

Todd Volkert commented on PIVOT-75:
-----------------------------------

Actually, when Pivot started, he had support for a resize weight a-la Swing, but we just couldn't come up with a real justification for it, so we took it out -- maybe we overlooked something.  Can you elaborate on your example of nested split panes?  Specifically what type of split pane content would demand such relative sizing?

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Volkert reassigned PIVOT-75:
---------------------------------

    Assignee: Todd Volkert

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Priority: Major  (was: Minor)

I'm increasing the priority of this change to major, since it is an API change and we'd like to get as many API changes as we can into 1.3. Also, I think this will be a significant improvement.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741148#action_12741148 ] 

Greg Brown commented on PIVOT-75:
---------------------------------

Re: Todd's comment #3 - I think this is actually a bug in the patch. The code appears to treat the split limits as a percentage, but they are specified by the caller as absolute pixel values. In fact, they are ints, so they can't currently represent many interesting percentage values.  :-)



> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741170#action_12741170 ] 

Niclas Hedhman commented on PIVOT-75:
-------------------------------------

Thanks for the good feedback.

Todd's list;

1. I will change the name to splitRatio, as this was what felt good to me too, but I worried that it was "too much" for your taste.

2. Listener methdo --> Didn't think of it, will fix.

3/4. SplitLimits --> I also like Greg's idea, and will try to go with that. If I can't figure it out, I'll open a new issue.

5. Ok.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Fix Version/s:     (was: 1.3)
                   1.4

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>            Priority: Minor
>             Fix For: 1.4
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739969#action_12739969 ] 

Niclas Hedhman commented on PIVOT-75:
-------------------------------------

I have changed the splitLocation to splitRatio, to indicate that it is 0-1 float we are looking for.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739916#action_12739916 ] 

Niclas Hedhman commented on PIVOT-75:
-------------------------------------

Question; What are the rounding off rules involved here??

Example; Splitter thickness = 1, width = 4, splitRatio = 0.5. Should the splitter be at second or third pixel?

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740001#action_12740001 ] 

Greg Brown commented on PIVOT-75:
---------------------------------

Further property naming refinements: "splitLimits" should simply be "limits" (e.g. getLimits():Limits), and we should also define "max" and "min" properties that delegate to the main setter method.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Attachment: split_ratio.diff

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740619#action_12740619 ] 

Greg Brown commented on PIVOT-75:
---------------------------------

Rather than defining split bounds or limits, SplitPane could simply respect the preferred size limits reported by the primary component.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown resolved PIVOT-75.
-----------------------------

    Resolution: Fixed

I applied Niclas's patch and modified it based on the comments above.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Attachment: split_ratio.patch

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740957#action_12740957 ] 

Todd Volkert commented on PIVOT-75:
-----------------------------------

The patch looks pretty good.  Comments are as follows:

1) I'd change local variable splitLocationRatio to be just splitRatio

2) I'd change the SplitPaneListener interface to have the method be called splitRatioChanged

3) I'd code the skin to treat splitLimits as limiting the absolute value of the splitter (vs. limiting the split ratio).  While splitRatio makes more sense than splitLocation, I think the limits of the splitter make more sense as real pixel values.

4) I like Greg's idea to bag splitLimits and make SplitPane just respect the min/max preferred width/height of its two components.  If you want to make this change in the patch as well, you can, or if you want to maintain split limits in the patch and tackle one change per SVN commit, that makes sense too.

5) With respect to the rounding question, as long as the skin's consistent in how it rounds (floor, ceil, round), then I think any of those are fine.  Just make sure to not go under 0 or over the max.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742728#action_12742728 ] 

Todd Volkert commented on PIVOT-75:
-----------------------------------

I just reviewed this as well.  It looks really good - I only noticed a few things:

1) SplitPane.setSplitRatio() still uses previousSplitLocation - should be previousSplitRatio

2) I'd say you can remove the overrides of the getters and setters for min/max preferred size.  SplitPaneSkin always reports a preferred size of 0,0 - it's meant to only be used in cases where it's either not asked for its preferred size of it's given an explicit preferred size.  In either case, the min/max preferred sizes aren't really in play.

3) In SplitPaneSkin.SplitterSkin.mouseMove(), the split ratio must be calculated *after* limiting the split location.

These and Greg's points are simple enough to fix that I'd say no need to re-post a patch for review.  How does this work if you have karma to commit but aren't a committer?  :)

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niclas Hedhman updated PIVOT-75:
--------------------------------

    Attachment: PIVOT-75-Fix2.patch

This patch "/Users/niclas/Desktop/PIVOT-75-Fix2.patch" contains;

 o Removed the splitLimits, and instead use the minPreferredWidth/Height (if set) of the children as the limits.

 o Added that the min/max preferred width/height is derived from the children and setting them not allowed (which Exception should be used).

 o layout() also has limits check, since it was possible to 'somehow' drag it outside the range.



> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697969#action_12697969 ] 

Todd Volkert commented on PIVOT-75:
-----------------------------------

Yeah, we could do something like that.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739692#action_12739692 ] 

Greg Brown commented on PIVOT-75:
---------------------------------

We should also change the "splitBounds" property to "splitLimits" (of type Limits) as part of this change. The Limits class will be added as part of the fix for PIVOT-207.


> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Noel Grandin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697866#action_12697866 ] 

Noel Grandin commented on PIVOT-75:
-----------------------------------

If I have 3 split panes next to each other like this:

x | x | x

And I drag the first divider towards the right, the last pane in the series loses all of its space. 
Makes for a very jaring experience.

Instead of having a primary region, maybe have a resize mode - TOP_LEFT, BOTTOM_RIGHT, EQUAL ??

where EQUAL allocates space equally to both entities when the SplitPane is resized.

That would accomplish what I need.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 1.3

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>            Priority: Minor
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739064#action_12739064 ] 

Todd Volkert commented on PIVOT-75:
-----------------------------------

As part of this change, we should change the splitLocation property of SplitPane to be a float value that represents a percentage of the width/height as opposed to an absolute value.  Then when the user drags the splitter, the skin will update the percentage as opposed to updating the absolute value.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>            Priority: Minor
>             Fix For: 1.3
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niclas Hedhman updated PIVOT-75:
--------------------------------

    Attachment: PIVOT-75-Fix.patch

Here is the patch to fulfill what I know of this issue.

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-75) SplitPane should have relative resize style

Posted by "Niclas Hedhman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742751#action_12742751 ] 

Niclas Hedhman commented on PIVOT-75:
-------------------------------------

Regarding codestyle; I find your style confusing and not natural, so it is hard to 'comply'. On one hand you seek additional whitespace (which I am a strong proponent of) for instance when you ask for the additional CRs, but then you ask for 'compressed' Sun-like style elsewhere with very little whitespace. Hard to keep those apart, especially since your 'basis' is really far from mine... Do you have a Checkstyle configuration set up, so I could configure in IDEA? (Has Eclipse formatter been fixed yet? It used to make more mess than it solved...)

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-75) SplitPane should have relative resize style

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-75:
----------------------------

    Attachment:     (was: split_ratio.diff)

> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Niclas Hedhman
>             Fix For: 1.3
>
>         Attachments: PIVOT-75-Fix.patch, PIVOT-75-Fix2.patch, split_ratio.patch
>
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (PIVOT-75) SplitPane should have relative resize style

Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697863#action_12697863 ] 

Todd Volkert edited comment on PIVOT-75 at 4/10/09 10:10 AM:
-------------------------------------------------------------

Actually, when Pivot started, we had support for a resize weight a-la Swing, but we just couldn't come up with a real justification for it, so we took it out -- maybe we overlooked something.  Can you elaborate on your example of nested split panes?  Specifically what type of split pane content would demand such relative sizing?

      was (Author: tvolkert):
    Actually, when Pivot started, he had support for a resize weight a-la Swing, but we just couldn't come up with a real justification for it, so we took it out -- maybe we overlooked something.  Can you elaborate on your example of nested split panes?  Specifically what type of split pane content would demand such relative sizing?
  
> SplitPane should have relative resize style
> -------------------------------------------
>
>                 Key: PIVOT-75
>                 URL: https://issues.apache.org/jira/browse/PIVOT-75
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Noel Grandin
>            Assignee: Todd Volkert
>
> For the occasion when SplitPanes are embedded inside each other, it would be nice if I could set the inner SplitPane's to relative-resize-mode i.e. when it's size is reduced or expanded, it should adjust the splitter location to maintain the relative sizes of the top/bottom components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.