def create_light_curve_switching_buttons(self) -> (Button, Button): """ Creates buttons for switching between light curves. """ next_button = Button(label='Next target') next_button.on_click(self.create_display_next_view_entity_task) next_button.sizing_mode = 'stretch_width' previous_button = Button(label='Previous target') previous_button.on_click(self.create_display_previous_view_entity_task) previous_button.sizing_mode = 'stretch_width' return previous_button, next_button
def create_target_switching_buttons(self): def display_next_target(): self.current_target_index += 1 self.load_surrounding_light_curves() self.display_current_target() def display_previous_target(): self.current_target_index -= 1 self.load_surrounding_light_curves() self.display_current_target() next_button = Button(label='Next target') next_button.on_click(display_next_target) next_button.sizing_mode = 'stretch_width' previous_button = Button(label='Previous target') previous_button.on_click(display_previous_target) previous_button.sizing_mode = 'stretch_width' return previous_button, next_button
def create_add_to_positives_button(self) -> Button: add_to_positives_button = Button(label='Add to positives') add_to_positives_button.on_click(self.add_current_to_positives) add_to_positives_button.sizing_mode = 'stretch_width' return add_to_positives_button