class View: """Define the look and feel of the stage""" next_stage_button = panes.next_stage_button(APP) def panel(self): sliders = [ panes.element_slider(getattr(self.param, element)) for element in ALL_ELEMENTS ] return pn.Column( panes.headline(CFG.label, popup_label="deep_composition"), pn.Row( pn.Column(*sliders, sizing_mode="stretch_width"), pn.Column( pn.indicators.Number.from_param( self.param.net_gross, format="{value:.0f}%", nan_format="...", default_color="red", colors=[(100, "black")], ), pn.layout.Spacer(height=20), pn.Row(panes.previous_stage_button(APP), self.next_stage_button), ), ), self.warnings, sizing_mode="stretch_width", )
def panel(self): return pn.Row( pn.layout.HSpacer(), pn.Column( self.division_slider("Lobe", "Spatial Position"), self.division_slider("Lobe", "Confinement"), self.division_slider("Channel Fill", "Spatial Position"), ), pn.Column( self.division_slider("Lobe", "Bed Type"), self.division_slider("Lobe", "Archetypes"), self.division_slider("Channel Fill", "Archetypes"), ), pn.layout.HSpacer(), pn.Column( pn.indicators.Number.from_param( self.param.net_gross, format="{value:.0f}%", nan_format="...", default_color="red", colors=[(100, "black")], ), pn.layout.Spacer(height=20), pn.Row(panes.previous_stage_button(APP), panes.next_stage_button(APP)), ), pn.layout.HSpacer(), sizing_mode="stretch_width", )
def panel(self): """Display the first stage using radio boxes""" return pn.Column( panes.multiple_choice(self.param.gross_geomorphology), panes.multiple_choice(self.param.stratigraphic_scale), panes.multiple_choice(self.param.reservoir_quality), pn.layout.Spacer(height=20), panes.next_stage_button(APP), sizing_mode="stretch_width", )
def panel(self): """Display the first stage using radio boxes""" return pn.Column( panes.multiple_choice(self.param.composition_threshold), panes.multiple_choice(self.param.depositional_setting), panes.multiple_choice(self.param.stratigraphic_scale), panes.multiple_choice(self.param.reservoir_quality), pn.layout.Spacer(height=20), panes.next_stage_button(APP), sizing_mode="stretch_width", )
def panel(self): return pn.Column( pn.Row( pn.Column( pn.Row( pn.indicators.Number.from_param( self.param.net_gross, format="{value:.0f}%", font_size="54pt", title_size="18pt", ), pn.layout.HSpacer(), pn.Column( pn.Row( pn.indicators.Number.from_param( self.param.net_gross_modified, format="{value:.0f}%", font_size="36pt", title_size="14pt", ), pn.pane.HTML( panes.popup("deep_porosity_modifier", style="left:-450px")), ), pn.widgets.IntInput.from_param( self.param.porosity_modifier, width=180), ), pn.layout.HSpacer(), ), pn.layout.Spacer(height=30), pn.Row( charts.table_elements(self.data, CFG.columns), charts.figure_weights(self.data, CFG.columns), ), self.filter_class_tabs, sizing_mode="stretch_width", ), pn.Column( "##### Save scenario to report:", pn.widgets.TextInput.from_param(self.param.scenario_name), self.scenario_table, pn.layout.Spacer(height=20), pn.Row( pn.layout.HSpacer(), self.new_scenario_button, panes.next_stage_button(APP, text="Finalize Report"), pn.layout.HSpacer(), ), ), ), sizing_mode="stretch_width", )
class View: """Define the look and feel of the stage""" next_stage_button = panes.next_stage_button(APP) def layout_element_widgets(self): """Add header line on top of element widgets container""" colors = config.app.style.colors quality_colors = pn.Row( pn.layout.HSpacer(), pn.pane.HTML(background=colors.poor, width=40, height=20), pn.layout.HSpacer(), pn.layout.Spacer(width=4), # Tweak to improve alignment pn.pane.HTML(background=colors.moderate, width=40, height=20), pn.layout.Spacer(width=4), # Tweak to improve alignment pn.layout.HSpacer(), pn.pane.HTML(background=colors.good, width=40, height=20), pn.layout.HSpacer(), pn.layout.Spacer(width=5), # Tweak to improve alignment pn.pane.HTML(background=colors.exceptional, width=40, height=20), pn.layout.Spacer(width=5), # Tweak to improve alignment pn.layout.HSpacer(), ) return pn.GridBox( "**Element**", "", pn.Row(pn.layout.Spacer(width=10), "**Volume %**"), quality_colors, ncols=4, ) def panel(self): return pn.Column( panes.headline(CFG.label, popup_label="shallow_composition"), pn.Row( pn.Column( pn.widgets.MultiChoice.from_param( self.param.element_names, options=ELEMENT_OPTIONS, delete_button=True, solid=False, height_policy="min", margin=(0, 25), height=120, placeholder="Choose elements to build a model", sizing_mode="fixed", ), self.element_widgets, sizing_mode="stretch_width", ), pn.Column( pn.indicators.Number.from_param( self.param.net_gross, format="{value:.0f}%", nan_format="...", default_color="red", colors=[(CFG.warnings.ng_above, "black")], ), panes.warning(CFG.warnings.customize_quality_text, alert_type="light"), pn.layout.Spacer(height=20), pn.Row(panes.previous_stage_button(APP), self.next_stage_button), ), ), self.warnings, sizing_mode="stretch_width", )