Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#17 Cannot resize "Single File" tab...

v.1.5.2
closed-fixed
Andrew Welch
Interface (13)
5
2008-02-13
2007-10-24
Eric BRECHEMIER
No

... to display the hidden part in the bottom of the top pane.

Bug noticed in Java Webstart version of Kernow 1.5.2, on Ubuntu Linux. My screen resolution is 1024x768.

See attached snapshot to get a better idea.

I created a patch solving this issue, in file TabbedView.java. All changes are annotated with //enz: in comment.

It would be great if this patch could be considered for Kernow 1.5.3 :)

Discussion

  • Patch Submission: TabbedView.java

     
    Attachments
  • Logged In: YES
    user_id=1317809
    Originator: YES

    Here is the proposed patch. The main change is localized in method mainTabbedPaneStateChanged(), with additional changes related to changing splitPaneDividerPos from an integer to an array of integers.

    The issue was related to
    jSplitPane1.setEnabled(false);
    which blocks the divider dragging.

    Instead of using a variable position only for tab "XQuery_Sandbox" and a position fixed to 220 for other tabs, I propose to allow a variable position for all tabs:
    int selectedTab = mainTabbedPane.getSelectedIndex();
    moveScrollPaneDivider(jSplitPane1.getDividerLocation(), splitPaneDividerPos[selectedTab]);

    Additional modifications are commented in the file.
    File Added: TabbedView.java

     
  • Andrew Welch
    Andrew Welch
    2007-10-24

    • assigned_to: nobody --> ajwelch
     
  • Andrew Welch
    Andrew Welch
    2007-10-24

    Logged In: YES
    user_id=1375488
    Originator: NO

    Thanks for reporting this, and for the screenshot and proposed fix.

    I'll look into it.

     
  • Logged In: YES
    user_id=1053249
    Originator: NO

    Hi

    Instead of maintaining an array of slide positions, we could maybe use the same position in all tabs? That is, as now, but the slider could be moved in all tabs.

    IMHO it is more intuitive regarding the GUI: the frame is devided in two, the tabbed panel and the text area. There is no reason to change the tabbed panel's size when the selected tab changes.

    What do you think Eric? Andrew?

    Regards,

    --drkm

     
  • Andrew Welch
    Andrew Welch
    2007-11-05

    Logged In: YES
    user_id=1375488
    Originator: NO

    Yes - when I originally did the resizable panel I wasn't sure whether to allow it for all, or just the xquery tab... I guess I made the wrong choice! It makes sense to make it resizable for all as the various Look and Feels seem to have different heights for the same components...

    One problem with the same position in all tabs is that what looks right for Ubuntu might look like massive empty space on Windows... so the answer is perhaps to set the defaults for Windows and allow the panes to be resized, so other users can manually adjust it. Provide the positions are saved/loaded each time it should be fine.

     
  • Logged In: NO

    hello,

    ajwelch> One problem with the same position in all tabs is that what looks right
    ajwelch> for Ubuntu might look like massive empty space on Windows... so the answer
    ajwelch> is perhaps to set the defaults for Windows and allow the panes to be
    ajwelch> resized, so other users can manually adjust it. Provide the positions are
    ajwelch> saved/loaded each time it should be fine.

    I agree with Andrew, this behavior is fine. For example after applying proposed patch, even if default size based on Windows left some controls in the top pane hidden on Ubuntu, it was OK for me since I could resize and the size is kept the same for following application runs.

    drkm> Instead of maintaining an array of slide positions, we could maybe use
    drkm> the same position in all tabs? That is, as now, but the slider could be
    drkm> moved in all tabs.

    This is a much simpler design, and easier to understand for users. I was a little surprised when I discovered that the XQuery sandbox could be resized independently. On the other hand, I did not notice until I actually read the source code so this might not be an issue.

    ajwelch> One problem with the same position in all tabs is that what looks right
    ajwelch> for Ubuntu might look like massive empty space on Windows...

    Also true on Ubuntu: resizing one tab leaves lots of empty space on different tabs when the resizing is done in sync.

    All in all, I am slightly in favor of independent resizing because it is the most flexible for users, but if ease of maintenance has higher priority, I would equally support synchronized resizing instead. So... up to you guys :)

     
  • Logged In: YES
    user_id=1053249
    Originator: NO

    I've just commited fix that allow all tabs to be resized. All tabs share the same size. Please try it out, and if you think each tab should have its own size, I'll have a look at it (that shouldn't be a big deal to implement, but I'm not sure this is the right way, regarding HMI).

    Regards,

    --drkm

     
  • Andrew Welch
    Andrew Welch
    2007-11-07

    Logged In: YES
    user_id=1375488
    Originator: NO

    ha.... me too. I'll merge down and commit what I've done.

     
  • Andrew Welch
    Andrew Welch
    2008-02-13

    • status: open --> closed-fixed