Trajectory Progress Slider Master
The TrajectoryProgressSliderMaster class is a custom JPanel that manages the progress sliders for multiple RoadRunnerBotEntity instances. It handles user interactions such as mouse events to update the progress of the trajectories and provides methods to add or remove bots.
Parameters
The main MeepMeep instance.
The width of the slider.
The height of the slider.
Properties
Functions
Adds a RoadRunnerBotEntity to the TrajectoryProgressSliderMaster. This method updates the maximum trajectory duration, adjusts the pause state, and creates a new TrajectoryProgressSubSlider for the bot.
Handles the mouse clicked event. This method is currently not implemented.
Handles the mouse dragged event. This method updates the trajectory progress for each bot based on the mouse position and redraws their respective sliders.
Handles the mouse entered event. This method is currently not implemented.
Handles the mouse exited event. This method is currently not implemented.
Handles the mouse moved event. This method is currently not implemented.
Handles the mouse pressed event. This method pauses all bots, calculates the clipped input time based on the mouse position, and updates the trajectory progress for each bot.
Handles the mouse released event. This method resumes the trajectory for all bots and redraws their respective sliders.
Removes a RoadRunnerBotEntity from the TrajectoryProgressSliderMaster. This method updates the list of bots and repacks the window frame.
Reports that the bot at the given index has completed its trajectory. If the bot is the one with the maximum trajectory duration, it starts all bots.
Reports the progress of the bot at the given index. This method updates the progress of the bot's trajectory based on the elapsed time.