Skip to content

deprecate(UIPanel): mark as deprecated in favour of GuiPanel#99

Closed
AmlanDalai wants to merge 1 commit intosumit3203:masterfrom
AmlanDalai:deprecate-uipanel
Closed

deprecate(UIPanel): mark as deprecated in favour of GuiPanel#99
AmlanDalai wants to merge 1 commit intosumit3203:masterfrom
AmlanDalai:deprecate-uipanel

Conversation

@AmlanDalai
Copy link
Copy Markdown
Contributor

Overview

The codebase contains two navigation panels - UIPanel and GuiPanel - that serve identical purposes. This duplication increases maintenance burden and creates ambiguity about which class should be used for future development.

Problem

UIPanel and GuiPanel both:

  • Display the same navigation buttons (Select Filters, Feature Extraction, etc.)
  • Manage the same sub-panels (FilterPanel, FeaturePanel, LearningPanel, etc.)
  • Initialise the same managers (FeatureManager, ClassifierManager)

Maintaining two parallel implementations increases the risk of divergence and makes future UI improvements harder to apply consistently.

Changes

  • Add @Deprecated annotation and @deprecated Javadoc tag to class and methods
  • Reference GuiPanel as the canonical replacement in all deprecation notices
  • Migrate layout from setLayout(null) to GridBagLayout for consistency with GuiPanel
  • Remove System.out.println debug statements from constructor
  • Add full Javadoc to all methods

Note

UIPanel is retained for backwards compatibility. No functionality has been removed. The deprecation signals intent to consolidate into GuiPanel in a future release.

- UIPanel and GuiPanel duplicate the same navigation functionality
- Add @deprecated annotation and @deprecated Javadoc on class and methods
- Migrate layout from setLayout(null) to GridBagLayout for consistency
- Remove System.out.println debug statements from constructor
- Add Javadoc referencing GuiPanel as the canonical replacement
@AmlanDalai
Copy link
Copy Markdown
Contributor Author

AmlanDalai commented Mar 8, 2026

Note on diff size

This PR makes the following distinct changes:

  1. Added '@deprecated' annotation and '@deprecated' Javadoc — signals 'UIPanel' should be replaced by 'GuiPanel'
  2. Migrated 'setLayout(null)' to 'GridBagLayout' — consistent with 'GuiPanel' refactor in PR refactor(GuiPanel): replace absolute layout with GridBagLayout for responsive UI #98
  3. Removed 'System.out.println' debug statements
  4. Added Javadoc to all methods

The large diff is due to layout restructuring. All button actions and functionality are identical to the original.

@AmlanDalai AmlanDalai closed this Mar 8, 2026
@AmlanDalai AmlanDalai reopened this Mar 8, 2026
@AmlanDalai
Copy link
Copy Markdown
Contributor Author

Closing this PR following mentor feedback. UIPanel is the newer
experimental implementation — this deprecation was based on an
incorrect understanding of the class hierarchy. Apologies for
the confusion.

@AmlanDalai AmlanDalai closed this Mar 8, 2026
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