icat.item.ItemViewer#

class icat.item.ItemViewer(index=0, width=700, height=800, data=None, **params)#

Bases: Viewer

Interface for viewing and labeling a single item, useful for looking at more than just a snippet of the full text.

Parameters:
  • index (int) – The row index of the entry in the dataframe to view.

  • width (int) – The width of the rendered card.

  • height (int) – The height of the rendered card.

  • data (DataManager) – The parent data manager to pull the item from.

Methods

__init__([index, width, height, data])

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

fire_on_label_changed(label)

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

on_label_changed(callback)

Register a callback function for the "label changed" event.

params(**kwargs)

Inspect .param.params method for the full docstring

populate(index)

Fill or update all of the fields for the given index.

pprint(*args, **kwargs)

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

servable([title, location, area, target])

Serves the object or adds it to the configured pn.state.template if in a panel serve context, writes to the DOM if in a pyodide context and returns the Panel object to allow it to display itself in a notebook context.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

Attributes

name

param

fire_on_label_changed(label)#
Parameters:

label (int) –

name = 'ItemViewer'#
on_label_changed(callback)#

Register a callback function for the “label changed” event.

Callbacks for this event should take two parameters: * index of labeled point (int) * label value (int)

Parameters:

callback (Callable) –

populate(index)#

Fill or update all of the fields for the given index. This should be called anytime the model updates, or when the user clicks/requests to view a new instance.

Parameters:

index (int) – The row index of the item to display from parent DataManager’s active_data.