Initialize column headers.
420201
def get_hdrs(self, **kws):
        """"""
        hdrs = get_hdrs(self.prt_flds, **kws)
        # Values in a "format_txt" "column" are used for formatting, not printing
        return [h for h in hdrs if h != "format_txt"]
684904
def smartResizeColumnsToContents( self ):
        
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        
        header = self.header()
        header.blockSignals(True)
        
        columns = range(self.columnCount())
        sizes = [self.columnWidth(c) for c in columns]
        header.resizeSections(header.ResizeToContents)
        
        for col in columns:
            width = self.columnWidth(col)
            if ( width < sizes[col] ):
                self.setColumnWidth(col, sizes[col])
        
        header.blockSignals(False)
        
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
1232986
private void init() {
        if (initialized.compareAndSet(false, true)) {
            final RowSorter<? extends TableModel> rowSorter = table.getRowSorter();
            rowSorter.toggleSortOrder(1); // sort by date
            rowSorter.toggleSortOrder(1); // descending
            final TableColumnModel columnModel = table.getColumnModel();
            columnModel.getColumn(1).setCellRenderer(dateRenderer);
            columnModel.getColumn(2).setCellRenderer(sizeRenderer);
        }
    }
536287
def column(*names)
      # Clear the header row if this is being customized by the user
      unless @customized
        @customized = true
        clear
      end
      
      # Extract configuration
      options = names.last.is_a?(Hash) ? names.pop : {}
      content = names.last.is_a?(String) ? names.pop : nil
      args = [content, options].compact
      
      names.collect! do |name|
        column = row.cell(name, *args)
        column.content_type = :header
        column[:scope] ||= 'col'
        column
      end
      
      names.length == 1 ? names.first : names
    end
308724
def _with_columns(self, columns):
        """"""
        table = type(self)()
        for label, column in zip(self.labels, columns):
            self._add_column_and_format(table, label, column)
        return table
178942
def _SetHeader(self, values):
    """"""
    if self._values and len(values) != len(self._values):
      raise ValueError('Header values not equal to existing data width.')
    if not self._values:
      for _ in range(len(values)):
        self._values.append(None)
    self._keys = list(values)
    self._BuildIndex()
398771
def mk_set_headers(self, data, columns):
        
        columns = tuple(columns)
        lens = []

        for key in columns:
            value_len = max(len(str(each.get(key, ''))) for each in data)
            # account for header lengths
            lens.append(max(value_len, len(self._get_name(key))))

        fmt = self.mk_fmt(*lens)
        return fmt
1088006
protected function initColumns()
	{
		if($this->columns===array())
		{
			if($this->dataProvider instanceof CActiveDataProvider)
				$this->columns=$this->dataProvider->model->attributeNames();
			elseif($this->dataProvider instanceof IDataProvider)
			{
				// use the keys of the first row of data as the default columns
				$data=$this->dataProvider->getData();
				if(isset($data[0]) && is_array($data[0]))
					$this->columns=array_keys($data[0]);
			}
		}
		$id=$this->getId();
		foreach($this->columns as $i=>$column)
		{
			if(is_string($column))
				$column=$this->createDataColumn($column);
			else
			{
				if(!isset($column['class']))
					$column['class']='CDataColumn';
				$column=Yii::createComponent($column, $this);
			}
			if(!$column->visible)
			{
				unset($this->columns[$i]);
				continue;
			}
			if($column->id===null)
				$column->id=$id.'_c'.$i;
			$this->columns[$i]=$column;
		}

		foreach($this->columns as $column)
			$column->init();
	}
901255
private void init() {
        mHeaderFields = new Hashtable<>();
        mStartLine = "";
        mMsgHeader = "";
        mMalformedHeader = false;
        mContentLength = -1;
        mLineDelimiter = CRLF;
        mVersion = HttpHeader.HTTP10;
    }
1168890
public void setHeading(String heading)
    {
	    
    	String m_heading = heading;
	    
    	String [] preCol = m_heading.split("\n");
    	String [][] cells = new String[preCol.length][this.m_columnNumber];
    	
    	
    	for(int i=0; i<preCol.length; i++)
    		cells[i] = preCol[i].split(";", this.m_columnNumber);
    	
    	for(int i=0; i<cells[0].length; i++)
    	{
    		String xhead = "";
    		for(int j=0; j<preCol.length; j++){
    			//if(cells[j][i]!=null)
    			xhead += (cells[j][i]+ " ");
    		}
    		this.m_xheading.add(xhead);
    	}
    	
    }
763999
public function autosetColumns()
    {
        $value = $this->value;
        if (empty($this->columns)) {
            $dataValue = $value;
            if (count($dataValue)) {
                $firstValue = (array) $dataValue[0];
                foreach (array_keys($firstValue) as $header) {
                    $this->addColumn($header);
                }
            }
        }
    }
472401
def CreateColumns( self ):
        """"""
        self.SetItemCount(0)
        # clear any current columns...
        for i in range( self.GetColumnCount())[::-1]:
            self.DeleteColumn( i )
        # now create
        for i, column in enumerate(self.columns):
            column.index = i
            self.InsertColumn(i, column.name)
            if not windows or column.targetWidth is None:
                self.SetColumnWidth(i, wx.LIST_AUTOSIZE)
            else:
                self.SetColumnWidth(i, column.targetWidth)
409388
protected function initialisation()
	{
		/** @var Column $col */
		foreach( $this->table_schema as $col)
		{
			// todo virtual field fix

			$name = $col->getName();
			$prefix_name = 't.' . $name;
			$this->columns[] = $prefix_name;
			$this->valid_columns[$name] = $prefix_name;
			if( $this->check_type )
			{
				$this->setType($col->getType(), $name);
			}
		}
	}
500494
function Column (table, header, i) {
  this._table = table, this._header = header, this._i = i
}
658229
public void setColumns(List<ColumnDefEx> cols) {
        clearHead();
        datacols.clear();
        if (!Empty.is(cols)) datacols.addAll(cols); // head will be created later in onLoad() or by refreshColumns()
    }
714824
private void buildHeaders() {
		if (!headers.isEmpty()) {
			for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
				List<String> values = entry.getValue();

				for (String value : values) {
					connection.addRequestProperty(entry.getKey(), value);
				}
			}
		}
	}
632632
public void init(final String... headers) {
        
        setupMappingColumns(headers);
        this.beanMappingCache = BeanMappingCache.create(beanMapping);
        
        // 初期化完了
        this.initialized = true;
    
    }