Supports column level rights
502098
boolean canInsert(Table table, boolean[] columnCheckList) {

        if (isFull || isFullInsert) {
            return true;
        }

        return containsAllColumns(insertColumnSet, table, columnCheckList);
    }
937959
function (aOldColumns, aNewColumns, fnFormatterChanged) {
				var oNewColumn,
					oOldColumn,
					iResult = 0,
					i,
					n;

				if (!aOldColumns || aOldColumns.length !== aNewColumns.length) {
					return 2;
				}
				if (aOldColumns !== aNewColumns) {
					for (i = 0, n = aOldColumns.length; i < n; i += 1) {
						oOldColumn = aOldColumns[i];
						oNewColumn = aNewColumns[i];
						if (oOldColumn.grouped !== oNewColumn.grouped
							|| oOldColumn.inResult !== oNewColumn.inResult
							|| oOldColumn.level !== oNewColumn.level
							|| oOldColumn.name !== oNewColumn.name
							|| oOldColumn.total !== oNewColumn.total
							|| oOldColumn.visible !== oNewColumn.visible) {
							return 2;
						}
						if (oOldColumn.formatter !== oNewColumn.formatter) {
							iResult = 1;
							if (fnFormatterChanged) {
								fnFormatterChanged(oNewColumn);
							}
						}
					}
				}

				return iResult;
			}
992278
public function enableAreaLayoutCustomColumnWidths()
    {
        $db = Loader::db();
        $db->Execute('update AreaLayouts set arLayoutIsCustom = ? where arLayoutID = ?', array(1, $this->arLayoutID));
        $this->arLayoutIsCustom = true;
    }
1140626
function addAccessControl () {
    // no access control if accessIdName not set
    if (!defined(this.args.accessIdName)) {
        return
    }
    // access id column is on primary table/record
    var alias = this.alias
    // validate column name - throw error
    var column = this.model.columnName(this.args.accessIdName, true)
    // get quoted column name
    column = this.quoteName(column)
    // get param name for value placeholder
    var paramName = this.newParam(this.args.accessIdName)
    // set value for param placeholder
    this.params[paramName] = this.args.accessId
    // add UNHEX for binary ids
    var placeholder = this.unhexId(`:${paramName}`)
    // add where SQL
    this.where.push(`${alias}.${column} = ${placeholder}`)   
}
1308022
def ensure_hbounds(self):
        """"""
        self.cursor.x = min(max(0, self.cursor.x), self.columns - 1)
391292
def column_width(self, width):
        """"""
        if isinstance(width, int):
            if width >= 0:
                self._column_width = width
            else:
                raise ValueError('Column width must be nonnegative.')
        else:
            raise TypeError('Column width must be a nonnegative integer.')
728143
private static void editColumns(final JFrame frm, final Vector<String> colNames, final Vector<ColumnType> colTypes, final UnaryFunction<ImmutablePair<Vector<String>,Vector<ColumnType>>,Void> cf) {

        // Prepares UI components
        final JLabel dialogLabel =
            new JLabel("<html><b>Column mappings as CSV</b></html>");
        dialogLabel.setHorizontalTextPosition(SwingConstants.LEFT);

        final JLabel useLabel = new JLabel("<html>Simplified CSV syntax, with no quoting required.<br />For each line: <tt>type;name</tt> (e.g. <tt>string;Column name</tt>)</html>");
        useLabel.setHorizontalTextPosition(SwingConstants.LEFT);

        final JEditorPane csvArea = new JEditorPane();
        csvArea.setEditable(false);
        dialogLabel.setLabelFor(csvArea);
        final JScrollPane csvPanel =
            new JScrollPane(csvArea,
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        csvPanel.setBorder(BorderFactory.createLoweredBevelBorder());
        csvArea.setContentType("text/csv");

        final Document doc = csvArea.getDocument();
        final JDialog dlg = new JDialog(frm, "Edit columns");
        final Container content = dlg.getContentPane();
        final GroupLayout layout = new GroupLayout(content);

        final AbstractAction update = new AbstractAction() {
                public void actionPerformed(final ActionEvent evt) {
                    BufferedReader r = null;
                    final Vector<String> ns = new Vector<String>();
                    final Vector<ColumnType> ts = new Vector<ColumnType>();

                    try {
                        final StringReader sr =
                            new StringReader(csvArea.getText());

                        r = new BufferedReader(sr);

                        String line, n;
                        ColumnType t;
                        for (int i = 1, o = 0, l = 0, x = -1;
                             (line = r.readLine()) != null; i++) {

                            l = line.length();

                            if ((x = line.indexOf(";")) == -1) {
                                JOptionPane.showMessageDialog(dlg, "Invalid CSV line #" + i, "Invalid line", JOptionPane.ERROR_MESSAGE);

                                csvArea.select(o, o+l);
                                return;
                            } // end of if

                            // ---

                            t = ColumnType.typeFor(line.substring(0, x));

                            if (t == null) {
                                JOptionPane.showMessageDialog(dlg, "Invalid column type at line #" + i + ": " + line.substring(0, x), "Invalid type", JOptionPane.ERROR_MESSAGE);

                                csvArea.select(o, o+x);
                                return;
                            } // end of if

                            n = line.substring(x+1);

                            if (n.length() == 0) {
                                JOptionPane.showMessageDialog(dlg, "Invalid column name at line #" + i, "Invalid name", JOptionPane.ERROR_MESSAGE);

                                csvArea.setCaretPosition(o+x+1);
                                return;
                            } // end of if

                            ns.add(n);
                            ts.add(t);

                            o += l + 1;
                        }
                    } catch (Exception e) {
                        throw new RuntimeException("Fails to update", e);
                    } finally {
                        if (r != null) {
                            try {
                                r.close();
                            } catch (Exception e) {
                                e.printStackTrace();
                            } // end of catch
                        } // end of if
                    } // end of finally

                    cf.apply(ImmutablePair.of(ns, ts));
                    dlg.dispose();
                }
            };
        update.putValue(Action.NAME, "Update");
        update.putValue(Action.SHORT_DESCRIPTION, "Update column mappings");
        update.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_U);
        update.setEnabled(false);
        final JButton updateBut = new JButton(update);

        Binder.bind("text", csvArea, "enabled", update,
                    new BindingOptionMap().
                    add(BindingKey.INPUT_TRANSFORMER,
                        StringLengthToBooleanTransformer.
                        getTrimmingInstance()).
                    add(TextBindingKey.CONTINUOUSLY_UPDATE_VALUE));

        // Lays out UI component
        content.setLayout(layout);

	layout.setAutoCreateGaps(true);
	layout.setAutoCreateContainerGaps(true);

        final GroupLayout.SequentialGroup vgroup =
            layout.createSequentialGroup().
            addComponent(dialogLabel).
            addComponent(useLabel).
            addComponent(csvPanel,
                         GroupLayout.PREFERRED_SIZE,
                         GroupLayout.DEFAULT_SIZE,
                         Short.MAX_VALUE).
            addComponent(updateBut);

        final GroupLayout.ParallelGroup hgroup =
            layout.createParallelGroup(Alignment.LEADING).
            addComponent(dialogLabel).
            addComponent(useLabel).
            addComponent(csvPanel).
            addGroup(layout.createSequentialGroup().
                     addPreferredGap(LayoutStyle.ComponentPlacement.RELATED,
                                     GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).
                     addComponent(updateBut));

        layout.setVerticalGroup(vgroup);
        layout.setHorizontalGroup(hgroup);

        dlg.setModal(true);
        dlg.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
        dlg.setMinimumSize(new Dimension(frm.getWidth(), frm.getHeight()/3));

        final KeyAdapter kl = new KeyAdapter() {
            public void keyReleased(KeyEvent e) {
                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) dlg.dispose();
            }
        };

        dlg.addKeyListener(kl);
        content.addKeyListener(kl);
        csvArea.addKeyListener(kl);

        final KeyAdapter editKeys = new KeyAdapter() {
                public void keyReleased(final KeyEvent e) {
                    if (e.getKeyCode() == KeyEvent.VK_U && e.isControlDown())
                        updateBut.doClick();
                }
            };

        content.addKeyListener(editKeys);
        csvArea.addKeyListener(editKeys);

        csvArea.grabFocus();

        // Load as CSV
        final int len = colNames.size();

        StringBuffer line = new StringBuffer();
        for (int i = 0, o = 0; i < len; i++) {
            line.setLength(0);
            line.append(colTypes.elementAt(i)).
                append(';').append(colNames.elementAt(i)).
                append("\n");

            try {
                doc.insertString(o, line.toString(), null);
            } catch (Exception e) {
                throw new RuntimeException("Fails to append CSV line", e);
            }

            o += line.length();
        }

        csvArea.setEditable(true);

        dlg.pack();
        dlg.setLocationRelativeTo(null);
        dlg.setVisible(true);
    }
190994
function(oTable, oColumn) {
			if (!oTable || !oColumn) {
				return [];
			}

			var iHeaderRowCount = TableUtils.getHeaderRowCount(oTable),
				sColumnId = oColumn.getId(),
				aLabels = [sColumnId];

			if (iHeaderRowCount > 1) {
				for (var i = 1; i < iHeaderRowCount; i++) {
					aLabels.push(sColumnId + "_" + i);
				}

				var aSpans = TableUtils.Column.getParentSpannedColumns(oTable, sColumnId);
				if (aSpans && aSpans.length) {
					for (var i = 0; i < aSpans.length; i++) {
						var iLevel = aSpans[i].level;
						var sParentId = aSpans[i].column.getId();
						aLabels[iLevel] = iLevel === 0 ? sParentId : (sParentId + "_" + iLevel);
					}
				}
			}

			return aLabels;
		}
198711
def column_options
      { limit: column.limit, default: column.default, null: column.null }
    end
1003416
function columns(column) {
    if (!column) {
      return this;
    }
    this._statements.push({
      grouping: 'columns',
      value: normalizeArr.apply(null, arguments)
    });
    return this;
  }
751947
function(i, oColumn) {
            headers[i].push(oColumn.getSanitizedKey());
            if(oColumn._oParent) {
                recurseAncestorsForHeaders(i, oColumn._oParent);
            }
        }
183255
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
744829
function() {
    this.validateColumnWidths();
    
    for(var allKeys = this._oColumnSet.keys, i=0, len=allKeys.length, col; i<len; i++) {
        col = allKeys[i];
        if(col._ddResizer) {
            col._ddResizer.resetResizerEl();
        }
    }
}
733545
private void restoreColumnSettings(IDialogSettings settings) {
		this.list.getTable().layout(true);
		restoreColumnWidths(settings);
		if (!this.isSortedElements) {
			this.sort = Column.SOURCE;
			try {
				final String columnName = settings.get(getPreferenceContainerID() + getColumnSortCriteraDialogSettingsKey());
				if (!Strings.isEmpty(columnName)) {
					this.sort = Column.valueOf(columnName);
					if (this.sort == null) {
						this.sort = Column.SOURCE;
					}
				}
			} catch (Throwable exception) {
				//
			}
			assert this.sort != null;
			switch (this.sort) {
			case SOURCE:
				sortBySourceColumn();
				break;
			case TARGET:
				sortByTargetColumn();
				break;
			default:
			}
		} else {
			noSort();
		}
	}
873960
def set_header_visibility(self, column=False, row=False):
        
        if row:    self._widget.verticalHeader().show()
        else:      self._widget.verticalHeader().hide()

        if column: self._widget.horizontalHeader().show()
        else:      self._widget.horizontalHeader().hide()

        return self
1348568
private void setContent(final WColumn column, final WHeading heading, final WComponent content) {
		column.removeAll();

		if (heading != null) {
			column.add(heading);
		}

		if (content != null) {
			column.add(content);
		}

		// Update column widths & visibility
		if (hasLeftContent() && hasRightContent()) {
			// Set columns 50%
			leftColumn.setWidth(50);
			rightColumn.setWidth(50);
			// Set both visible
			leftColumn.setVisible(true);
			rightColumn.setVisible(true);
		} else {
			// Set columns 100% (only one visible)
			leftColumn.setWidth(100);
			rightColumn.setWidth(100);
			// Set visibility
			leftColumn.setVisible(hasLeftContent());
			rightColumn.setVisible(hasRightContent());
		}
	}
389415
public void setEditable(final int row, final int col, final boolean enable) {
		final int actualIndex = getTableColumn(col).getIndex();
		getRecord(row).setColumnEnabled(actualIndex, enable);
	}