Reduce repetitive code in ScriptManagerGUI
Closed this issue · 0 comments
owlang commented
Adding a tool takes almost 40 lines of code to the ScriptManagerGUI class. These lines are highly repetitive and can be generalized and turned into a function by using reflections.
Specifications
The function should take tool-specific inputs (name, description, window_interface
class) and return a JPanel component that can be formatted into the main JFrame. The JPanel will...
- Format and instantiate JButton (w/ name of tool)
- Add action listener which uses reflections to instantiate
window_interface
class - Add logging support with the PropertyChangeListener
- Format, configure, and instantiate JTextArea (w/ description)
Also transition to different LayoutManager that is less verbose than SpringLayout