Dynamically set the initial label & tree pane sizes

Issue #124 new
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

I want the amount of space taken up by the labels and trees to be optimally set automatically instead of requiring the user to manually adjust the sizes.

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. Open a cdt file for the first time (might have to reset preferences for testing this)

CURRENT BEHAVIOR

The amount of space taken up by the labels and trees is static.

EXPECTED BEHAVIOR

The amount of space taken up by labels and trees should be dynamically determined to create as little wasted space as is reasonable/possible and maximize the space dedicated to the interactive matrix.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

  1. Establish a static maximum initial tree and label area size (for the dimension not linked to the matrix size).
  2. Determine the minimum size necessary for the tree (in order to be able to unambiguously select any node - see issue #339)
  3. Determine the longest label (plus the indicator & indent sizes) size
  4. Set the splitpane divider location to either the maximum from step 1 or the minimum from step 2 - whichever is smaller.
  5. Set the DragGridPanel first row/col size to the size from step 4 (plus the splitpane divider width) plus either the size from step 3 or the max label area size from step 1 - whichever is smaller.

When a file is re-opened, this code should not execute, but rather grab the saved data from stored preferences.

FILES AFFECTED (where the changes will be implemented) - developers only

DendroView (the initial DragGridPanel first row/col size is currently hard-coded there, as is the splitpane divider width and position) LabelView (the longest label and indicator sizes are there)

LEVEL OF EFFORT - developers only

medium

COMMENTS

Old issue description:

Determine the label pane size based on which is smaller:

  1. Length of the longest label string
  2. An arbitrary minimum starting size

User should be able to change the size smaller than the minimum when "show trees" is true.

Should dynamically update if "Row and Column labels..." preference is changed or when a new file is opened.

Comments (12)

  1. Robert Leach reporter

    I'm tracking through some of the older issues and adding some clarifications where might be needed. This issue is regarding the size of the panes where the labels are. It's sort of a real-estate conservation issue. To better show what I mean by label pane size, take a look at these two images. The first is what you get by default right now and the other is what I envision with this issue. Note how the row labels pane size has shrunk and the data takes up more of the real-estate...

    label_idea2.png

    label_pane_size_idea1.png

  2. Log in to comment