Creates the columns for the view
967695
@Override
  public void createPartControl(Composite parent) {
    Tree main =
        new Tree(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL
            | SWT.V_SCROLL);
    main.setHeaderVisible(true);
    main.setLinesVisible(false);
    main.setLayoutData(new GridData(GridData.FILL_BOTH));

    TreeColumn serverCol = new TreeColumn(main, SWT.SINGLE);
    serverCol.setText("Location");
    serverCol.setWidth(300);
    serverCol.setResizable(true);

    TreeColumn locationCol = new TreeColumn(main, SWT.SINGLE);
    locationCol.setText("Master node");
    locationCol.setWidth(185);
    locationCol.setResizable(true);

    TreeColumn stateCol = new TreeColumn(main, SWT.SINGLE);
    stateCol.setText("State");
    stateCol.setWidth(95);
    stateCol.setResizable(true);

    TreeColumn statusCol = new TreeColumn(main, SWT.SINGLE);
    statusCol.setText("Status");
    statusCol.setWidth(300);
    statusCol.setResizable(true);

    viewer = new TreeViewer(main);
    viewer.setContentProvider(this);
    viewer.setLabelProvider(this);
    viewer.setInput(CONTENT_ROOT); // don't care

    getViewSite().setSelectionProvider(viewer);
    
    getViewSite().getActionBars().setGlobalActionHandler(
        ActionFactory.DELETE.getId(), deleteAction);
    getViewSite().getActionBars().getToolBarManager().add(editServerAction);
    getViewSite().getActionBars().getToolBarManager().add(newLocationAction);

    createActions();
    createContextMenu();
  }
191351
def columns=(array)
      @_header_adjustment = 1
      @columns = array
      @columns.each_with_index { |c,i| 
        @cw[i] ||= c.to_s.length
        @calign[i] ||= :left
      }
      # maintains index in current pointer and gives next or prev
      @column_pointer = Circular.new @columns.size()-1
    end
368130
private static List<UserCustomColumn> createColumns() {

		List<UserCustomColumn> columns = new ArrayList<>();
		columns.addAll(createRequiredColumns());

		int index = columns.size();
		columns.add(UserCustomColumn
				.createColumn(index++, COLUMN_GEOMETRY_TYPE_NAME,
						GeoPackageDataType.TEXT, false, null));

		return columns;
	}
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
980487
def _init_forms(self):
        
        super(BaseCRUDView, self)._init_forms()
        conv = GeneralModelConverter(self.datamodel)
        if not self.add_form:
            self.add_form = conv.create_form(
                self.label_columns,
                self.add_columns,
                self.description_columns,
                self.validators_columns,
                self.add_form_extra_fields,
                self.add_form_query_rel_fields,
            )
        if not self.edit_form:
            self.edit_form = conv.create_form(
                self.label_columns,
                self.edit_columns,
                self.description_columns,
                self.validators_columns,
                self.edit_form_extra_fields,
                self.edit_form_query_rel_fields,
            )
1165892
def create_columns(self):
        """"""
        reader = self._get_csv_reader()
        headings = six.next(reader)
        try:
            examples = six.next(reader)
        except StopIteration:
            examples = []

        found_fields = set()
        for i, value in enumerate(headings):
            if i >= 20:
                break

            infer_field = self.has_headings and value not in found_fields

            to_field = (
                {
                    "date": "date",
                    "amount": "amount",
                    "description": "description",
                    "memo": "description",
                    "notes": "description",
                }.get(value.lower(), "")
                if infer_field
                else ""
            )

            if to_field:
                found_fields.add(to_field)

            TransactionCsvImportColumn.objects.update_or_create(
                transaction_import=self,
                column_number=i + 1,
                column_heading=value if self.has_headings else "",
                to_field=to_field,
                example=examples[i].strip() if examples else "",
            )
735589
function() {
        var columnWidths = this.coordColumnModel.getWidths(this.whichSide);
        var columns = this.columnModel.getVisibleColumns(this.whichSide, true);

        return {
            widths: columnWidths,
            columns: columns
        };
    }
1024291
def add_column(name, column_properties = {})
      validate_column_absence(name)
      create_column_properties(name, column_properties)
      @data_rows.each{|x|
        x << (yield Row.new(@column_indexes, x))
      }
      @column_indexes[name] = @column_indexes.size
      self # enable chaining
    end
1358383
def add_columns(self, model, **fields):
        """"""
        for name, field in fields.items():
            model._meta.add_field(name, field)
            self.ops.append(self.migrator.add_column(
                model._meta.table_name, field.column_name, field))
            if field.unique:
                self.ops.append(self.migrator.add_index(
                    model._meta.table_name, (field.column_name,), unique=True))
        return model
881706
public void newColumns()
    {
        column = new Table(0);
        columns = 1;
        table.newRow();
        table.addCell(column);
        table.cell().top();
    }
384150
public function columns()
    {
        $this->hook->filter(
            'manage_users_columns',
            [$this->user->getColumns(), 'setNames']
        )->dispatch();

        $this->hook->action(
            'manage_users_custom_column',
            function ($value, $name, $id) {
                ob_start();

                $column = $this->user->getColumn($name);

                if (isset($column)) {
                    $column->render($id);
                }

                return ob_get_clean();
            },
            ['numberOfArguments' => 3]
        )->dispatch();
    }
137451
def draw_columns
            @sections[:body][:fields].each do |field, settings|
                settings = [settings[0], @posY, (@defaults.merge (settings[1] || { }).symbolize_keys!)]
                settings[2][:style] = settings[2][:style].to_sym
                set_options settings[2]
                draw_line(@posY + @sections[:body][:settings][:height]/2)
                field = settings[2][:column] || field.to_s.split('_').inject('') do |str, part|
                    str << part.camelize << " "
                end
                draw_text field, settings
            end
            draw_line(@posY - @sections[:body][:settings][:height]/2)
            set_pos_y @sections[:body][:settings][:height]
        end
1002704
public function initColumns()
    {
        $elems = $this->node->xpath("value[@key='columns']");
        $this->columns = $this->getFormatter()->createColumns($this, $elems[0]);

        return $this;
    }
1194585
protected function buildCols()
    {
        if (!$this->cols) {
            throw new Exception('No columns in the SELECT.');
        }

        $cols = array();
        foreach ($this->cols as $key => $val) {
            if (is_int($key)) {
                $cols[] = $this->quoteNamesIn($val);
            } else {
                $cols[] = $this->quoteNamesIn("$val AS $key");
            }
        }

        return $this->indentCsv($cols);
    }
1000707
def columns(self):
        
        schema = self.schema()
        return [schema.column(col) for col in self.__columns]
186498
protected function loadColumns()
    {
        $statement = $this->db->query('SHOW COLUMNS FROM ' . $this->config->getDbTable());

        $this->columns = array();
        while (false !== ($column = $statement->fetchObject())) {
            $this->columns[] = new Column($column, $this->config->getDbPrefix());
        }
    }
1259268
public function columns()
    {
        $this->hook->filter(
            "manage_edit-{$this->taxonomy->getModel()->getSlug()}_columns",
            [$this->taxonomy->getColumns(), 'setNames']
        )->dispatch();

        $this->hook->filter(
            "manage_{$this->taxonomy->getModel()->getSlug()}_custom_column",
            function ($value, $name, $id) {
                return $this->taxonomy->getColumn($name)->render($id);
            },
            ['numberOfArguments' => 3]
        )->dispatch();
    }