Generates a slot header (the first cell of the row) for the item

        :param item: the item for which the slot header is requested
        :return: the html contents to be displayed in the first cell of a slot
325091
def get_slot_header(self, item):
        
        obj = item["obj"]
        obj = api.get_object(obj)

        # Prepare the template data
        data = {
            "obj": obj,
            "item": item,
            "position": item["Pos"],
        }
        # update the data
        data.update(self.get_slot_header_data(obj))

        template = ViewPageTemplateFile("../templates/slot_header.pt")
        return template(self, data=data)
1234541
def get_value(self, column=0, row=0):
        
        x = self._widget.item(row, column)

        if x==None: return x
        else:       return str(self._widget.item(row,column).text())
193051
def to_html(self):
        
        if self.items is None:
            return
        else:
            html = '<ol%s>\n' % self.html_attributes()
            for item in self.items:
                html += '<li>%s</li>\n' % item.to_html()
            html += '</ol>'
            return html
636570
def _make_default_header(self):
        
        td_max = 0

        for idx, tr in enumerate(self._tr_nodes):
            td_count = len(tr.contents.filter_tags(matches=ftag('td')))
            if td_count > td_max:
                td_max = td_count

        self._log('creating default header (%d columns)' % td_max)
        return [ 'column%d' % n for n in range(0,td_max) ]
1036183
def _get_cols(row_content):
    
    cols = []
    subcell_col = []
    prev_bar = None
    for _coord, item in row_content:
        if isinstance(item, LTTextLine):
            subcell_col.append(item)
        else:  # bar, add column content
            # When there is no content, we count a None column
            if prev_bar:
                bar_ranges = (prev_bar, item)
                col_items = subcell_col if subcell_col else [None]
                cols.extend([bar_ranges, col_items])
            prev_bar = item
            subcell_col = []
    # Remove extra column before first bar
    return cols
1281238
def split_table_cells(self, row):
        

        row = iter(row)
        col = 0
        start_col = col + 1
        cell = ''
        first_cell = True
        while True:
            char = next(row, None)
            col += 1
            if char == '|':
                if first_cell:
                    # First cell (content before the first |) is skipped
                    first_cell = False
                else:
                    yield (cell, start_col)
                cell = ''
                start_col = col + 1
            elif char == '\\':
                char = next(row)
                col += 1
                if char == 'n':
                    cell += '\n'
                else:
                    if char not in ['|', '\\']:
                        cell += '\\'
                    cell += char
            elif char:
                cell += char
            else:
                break
1208026
def tabulate(data, header=True, headers=None, accessors=None,
             **table_options):
    
    if header and not headers:
        data = iter(data)
        try:
            headers = next(data)
        except StopIteration:
            pass
    if headers and hasattr(headers, 'items') and accessors is None:
        # Dict mode; Build accessors and headers from keys of data.
        data = itertools.chain([headers], data)
        accessors = list(headers)
        headers = [' '.join(map(str.capitalize, x.replace('_', ' ').split()))
                   for x in accessors]
    t = Table(headers=headers, accessors=accessors, **table_options)
    try:
        t.print(data)
    except RowsNotFound:
        pass
    return t
1310615
def add(self, item):
        
        if isinstance(item, list):
            self.rows.append(Row(item))
        elif isinstance(item, Row):
            self.rows.append(item)
        else:
            raise InvalidMessageItemError(item, item.__class__)
769949
def GetCellValue (self, column, default = None):
                
                if isinstance(column, str):
                        column = ColumnToIndex(column)
                if column in self:
                        if "content" in UserDict.__getitem__(self, column):
                                return UserDict.__getitem__(self, column)["content"]
                return default
1001878
def text2html_table(items:Collection[Collection[str]])->str:
    ""
    html_code = f"""<table border="1" class="dataframe">"""
    html_code += f"""  <thead>\n    <tr style="text-align: right;">\n"""
    for i in items[0]: html_code += f"      <th>{_treat_html(i)}</th>"
    html_code += f"    </tr>\n  </thead>\n  <tbody>"
    html_code += "  <tbody>"
    for line in items[1:]:
        html_code += "    <tr>"
        for i in line: html_code += f"      <td>{_treat_html(i)}</td>"
        html_code += "    </tr>"
    html_code += "  </tbody>\n</table>"
    return html_code
653832
@Override
    public void renderItem(Listitem item, Document doc) {
        log.trace("item render");
        item.setSelectable(true);
        item.addForward(Events.ON_DOUBLE_CLICK, item.getListbox(), Events.ON_DOUBLE_CLICK);
        addCell(item, "");
        addCell(item, doc.getDateTime());
        addCell(item, doc.getTitle());
        addCell(item, doc.getLocationName());
        addCell(item, doc.getAuthorName());
    }
301662
def display_data_item(self, data_item: DataItem, source_display_panel=None, source_data_item=None):
        
        for display_panel in self.__document_controller.workspace_controller.display_panels:
            if display_panel.data_item == data_item._data_item:
                display_panel.request_focus()
                return DisplayPanel(display_panel)
        result_display_panel = self.__document_controller.next_result_display_panel()
        if result_display_panel:
            display_item = self.__document_controller.document_model.get_display_item_for_data_item(data_item._data_item)
            result_display_panel.set_display_panel_display_item(display_item)
            result_display_panel.request_focus()
            return DisplayPanel(result_display_panel)
        return None
305351
public function item($item = [], $options = [])
    {
        $html = '<li style="display: inline; list-style-type: none; padding-right: 20px;">';
        $html .= (key_exists('active', $item) && $item['active'] ? '<b>' : '');
        $html .= $this->Html->link(__($item['title']), $item['url']);
        $html .= (key_exists('active', $item) ? '</b>' : '');
        $html .= '</li>';
        return $html;
    }
409365
public C getCell(T item) {
        C cell = pool.poll();
        if(cell != null) {
            cell.updateItem(item);
        } else {
            cell = cellFactory.apply(item);
        }
        return cell;
    }
523093
def add_row(self, data: list=None):
        
        # validation
        if self.headers and data:
            if len(self.headers) != len(data):
                raise ValueError

        offset = 0 if not self.headers else 1
        row = list()

        if data:
            for i, element in enumerate(data):
                contents = '' if element is None else str(element)
                entry = ttk.Entry(self)
                entry.insert(0, contents)
                entry.grid(row=len(self._rows) + offset,
                           column=i,
                           sticky='E,W')
                row.append(entry)
        else:
            for i in range(self.num_of_columns):
                entry = ttk.Entry(self)
                entry.grid(row=len(self._rows) + offset,
                           column=i,
                           sticky='E,W')
                row.append(entry)

        self._rows.append(row)

        # clear all bindings
        for row in self._rows:
            for widget in row:
                widget.unbind('<Tab>')

        def add(e):
            self.add_row()

        last_entry = self._rows[-1][-1]
        last_entry.bind('<Tab>', add)

        e = self._rows[-1][0]
        e.focus_set()

        self._redraw()
558255
def append(self, item):
        
        try:
            self._data[self._position] = item
        except IndexError:
            self._grow()
            self._data[self._position] = item
        self._position += 1
        return self
1269183
def headers(row = nil)
      row ||= rows.first
      header_type = row.th.exist? ? 'th' : 'td'
      row.send("#{header_type}s")
    end