Configures the horizontal and vertical alignment of cells. This must be called before the
grid is displayed.
352715
public void setCellAlignment (HasAlignment.HorizontalAlignmentConstant horiz,
                                  HasAlignment.VerticalAlignmentConstant vert)
    {
        _cellHorizAlign = horiz;
        _cellVertAlign = vert;
    }
290819
public void setGrid(int width, int height)
    {
        Check.superiorStrict(width, 0);
        Check.superiorStrict(height, 0);
        gridWidth = width;
        gridHeight = height;
    }
1145290
protected void configurePopup() {
        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        setBorderPainted(true);
        setBorder(LIST_BORDER);
        setOpaque(false);
        add(scroller);
        setDoubleBuffered(true);
        setFocusable(false);
    }
304691
function(){
			var oThis = this,
				w = 0;
			this.firstColumn = true;

			$.each(this.gridCompColumnArr,function(){
				if(this.options.visible){
					w+=parseInt(this.options.width);
					this.firstColumn = oThis.firstColumn;
					oThis.firstColumn = false;
					oThis.lastVisibleColumn = this;
					oThis.lastVisibleColumnWidth = this.options.width;
				}
			});
			this.contentRealWidth = w;
		}
326158
public AT_Row setTextAlignment(TextAlignment textAlignment){
		if(this.hasCells()){
			for(AT_Cell cell : this.getCells()){
				cell.getContext().setTextAlignment(textAlignment);
			}
		}
		return this;
	}
1085926
private void organizeColumns()
    {
        columns = new Vector<TableColumn>();
        for (int bi = 0; bi < nested.size(); bi++)
        {
            Box box = nested.elementAt(bi);
            if (box instanceof TableColumn)
            {
                TableColumn col = (TableColumn) box;
                if (col.getSpecifiedWidth().equals(""))
                    col.setSpecifiedWidth(colwidth); //when column width is not set, use the group width
                for (int i = 0; i < col.getSpan(); i++)
                {
                    if (i == 0)
                        columns.add(col);
                    else
                        columns.add(col.copyBox());
                }
            }
        }
        //when there are no <col> elements, use the span attribute
        if (columns.isEmpty())
        {
            TableColumn col = new TableColumn(TableColumn.createAnonymousColumn(getParent().getElement().getOwnerDocument()), g, ctx);
            col.setSpecifiedWidth(colwidth);
            for (int i = 0; i < span; i++)
                columns.add(col.copyBox());
        }
    }
492369
def _do_layout(self):
        """"""

        sizer_csvoptions = wx.FlexGridSizer(5, 4, 5, 5)

        # Adding parameter widgets to sizer_csvoptions
        leftpos = wx.LEFT | wx.ADJUST_MINSIZE
        rightpos = wx.RIGHT | wx.EXPAND

        current_label_margin = 0  # smaller for left column
        other_label_margin = 15

        for label, widget in zip(self.param_labels, self.param_widgets):
            sizer_csvoptions.Add(label, 0, leftpos, current_label_margin)
            sizer_csvoptions.Add(widget, 0, rightpos, current_label_margin)

            current_label_margin, other_label_margin = \
                other_label_margin, current_label_margin

        sizer_csvoptions.AddGrowableCol(1)
        sizer_csvoptions.AddGrowableCol(3)

        self.sizer_csvoptions = sizer_csvoptions
1310927
def align_column n, alignment
      r = rows
      column(n).each_with_index do |col, i|
        cell = r[i][n]
        next unless cell
        cell.alignment = alignment unless cell.alignment?
      end
    end
905449
def set_header_align(self, array):
        

        self._check_row_size(array)
        self._header_align = array
        return self
682550
public void setDimensions(int maxCols, int minCols, int maxRows, int minRows) {
    this.maxCols = maxCols;
    this.minCols = minCols;
    this.maxRows = maxRows;
    this.minRows = minRows;
  }
529673
def _init_vertical(self):
        """"""
        self.scale.grid(row=0, sticky='ns')
        # showvalue
        padx1, padx2 = 0, 0
        pady1, pady2 = 0, 0
        if self._showvalue:
            self.label.configure(text=self._formatter.format(self._start))
            if self._labelpos == 'w':
                self.label.place(in_=self.scale, bordermode='outside',
                                 relx=0, y=0, anchor='e')
                self.update_idletasks()
                padx1 = self.label.winfo_width()
                self.label.configure(text=self._formatter.format(self._start + self._extent))
                self.update_idletasks()
                padx1 = max(self.label.winfo_width(), padx1)
            elif self._labelpos == 'e':
                self.label.place(in_=self.scale, bordermode='outside',
                                 relx=1, y=1, anchor='w')
                self.update_idletasks()
                padx2 = self.label.winfo_width()
                self.label.configure(text=self._formatter.format(self._start + self._extent))
                self.update_idletasks()
                padx2 = max(self.label.winfo_width(), padx2)
            else:  # self._labelpos in ['n', 's']:
                if self._labelpos == 'n':
                    rely = 0
                    anchor = 's'
                    pady1 = self.label.winfo_reqheight()
                else:
                    rely = 1
                    anchor = 'n'
                    pady2 = self.label.winfo_reqheight()
                self.label.place(in_=self.scale, bordermode='outside', relx=0.5,
                                 rely=rely, anchor=anchor)
                self.update_idletasks()
                w = self.label.winfo_width()
                self.label.configure(text=self._formatter.format(self._start + self._extent))
                self.update_idletasks()
                w = max(w, self.label.winfo_width())
                ws = self.scale.winfo_reqwidth()
                if w > ws:
                    padx = (w - ws) // 2
                    if self._tickinterval:
                        if self._tickpos == 'e':
                            padx1 = padx
                        else:   # self._tickpos == 'w'
                            padx2 = padx
                    else:
                        padx1, padx2 = padx, padx
        # ticks
        padx1_2, padx2_2 = 0, 0
        if self._tickinterval:
            nb_interv = int(self._extent / self._tickinterval)
            if self._tickpos == 'w':
                for i in range(nb_interv + 1):
                    tick = self._start + i * self._tickinterval
                    self.ticks.append(tick)
                    self.ticklabels.append(ttk.Label(self,
                                                     style=self._style_name + ".TLabel",
                                                     text=self._formatter.format(tick)))
                    self.ticklabels[i].place(in_=self.scale, bordermode='outside',
                                             x=-1 - padx1, y=0,
                                             anchor='e')
                    self.update_idletasks()
                    padx1_2 = max(self.ticklabels[i].winfo_width(), padx1_2)
            else:  # self._tickpos == 'e'
                w = self.scale.winfo_reqwidth()
                for i in range(nb_interv + 1):
                    tick = self._start + i * self._tickinterval
                    self.ticks.append(tick)
                    self.ticklabels.append(ttk.Label(self,
                                                     style=self._style_name + ".TLabel",
                                                     text=self._formatter.format(tick)))
                    self.ticklabels[i].place(in_=self.scale, bordermode='outside',
                                             x=w + 1 + padx2, y=0,
                                             anchor='w')
                    self.update_idletasks()
                    padx2_2 = max(self.ticklabels[i].winfo_width(), padx2_2)
        self.scale.grid_configure(padx=(padx1 + padx1_2 + 1, padx2 + padx2_2 + 1),
                                  pady=(pady1, pady2))
1254127
private void initUpperLeftComponent() {

        m_upperLeftComponent = new HorizontalLayout();
        m_upperLeftComponent.setHeight("100%");
        m_upperLeftComponent.setSpacing(true);
        m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT);
        m_upperLeftComponent.addComponent(m_languageSwitch);
        m_upperLeftComponent.addComponent(m_filePathLabel);

    }
927884
public void setCellValues(Integer[][] cellValues) {
        if (session != null) {
            session.removeEventListener(workingMemoryListener);
            session.dispose();
            steppingFactHandle = null;
        }
        
        this.session = kc.newKieSession("SudokuKS");
        session.setGlobal("explain", explain);
        session.addEventListener(workingMemoryListener);

        Setting s000 = new Setting(0, 0, 0);
        FactHandle fh000 = this.session.insert(s000);
        this.create();

        int initial = 0;
        for (int iRow = 0; iRow < 9; iRow++) {
            for (int iCol = 0; iCol < 9; iCol++) {
                Integer value = cellValues[iRow][iCol];
                if (value != null) {
                    session.insert(new Setting(iRow, iCol, value));
                    initial++;
                }
            }
        }
        this.counter = new Counter(initial);
        this.session.insert(counter);
        this.session.delete(fh000);
        this.session.fireAllRules();
    }
135263
function (td) {
      var coords = self.view.getCellCoords(td);
      var corners = grid.getCornerCoords([priv.selStart, priv.selEnd]);
      if (priv.settings.fillHandle !== 'horizontal' && (corners.BR.row < coords.row || corners.TL.row > coords.row)) {
        coords = {row: coords.row, col: corners.BR.col};
      }
      else if (priv.settings.fillHandle !== 'vertical') {
        coords = {row: corners.BR.row, col: coords.col};
      }
      else {
        return; //wrong direction
      }
      autofill.fillBorder.appear([priv.selStart, priv.selEnd, coords]);
    }
111492
def setup_layout(self, orientation=None):
        
        if orientation == QtCore.Qt.Horizontal or orientation is None:
            layout = QtGui.QHBoxLayout()
        elif orientation == QtCore.Qt.Vertical:
            layout = QtGui.QVBoxLayout()
        else:
            raise TypeError('Orientation is of wrong type! Allowed is QtCore.Qt.Horizontal and QtCore.Qt.Vertical. Given: %s' % orientation)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(0)
        self.setLayout(layout)
183420
private void configureMatrix() {
        if (getDrawable() == null || getWidth() == 0 || getHeight() == 0) return;

        int dWidth = getDrawable().getIntrinsicWidth();
        int dHeight = getDrawable().getIntrinsicHeight();
        int vWidth = getWidth();
        int vHeight = getHeight();

        float scale;
        float dx, dy;

        if (dWidth * vHeight > vWidth * dHeight) {
            scale = (float) vHeight / (float) dHeight;
            mXOffset = (vWidth - dWidth * scale * mParallaxIntensity) * 0.5f;
            mYOffset = (vHeight - dHeight * scale * mParallaxIntensity) * 0.5f;
        } else {
            scale = (float) vWidth / (float) dWidth;
            mXOffset = (vWidth - dWidth * scale * mParallaxIntensity) * 0.5f;
            mYOffset = (vHeight - dHeight * scale * mParallaxIntensity) * 0.5f;
        }

        dx = mXOffset + mXTranslation;
        dy = mYOffset + mYTranslation;

        mTranslationMatrix.set(getImageMatrix());
        mTranslationMatrix.setScale(mParallaxIntensity * scale, mParallaxIntensity * scale);
        mTranslationMatrix.postTranslate(dx, dy);
        setImageMatrix(mTranslationMatrix);
    }
353068
private void assumeTableDefaults(Cell aCell) {
        
        if (aCell.getBorder() == Rectangle.UNDEFINED) {
            aCell.setBorder(defaultCell.getBorder());
        }
        if (aCell.getBorderWidth() == Rectangle.UNDEFINED) {
            aCell.setBorderWidth(defaultCell.getBorderWidth());
        }
        if (aCell.getBorderColor() == null) {
            aCell.setBorderColor(defaultCell.getBorderColor());
        }
        if (aCell.getBackgroundColor() == null) {
            aCell.setBackgroundColor(defaultCell.getBackgroundColor());
        }
        if (aCell.getHorizontalAlignment() == Element.ALIGN_UNDEFINED) {
            aCell.setHorizontalAlignment(defaultCell.getHorizontalAlignment());
        }
        if (aCell.getVerticalAlignment() == Element.ALIGN_UNDEFINED) {
            aCell.setVerticalAlignment(defaultCell.getVerticalAlignment());
        }
    }