Add gridx=RELATIVE to the constraints for the current component if how ==
true 0 it if false.
517404
public Packer setXLeftRelative(final boolean how) {
        if (how == true) {
            gc.gridx = GridBagConstraints.RELATIVE;
        } else {
            gc.gridx = 0;
        }
        setConstraints(comp, gc);
        return this;
    }
1049935
public static void addToGridBag(final Component comp, final JPanel panel, final int gridx, final int gridy,
            final int width, final int height, final int anchor) {
        addToGridBag(comp, panel, gridx, gridy, width, height, anchor, DEFAULT_PADDING);
    }
1330084
def _merge_constraints(constraints, overrides):
    
    for o in overrides:
        i = 0
        while i < len(constraints):
            c = constraints[i]
            if _same(o, c):
                constraints[i].update(o)
                break
            i = i + 1
1089338
def combine_with(self, additional_constraints):
    """"""
    x = additional_constraints
    if not isinstance(additional_constraints, AffineWarpConstraints):
      x = AffineWarpConstraints(additional_constraints)
    new_constraints = []
    for left, right in zip(self._constraints, x.constraints):
      new_constraints.append([self._combine(x, y) for x, y in zip(left, right)])
    return AffineWarpConstraints(new_constraints)
399572
def _add_grid_attributes(self, ds):
        """"""
        for name_int, names_ext in self._grid_attrs.items():
            ds_coord_name = set(names_ext).intersection(set(ds.coords) |
                                                        set(ds.data_vars))
            model_attr = getattr(self.model, name_int, None)
            if ds_coord_name and (model_attr is not None):
                # Force coords to have desired name.
                ds = ds.rename({list(ds_coord_name)[0]: name_int})
                ds = ds.set_coords(name_int)
                if not np.array_equal(ds[name_int], model_attr):
                    if np.allclose(ds[name_int], model_attr):
                        msg = ("Values for '{0}' are nearly (but not exactly) "
                               "the same in the Run {1} and the Model {2}.  "
                               "Therefore replacing Run's values with the "
                               "model's.".format(name_int, self.run,
                                                 self.model))
                        logging.info(msg)
                        ds[name_int].values = model_attr.values
                    else:
                        msg = ("Model coordinates for '{0}' do not match those"
                               " in Run: {1} vs. {2}"
                               "".format(name_int, ds[name_int], model_attr))
                        logging.info(msg)

            else:
                # Bring in coord from model object if it exists.
                ds = ds.load()
                if model_attr is not None:
                    ds[name_int] = model_attr
                    ds = ds.set_coords(name_int)
            if (self.dtype_in_vert == 'pressure' and
                    internal_names.PLEVEL_STR in ds.coords):
                self.pressure = ds.level
        return ds
1166904
def OnInsertCols(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][1] is None:
            # Insert rows at cursor
            ins_point = self.grid.actions.cursor[1] - 1
            no_cols = 1
        else:
            # Insert at right edge of bounding box
            ins_point = bbox[0][1] - 1
            no_cols = self._get_no_rowscols(bbox)[1]

        with undo.group(_("Insert columns")):
            self.grid.actions.insert_cols(ins_point, no_cols)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
389676
def add_constraints(self):
        
        if self._constraints:
            super(MorphOneOrMany, self).add_constraints()

            self._query.where(self._morph_type, self._morph_name)
1132060
public void setInitialConstraintsFrom(final Component comp) {
        gc = getConstraints(comp);
        if (gc == null) {
            throw new IllegalArgumentException(comp + " has no existing constraints");
        }
        setConstraints(comp, gc);
    }
1198123
public Packer setRemainX(final boolean how) {
        if (how == true) {
            gc.gridwidth = GridBagConstraints.REMAINDER;
        } else {
            gc.gridwidth = 1;
        }
        setConstraints(comp, gc);
        return this;
    }
256744
public void addBetaConstraint(BetaNodeFieldConstraint constraint) {
        if ( constraint != null ) {
            BetaNodeFieldConstraint[] tmp = this.betaConstraints;
            this.betaConstraints = new BetaNodeFieldConstraint[tmp.length + 1];
            System.arraycopy( tmp,
                              0,
                              this.betaConstraints,
                              0,
                              tmp.length );
            this.betaConstraints[this.betaConstraints.length - 1] = constraint;
            this.updateRequiredDeclarations( constraint );
            this.setType( Constraint.ConstraintType.BETA );
        }
    }
216072
def add_constraints(self):
        
        parent_table = self._parent.get_table()

        self._set_join()

        if self._constraints:
            self._query.where('%s.%s' % (parent_table, self._first_key), '=', self._far_parent.get_key())
80632
public Packer setRemainY(final boolean how) {
        if (how == true) {
            gc.gridheight = GridBagConstraints.REMAINDER;
        } else {
            gc.gridheight = 1;
        }
        setConstraints(comp, gc);
        return this;
    }
1306862
def constrain_oddeven(self, diff, **kwargs):
        
        if 'odd-even' not in self.constraints:
            self.constraints.append('odd-even')
        for pop in self.poplist:
            if isinstance(pop, EclipsePopulation_Px2):
                pop.constrain_oddeven(diff, **kwargs)
        self.oddeven_diff = diff
181864
public void addSparseConstraint(int component, int index, double value) {
    constraints.add(new Constraint(component, index, value));
  }
501878
function setConstraint(sKey, vValue) {
			if (vValue !== undefined) {
				mConstraints = mConstraints || {};
				mConstraints[sKey] = vValue;
			}
		}
807955
public Packer setFillBoth(final boolean how) {
        if (how == true) {
            gc.fill = GridBagConstraints.BOTH;
            gc.weightx = 1;
            gc.weighty = 1;
        } else {
            gc.weightx = 0;
            gc.weighty = 0;
            gc.fill = 0;
        }
        setConstraints(comp, gc);
        return this;
    }
1205873
public static void addToGridBag(final Component comp, final JPanel panel, final int gridx, final int gridy,
            final int width, final int height, final int anchor, final int padding, final double weightx,
            final double weighty) {
        addToGridBag(comp, panel, gridx, gridy, width, height, anchor, padding, weightx, weighty,
                GridBagConstraints.HORIZONTAL);
    }