Skip to content

Better scaling of main table showing entries #967

@matthiasgeiger

Description

@matthiasgeiger

The current behavior of the entry main table is rather weird in my opinion:

Generally there are two different options available:

  1. Table is always using the full width of the JabRef window
  2. Table is using fixed widths for each column - if the space is not enough there is a horizontal scrollbar - if there is too much space parts are simply empty.

It is possible to switch between those two behaviors by changing the preferences in the tab "Entry Table" -> "Fit table horizontally on screen".

What is the problem with the current solution?
I think "fit horizontally" is a sensible default, as free/empty space after all table columns does not make any sense - and normally a horizontal scrollbar is not wished by the users, too.
However, the current implementation has some drawbacks:
If a single column is resized all other columns are resized, too (to fill the gap, or to create the needed space) - this makes it rather hard to adjust the column width to your preferred style (e.g., year should be just big enough to show all 4 digit year numbers).
And: After resizing the JabRef window all adjustments are just gone...

It is already possible to define column width in the preferences (-> "Entry table columns") - but these column widths are only used, if "fit table horizontally" is not active.

In my opinion the best solution would be:

  • ability to define a minimal width for each column
  • ability to define that a column should not be scaled
  • automatic sizing of the table:
    • Each column should have at least its minimal size - if the space is not sufficient, a horizontal scrollbar should be used.
    • Columns with fixed size should use those fixed sizes
    • If there is additional space left the remaining columns could be broadend to use this space.

E.g., all special columns, the # column, entrytype and year have a fixed width - title, author/editor and journal are dynamic and use the remaing space in the table...

Any remarks to this concept? Do you propose another solution?

Problem is: I'm not quite sure whether Swing does actually support this behavior out of the box as it is a mixture between fixed widths and automatic scaling to avoid horizontal scrollbars... If this is too hard to implement, waiting for the JavaFX migration might be an option. However, regarding JavaFX I don't have any idea whether and how this can be realized...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions