Open apsexton opened 8 years ago
To solve this, I created a field variable called isBoxDisplayEnabled inside of the View class. I have a public getter that is called inside of the paintComponent method in the Canvas class to decide whether or not to render the boxes. This makes the boxes reload only when getting a new image. I used a very similar approach with the image display, stopping the rendering of the image if the isImageDisplayEnabled field variable in View is false. Is this the type of implementation you were looking for?
Also, do you want the bounding boxes to be off when the user opens a new image with a previous image already having bounding boxes on or should I just keep the state of the bounding boxes through each loaded image?
I am almost finished with the project. I am confident in my backend code and I just need to draw the sprites for the icons. Is there anything else that I could work on after I finish creating the icon pictures?
Add a new action that toggles on or of the display of the connected component bounding boxes.
This action should only be enabled when an image is loaded.
The action should have a suitable accelerator associated with it and be added to the menu and the toolbar
Initially display of the connected component bounding boxes should be off.
Modify the loading of the connected components so that they are loaded only the first time that this action is toggled on. After they have been loaded, further toggling should not cause them to be reloaded, but opening a new image should cause the loaded connected component objects to be cleared.