Skip to content

ScrollView Rewrite - #1006

Draft
Mystin wants to merge 2 commits into
Bram-Hub:devfrom
Mystin:ScrollView-Rewrite
Draft

Mystin wants to merge 2 commits into
Bram-Hub:devfrom
Mystin:ScrollView-Rewrite

Conversation

@Mystin

@Mystin Mystin commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Description

The current ScrollView is cobbled together in a way that works, but is not very intuitive, chafes against Java Swing's architecture, and does not look very clean or professional in practice. I have written a new ZoomView class and several other related classes necessary for it to work cleanly in the zoomview package. I have thus far implemented the TreeView as a ZoomPane, and am working on implementing BoardView too.

Closes #990
Closes #991

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an already existing feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

I have tested the zooming and hotkeys extensively on Windows, as well as ensuring that the popup notifications work and display in the correct place. The new TreeView accurately displays nodes and transitions, including branching and merging transitions. The colors are pulled from the LookAndFeel.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Mystin added 2 commits August 17, 2026 10:51
Created the edu.rpi.legup.ui.zoompane package.
Created ZoomPane, ZoomPaneUI, ZoomBar, ZoomBarUI, ZoomViewport, ZoomView, and ZoomViewController (soon to replace Controller).

ZoomPane is a JScrollPane subclass and maintains a ZoomBar and ZoomViewport. ZoomPane and ZoomBar have their own UI delegate classes and have distinct UI defaults. ZoomViewport uses a ZoomViewport.ZoomPeer as its Component view and as a peer to its new ZoomView. ZoomPeer is also where the ZoomViewController is installed, and provides a way to repaint areas of the ZoomView.
Rewrote most of edu.rpi.legup.ui.proofeditorui.treeview such that TreeView is now a ZoomView inside of a ZoomPane.

Made some necessary controller and model adjustments to make the view behave as expected.

Fixes:
Bram-Hub#991
Bram-Hub#863

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant